Commit Graph

373 Commits

Author SHA1 Message Date
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
frank 763ed552ed chore_:Don't rely on the master key when generating accounts (#5279)
* chore_:Don't rely on the master key when generating accounts under the bip 0044 path m/44'/60'/0'/0/0

* fix_: lint issue

* fix_: failed test TestBackendStartNodeConcurrently
2024-06-05 19:36:05 +08:00
frank 71e778507d chore_:add more test 2024-06-05 19:36:05 +08:00
frank 9d0e36e7b0 fix_:calculation on keyUID 2024-06-05 19:36:05 +08:00
frank 55bde9075f chore_:Add keyUID to table when migrating from v1 to v2 2024-06-05 19:36:05 +08:00
Ivan Belyakov 631b1afe42 chore(wallet)_: made generateOrImportAccount more modular to make it
testable.

Fixed TestCreateWallet flaky test
2024-06-05 10:22:03 +02:00
Ivan Belyakov a135b27980 test(wallet)_: created Transactor interface
- Moved some methods from Transactor to users of it to clean interface.
- Mocked Bridge interface and Transactor interface for tests
- Wrote unit tests for SendTransaction
2024-05-31 09:58:06 +02:00
richΛrd 94e5431ea3
chore: add fleet ENRs to the list of discv5 nodes (#5184)
* chore_: add fleet ENRs to the list of discv5 nodes
* fix_: handle scenario in which there are dnsDiscoveryURLs and enrs in the DiscV5Bootnode list
2024-05-26 19:16:26 -04:00
Arseniy Klempner ad4fb204ef
chore_: add telemetry url flag to status cli (#5201)
This commit adds a TelemetryUrl param to request for creating
account and to the WakuV2Config. Adds a flag to the cli for
passing in the telemetry server url.
2024-05-22 15:01:54 -07:00
Michal Iskierko 574450289c feat_: Move community tokens transaction listening to status-go
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
2024-05-16 16:18:15 +02:00
Cuteivist 6b680f0722
feat_: Correct opt short names (#5163) 2024-05-16 16:01:30 +02:00
richΛrd 82ae41f6d5
feat(waku2)_: allow using an env variable to set the node's key (#5152) 2024-05-15 19:15:22 -04:00