Commit Graph

355 Commits

Author SHA1 Message Date
frank f325e95bf1
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-08 18:00:15 +05:30
IvanBelyakoff e16d820ecd
chore_: CHERRY-PICK Proxy URLs for blockchain providers (#5644)
* 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

* feat(wallet)_: add status proxy RPC urls for blockchain providers

Replace the status proxy URL for cryptocompare.
2024-08-01 10:06:34 +01:00
Jonathan Rainville 003058915e
fix_: add missing message verification flag when creating an account (#5570) (#5631) 2024-07-30 19:05:22 +01:00
Icaro Motta 919277be38
feat(pairing)_: Fallback pairing seed (#5614) (#5627)
* 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: frank <lovefree103@gmail.com>
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2024-07-30 13:03:43 -03: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
Ivan Belyakov 2d6ddf733d fix(wallet)_: add POKT(Grove) sepolia url 2024-05-08 12:35:12 +02:00
Khushboo-dev-cpp 99f7276460
feat(wallet)_: add grove support for opt sepolia and arb sepolia (#5122) 2024-05-07 13:57:36 +02:00
frank 4f4b7a9ce4 refactor_: add more default node config values for frontend when doing local pair sync 2024-05-07 18:17:25 +08:00
frank 22bea87bb2 fix_: not enough peers to publish 2024-05-02 05:40:49 +08:00
frank 8c5a735438 feat_: retry sending specific messages 2024-05-02 05:40:49 +08:00
frank 90b18d4f88 refactor_: set default node config values for frontend when doing local pair sync 2024-04-25 11:51:23 +08:00
Igor Sirotin 68bc9d39fd
fix_: set default user status to Automatic on account creationg (#5083) 2024-04-24 17:36:02 +02:00
Igor Sirotin e691a1b5bb
chore_: rename networks, proper icons for testnets (#5077) 2024-04-19 11:55:31 +01:00
Sean Hagstrom 55e2dc6a90
Allow for timestamps to be saved with accounts (#5049)
* fix_: allow for saving timestamp when saving account

* fix_: associate timestamp to restored account
2024-04-18 09:34:00 +02:00
kaichao e2a4a22896
chore: refactor status cli (#5010)
* chore: remove opts when create account

* chore: namings and better logging

* chore: config api modules with flag.

* chore: renaming

* chore: use methods on object

* fix: allow less characters for name

* fix: display name unit test

* chore: revert display name check.

* chore: change simulate display name.
2024-04-09 18:44:43 +03:00
Igor Sirotin 223a1d759e
Login endpoints improvements (#4980) 2024-03-28 15:01:44 +00:00
Mohamed Javid 1886dc3360
[Feature] Allow setting TestNetworksEnabled in Create/Restore Account (#4971)
This commit adds the ability to set the "TestNetworksEnabled" flag while creating an account.

Function affected: "generateOrImportAccount"

This helps Dev/E2E/PR builds to enable Test Networks by default and disable them on release/nightly builds.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-03-26 17:08:16 +05:30
Cuteivist 296b44f9ab
Chore: Fix default values (#4960) 2024-03-21 23:19:39 +01:00
kaichao f0d6a4f64f
Send direct message using CLI (#4913)
* feat: send dm with cli

* fix: send contact request works

* feat: accept contact request

* feat: send dm

* fix: log

* feat: more dm

* fix: lint

* refactor: fix comments

* fix: more refactor

* fix: refoctor more

* fix: more refacotr

* fix: refactor dm

* fix: context from cli

* fix: add light mode flag

* fix: remove sleep when start node

* fix: better log

* fix: better logger

* fix: lint

* fix: comments

* fix: const flags

* fix: named logger

* feat: inteactive mode

* fix: send message in loop

* fix: better context manage

* feat: cli serve

* fix: readme

* extract to multi files

* fix: status cli rpc

* feat: create and login account

* fix: missing messagess

* fix: missing messages because data sync is not started.

* feat: start http service

* fix: lint

* fix: more build instructions.

* fix: review comments
2024-03-19 08:31:35 +08:00
Sale Djenic f69ee07593 fix: calculating next nonce for optimism chain improved to align with calculation on mainnet and arbitrum 2024-03-13 15:21:33 +01:00
frank 3de945feaf chore: WakuV2 use config instead of settings 2024-03-07 17:20:53 +08:00
Mohamed Javid 6b7efd3dd8
[Chore] Remove POKT Sepolia and Goerli RPC URL (#4830)
This PR removes the POKT (Grove) URL for Sepolia and Goerli, as POKT dropped support.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-03-06 15:23:32 +05:30
Alexander 26bc564b38
Peer syncing toggle (#4758)
* Peer syncing toggle

* bindata.go
2024-03-05 11:44:09 +01:00