Commit Graph

384 Commits

Author SHA1 Message Date
flexsurfer c2d79e785e
feat_: add KeycardPairingKey for mobile (#6101) 2024-11-20 12:35:20 +01:00
frank 735a422230
chore_: create v2 endpoints for status.go to solve EndpointsUnsupported in endpoints.go (#5943)
* chore_: create v2 endpoints for status.go to use status-backend server

* feat_: support using http for media server (#6060)
2024-11-19 09:31:29 +00:00
Igor Sirotin 7ee45bab1c
chore_: cleanup unused cmd (#6045)
* chore!: remove cmd/node-canary

* chore!: remove unused root files

* chore!: remove cmd/bootnode and cmd/statusd-prune

* chore!: remove waku _examples

* chore!: remove cmd/spiff-workflow and cmd/topics
2024-11-11 17:17:41 +07:00
Igor Sirotin d15ec57bad
fix_: move version to separate package (#6053) 2024-11-06 17:36:49 +00:00
Igor Sirotin e938635d04
chore_: get version with go generate (#6014)
* chore_: get version with go generate

* fix_: test-functional

* fix_: trip space in version and gitcommit

* fix_: TestUserAgent
2024-11-03 00:47:15 +00:00
osmaczko 2ced83abb7
chore_: replace geth logger with zap logger (#5962)
closes: #6002
2024-10-28 20:54:17 +00:00
Jonathan Rainville 132ea05fc8
feat(accounts)_: cherry-pick Persist acceptance of Terms of Use & Privacy policy (#5766) (#5977)
* feat(accounts)_: Persist acceptance of Terms of Use & Privacy policy (#5766)

The original GH issue https://github.com/status-im/status-mobile/issues/21113
came from a request from the Legal team. We must show to Status v1 users the new
terms (Terms of Use & Privacy Policy) right after they upgrade to Status v2
from the stores.

The solution we use is to create a flag in the accounts table, named
hasAcceptedTerms. The flag will be set to true on the first account ever
created in v2 and we provide a native call in mobile/status.go#AcceptTerms,
which allows the client to persist the user's choice in case they are upgrading
(from v1 -> v2, or from a v2 older than this PR).

This solution is not the best because we should store the setting in a separate
table, not in the accounts table.

Related Mobile PR https://github.com/status-im/status-mobile/pull/21124

* fix(test)_: Compare addresses using uppercased strings

---------

Co-authored-by: Icaro Motta <icaro.ldm@gmail.com>
2024-10-23 09:53:25 -04:00
Sale Djenic 3179532b64 chore_: completely remove goerli from the code 2024-10-21 17:30:51 +02:00
Sale Djenic 18a9072435 chore_: providers re-ordered
A new order of using providers is:
1. StatusProxy - Node Fleet
2. StatusProxy - Infura
3. Direct Infura
4. StatusProxy - Grove
5. Direct Grove
2024-10-21 17:30:51 +02:00
Andrey Bocharnikov 86cd41d04e
chore(wallet)_: remove unused upstream client (#5934)
* chore(wallet)_: remove unused upstream client

fixes #5933
2024-10-11 21:01:14 +04:00
Andrey Bocharnikov 66ee53175e chore_: add a status proxy to the nodefleet rpc as a primary service provider
fixes #5901
2024-10-02 18:41:29 +07:00
Parvesh Monu 42f715f123
fix_: profile name not displayed on the login page for synced device in the fallback flow (#5876) 2024-09-27 20:18:53 +05:30
frank 38308d48f2
feat_: log on panic (#5849)
* feat_: log error and stacktrace when panic in goroutine

* test_: add test TestSafeGo

* chore_: rename logAndCall to call

* chore_: rename SafeGo to Go

* chore_: make lint-fix

* chore_: use t.Cleanup

* chore_: Revert "chore_: use t.Cleanup"

This reverts commit 4eb420d179cc0e208e84c13cb941e6b3d1ed9819.

* chore_: Revert "chore_: make lint-fix"

This reverts commit fcc995f157e671a4229b47419c3a0e4004b5fdab.

* chore_: Revert "chore_: rename SafeGo to Go"

This reverts commit a6d73d6df583f313032d79aac62f66328039cb55.

* chore_: Revert "chore_: rename logAndCall to call"

This reverts commit 8fbe993bedb9fbba67349a44f151e2dd5e3bc4cc.

* chore_: Revert "test_: add test TestSafeGo"

This reverts commit a1fa91839f3960398980c6bf456e6462ec944819.

* chore_: Revert "feat_: log error and stacktrace when panic in goroutine"

This reverts commit f612dd828fa2ce410d0e806fe773ecbe3e86a68a.

* feat_: log error and stacktrace when panic in goroutine

* chore_: make lint-fix

* chore_: rename logAndCall to call

* chore_: renaming LogOnPanic

* chore_: update rest goroutine function calls

* chore_: make lint-fix
2024-09-27 06:37:32 +08:00
Igor Sirotin c9b777a218
fix_: clean up tests with ResetMobileSignalHandler (#5793) 2024-09-03 09:41:56 +01:00
Dario Gabriel Lipicar 970119af78 feat_: disable tx history fetching for all accounts 2024-09-02 09:24:59 -03:00
frank e6a2f0afd6
chore_: fix flaky test TestEnableInstallationAndPair (#5775) 2024-09-02 16:24:38 +08:00
Mohamed Javid bd0464d192
fix_: send accounts event on handling backed up accounts (#5739)
This commit moves the "accountsFeed" from "initServices" to the status node config, and adds a reference to messenger config for sending events on handling backed-up data.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-08-31 00:58:03 +05:30
richΛrd 8cf4feec1e
refactor_: remove status-im/rendezvous (#5685) 2024-08-22 13:12:37 -04:00
frank b6fe129ad6 fix_: account address derivation in mobile user upgrade 2024-08-21 14:23:03 +01:00
Andrea Maria Piana 97f4c6e3df feat_: Flush hystrix on going back online
When going offline, all the rpc calls fail making hystrix open all the
circuits.
This commit changes the behavior so that when we go back online, we
close all the circuits.
We should also avoid making rpc requests while offline, but this should
work for release.
2024-08-16 19:52:48 +01:00
Igor Sirotin f660be0daa
chore!: simplify local pairing API (#5643)
* chore!: switch to use CreateAccount, fix tests

* chore_: move GenerateInstallationID to multidevice

* chore!: clean up ReceiverConfig

* chore_: use DefaultKeystoreRelativePath

* chore_: cleanup

* fix_: import api

* chore_: lint fix

* chore_: remove unused import
2024-08-14 21:10:19 +01:00
Andrea Maria Piana 0954a4ad13 feat!: drive proxy stage name from the client 2024-08-14 18:50:01 +00:00
saledjenic 79b1c547d1
Improvements on resolving nonce (#5658)
* chore_: unused `BuildTx` function removed from the processor interface and types that are implement it

Since the `BuildTx` function is not used anywhere, it's removed from the code.

* fix_: resolving nonce improvements

When the app sends more than a single tx from the same account on the same chain, some
chains do not return appropriate nonce (they do not consider pending txs), because of
that we place more tx with the same nonce, where all but the first one fail.

Changes in this PR keep track of nonces being used in the same sending/bridging flow, which means
for the first tx from the multi txs the app asks the chain for the nonce, and every next nonce is resolved
by incrementing the last used nonce by 1.
2024-08-12 08:07:32 -04:00
Mykhailo Prakhov 58a9557c58
fix: reject handling requests to join without revealed accounts (#5549)
* fix(requestToJoin)_: request to join must have revealed addresses with signature

* fix(tests)_: fix tests

* chore(tests)_: increase tests timeout
2024-08-07 17:57:02 +02:00
Igor Sirotin eeb34f780f
chore_: remove deprecated `CreateAccount.BackupDisabledDataDir` (#5664)
* chore_: remove deprecated CreateAccount.BackupDisabledDataDir

* test_: cover ErrCreateAccountInvalidRootDataDir
2024-08-07 13:59:43 +01:00
Igor Sirotin 2f5437130e
feat_: auto set random wallet emoji when creating account (#5667)
* feat_: auto set random wallet emoji when creating account

* fix_: remove emoji on error

* fix_: lint
2024-08-07 13:34:04 +01:00
frank 6581f75c63
fix: enable light client for mobile (#5654)
* fix_: enable light client for mobile

* fix_: rename const name

* fix_: disable store confirmation for mobile v1 by default
2024-08-07 14:43:21 +05:30
Ivan Belyakov b74d9e6b4e feat(wallet)_: add status proxy RPC urls for blockchain providers
Replace the status proxy URL for cryptocompare.
2024-08-01 08:19:20 +02:00
IvanBelyakoff 5b34cd9e9f
feat(wallet)_: add basic auth for cryptocompare proxy (#5536)
* feat(wallet)_: add basic auth for cryptocompare proxy

* test(wallet)_: add a test for httpclient used in market clients
2024-07-30 14:48:22 +01:00
frank f123e98179
feat: fallback pairing seed (#5614)
* feat(pairing)!: Add extra parameters and remove v2 compatibility

This commit includes the following changes:

I have added a flag to maintain 2.29 compatibility.

Breaking change in connection string

The local pairing code that was parsing the connection string had a few non-upgradable features:

It was strictly checking the number of parameters, throwing an error if the number was different. This made it impossible to add parameters to it without breaking.
It was strictly checking the version number. This made increasing the version number impossible as older client would just refuse to connect.
The code has been changed so that:

Two parameters have been added, installation-id and key-uid. Those are needed for the fallback flow.
I have also removed version from the payload, since it wasn't used.

This means that we don't support v1 anymore. V2 parsing is supported . Going forward there's a clear strategy on how to update the protocol (append parameters, don't change existing one).

https://www.youtube.com/watch?v=oyLBGkS5ICk Is a must watch video for understanding the strategy

Changed MessengerResponse to use internally a map of installations rather than an array (minor)
Just moving towards maps as arrays tend to lead to subtle bugs.

Moved pairing methods to messenger_pairing.go
Just moved some methods

Added 2 new methods for the fallback flow
FinishPairingThroughSeedPhraseProcess
https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R29

EnableAndSyncInstallation

https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R18

Flow for clients
Client A1 is logged in
Client A2 is logged out

Client A1 shows a QR code
Client A2 scans a QR code
If connection fails on A2, the user will be prompted to enter a seed phrase.
If the generated account matches the key-uid from the QR code, A2 should call FinishPairingThroughSeedPhraseProcess with the installation id passed in the QR code. This will send installation information over waku. The user should be shown its own installation id and prompted to check the other device.
Client A1 will receive new installation data through waku, if they are still on the qr code page, they should show a popup to the user showing the received installation id, and a way to Enable and Sync, which should call the EnableAndSyncInstallation endpoint. This should finish the fallback syncing flow.
Current issues
Currently I haven't tested that all the data is synced after finishing the flow. I see that the two devices are paired correctly, but for example the DisplayName is not changed on the receiving device. I haven't had time to look into it further.

* test_: add more test for connection string parser

* fix_: fix panic when parse old connection string

* test_: add comments for TestMessengerPairAfterSeedPhrase

* fix_: correct error description

* feat_:rename FinishPairingThroughSeedPhraseProcess to EnableInstallationAndPair

* fix_: delete leftover

* fix_: add UniqueKey method

* fix_: unify the response for InputConnectionStringForBootstrapping

* fix_: remove fields installationID and keyUID in GethStatusBackend

* fix_: rename messenger_pairing to messenger_pairing_and_syncing

---------

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2024-07-30 17:14:05 +08:00
richΛrd 0e982f1a3d
chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
IvanBelyakoff bf6c0c4cc6
fix(wallet)_: fix provider down event happening too often (#5595)
* fix(wallet)_: fix provider down event happening too often

- handle context cancelled error
- do not count expected errors when calling tokenURI as providers
  errors
- use archival not for optimism (was silently added by Grove makeing the
  old URL non-archival)

Closes #5555

* test(wallet)_: add test for collectibles manager to verify that main
circuit is not tripped calling by tokenURI method
2024-07-29 18:07:43 +01:00
richΛrd 3792d37df4
fix_: add missing message verification flag when creating an account (#5570) 2024-07-26 15:19:19 -04:00
Mykhailo Prakhov 30fee0cfd3 fix(communities)_: validate if RawMessage from DB is valid before sending it 2024-07-23 19:54:39 +02:00
Prem Chaitanya Prathi 9a703162c4
refactor: only use shards (#5474)
* refactor_: use shards by default

* fix_: metadata lightclient check

* chore_: update go-waku
2024-07-15 20:55:12 +05:30
Prem Chaitanya Prathi 58a3cc1127 feat(waku)_: allow client to set store confirmations 2024-07-15 09:37:57 +01:00
Andrea Maria Piana 9a59d6a459 feat(metrics)_: add centralized metrics
This commit adds support for centralized metrics.
There are two providers as of now, and we haven't quite decided which
one to go for, so for the time being both are supported.
It also introduces a new endpoint InitializeApplication that replaces
OpenAccounts
2024-07-11 10:05:31 +01:00
Jakub Sokołowski 0a6b76643e fix(integration-tests)_: add missing HTTPVirtualHosts
And set it to `*` for tests to avoid RPC access issues.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-07-04 16:14:02 +02:00
Mikhail Rogachev 1ba4b86c7e
feat_: Add WS settings to the node config (#5346)
* feat_: add ability to enable http and ws connections from the client app
* feat_: add websocket option for api config
* fix_: use new api options in statusd
* chore_: add test for `overrideApiConfig`
2024-06-26 16:33:22 +02:00
Igor Sirotin 49eaabaca5
feat: adapt create/restore/login endpoints for keycard usage (#5311)
* chore_: remove duplicated `StartNodeWithKey`

* feat(KeycardPairing)_: added GetPairings method

* chore_: simplify startNode... methods

* chore_: added encryption path to be derived

* fix_: error handling in StartNodeWithKey

* feat_: added keycard properties to CreateAccount

* feat_: moved KeycardWhisperPrivateKey to LoginAccount

* fix_: LoginAccount during local pairing

* feat_: added chat key handling to loginAccount

* chore_: struct response from generateOrImportAccount

* fix_: do not store keycard account to keystore

* feat_: added Mnemonic parameter to LoginAccount

* chore_: wrap loginAccount errors

* feat_: RestoreKeycardAccountAndLogin endpoint

* chore_: merge RestoreKeycardAccountRequest into RestoreAccountRequest

* fix_: TestRestoreKeycardAccountAndLogin

* fix_: MessengerRawMessageResendTest

* chore_: cleanup

* chore_: cleanup according to pr comments

* chore_: better doc for Login.Mnemonic

* chore_: add/fix comments

* fix_: lint
2024-06-26 13:14:27 +02:00
kaichao 1d1d6e3276
chore_: set lower max delivery attempts (#5382)
* chore_: update message delivery max attemts.

* chore_: regenerate appdatabase bindata
2024-06-21 23:20:54 +08:00
Igor Sirotin 10cf286208
feat_: added Login request BandwidthStatsEnabled flag (#5369) 2024-06-18 14:36:53 +01:00
Andrey Bocharnikov 9ffe842acc fix(config)_: fix TorrentConfig when loading node config from DB
* Fix TorrentConfig validation condition
* Add tests
* Should help existing users who cannot login to the app

fixes #14813
2024-06-12 02:50:29 +07:00
kaichao 47899fd045
feat_: hash based query for outgoing messages. (#5217)
* feat_: hash based query for outgoing messages.

* chore_: more logs

* chore_: fix comments

* chore_: do not lock when send queries

* chore_: use constant for magic number

* chore_: remove message ids from query queue after ack

* chore_: fix ack clean process

* chore_: fix message resend test

* chore_: add test for waku confirm message sent.

* chore_: fix tests.

* chore_: fix more

* chore_: set store peer id when mailserver updates

* fix_: tests

* chore_: increase max hash query length

* chore_: remove debug log of ack message

* chore_: remove automatic peer selection

* chore_: mark raw message to sent after ack

* chore_: fix test

* chore_: fix test
2024-06-11 15:45:01 +08:00
frank 33ccf784c5
fix_:Missing "Backup Recovery Phrase" option in profile (#5305) 2024-06-07 07:34:08 +08:00
Igor Sirotin a01ffdbe8e
fix: proper usage of CreateAccount RootDataDir (#5284)
* fix_: introduce CreateAccount.RootDataDir
* fix_: deprecate and remove ShhextConfig.BackupDisabledDataDir
2024-06-05 14:03:34 +01:00
Ivan Belyakov 99ead2d90c feat(wallet)_: add support to statusd to create account from seed phrase
fixed minor issues

Closes #5175
2024-06-05 13:43:53 +02:00
frank 713476c268 test_: correct comment 2024-06-05 19:36:05 +08:00
frank cb0a64d700 test_: add unit test for FixMissingKeyUIDForAccounts 2024-06-05 19:36:05 +08:00
frank a908a41eff test_: re-organized test code 2024-06-05 19:36:05 +08:00