The Status module that consumes go-ethereum https://status.im
Go to file
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
.dependabot Patch/dependabot protocol (#1980) 2020-05-19 00:14:02 +01:00
.github Add migration check script 2023-06-23 12:01:30 +01:00
.vscode feat(wallet) implement Wallet Connect sign APIs 2023-11-15 15:52:02 +01:00
_assets fix_:increase timeout on unit test (#5553) 2024-07-22 19:08:47 +08:00
_docs nix: Updating Nix Shell and Makefile to use nix-shell 2024-04-09 12:49:06 +03:00
_examples chore_: drop wakuv2 fleets, use waku fleets 2024-05-17 18:53:40 +02:00
abi-spec Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
account Removed unused ParseLoginParams and newErrZeroAddress functions 2024-03-20 10:12:49 +00:00
api feat: fallback pairing seed (#5614) 2024-07-30 17:14:05 +08:00
appdatabase chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
appmetrics fix(tests): moved test db setup to a common place 't/helpers', created 2023-08-18 09:00:56 +02:00
build/bin add .gitkeep to build/bin so it always exists 2019-03-05 14:22:00 +01:00
centralizedmetrics fix_: fix ticker in metrics 2024-07-25 12:42:33 +02:00
circuitbreaker fix(wallet)_: fix provider down event happening too often (#5595) 2024-07-29 18:07:43 +01:00
cmd chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
common chore(community)_: serialise community jsons with image URLs 2024-07-11 18:55:24 +07:00
config chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
connection Address linter issues 2022-03-28 13:14:12 +01:00
contracts feat(metrics)_: add centralized metrics 2024-07-11 10:05:31 +01:00
db Address linter issues 2022-03-28 13:14:12 +01:00
deprecation fx: deprecate profile and timeline chats (#3809) 2023-08-03 17:16:11 +03:00
discovery chore: upgrade go-waku and log about messages sent/received 2022-11-09 17:39:17 +03:00
errors feat(router)_: return processor error when no routes are found 2024-07-19 17:44:08 +02:00
eth-node feat_: `wakuext_relayPeersByTopic` 2024-07-11 12:32:31 +01:00
exchanges URL unfurling (initial implementation) (#3471) 2023-05-18 15:43:06 -03:00
exportlogs Upgrade geth to 1.9.5 and Whisper (#1617) 2019-10-04 17:21:24 +02:00
extkeys Upgrade geth 2021-07-20 10:57:38 +02:00
images fix: validate display name on account creation (#4994) 2024-03-28 16:57:59 +01:00
integration-tests fix(tests-rpc)_: Remove port bind 2024-07-23 11:03:31 +02:00
ipfs fix: add mode build param and change ipfs gateway accordingly 2022-08-26 18:57:55 +02:00
logutils chore: use custom logger for message timestamps and log query duration (#5199) 2024-05-21 13:29:29 -04:00
mailserver chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
metrics Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
mobile feat: fallback pairing seed (#5614) 2024-07-30 17:14:05 +08:00
multiaccounts Check for mobile data connection if setting is on (#5511) 2024-07-26 22:34:57 +01:00
nix chore_: bring in xcodewrapper nix derivation (#5473) 2024-07-04 16:37:05 +05:30
node Feat: implement connector service for browser plugin (#5433) 2024-07-18 17:30:10 +02:00
nodecfg refactor: only use shards (#5474) 2024-07-15 20:55:12 +05:30
notifier Notifier package to interact with gorush notifications (#910) 2018-05-08 16:30:03 +02:00
params chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
peers synchronize display name (#2989) 2022-12-29 14:16:19 +08:00
postgres ci: parametrize DB port for unit tests 2023-09-18 19:54:21 +02:00
profiling test: use `T.TempDir` to create temporary test directory (#2746) 2023-04-26 21:39:51 +01:00
protocol feat: fallback pairing seed (#5614) 2024-07-30 17:14:05 +08:00
rpc fix(wallet)_: fix provider down event happening too often (#5595) 2024-07-29 18:07:43 +01:00
rtt rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
scripts nix: Updating Nix Shell and Makefile to use nix-shell 2024-04-09 12:49:06 +03:00
server feat: fallback pairing seed (#5614) 2024-07-30 17:14:05 +08:00
services feat: fallback pairing seed (#5614) 2024-07-30 17:14:05 +08:00
signal Feat: implement connector service for browser plugin (#5433) 2024-07-18 17:30:10 +02:00
sqlite fix: close messenger's databases in tests 2023-11-28 20:59:25 +01:00
static chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
t feat(metrics)_: add centralized metrics 2024-07-11 10:05:31 +01:00
telemetry chore: skip flaky tests (#5606) 2024-07-27 10:27:26 +01:00
timesource Fix/timesource offline (#4309) 2023-11-13 14:06:32 -05:00
transactions Allow gas estimation for DynamicFeeTx in transactor (#5521) 2024-07-17 11:11:34 +03:00
vendor feat(waku)_: disconnect all peers if ping to randomly choosen peers fail 2 times (#5526) 2024-07-21 20:44:00 -04:00
waku fix: clear waku envelopes cache when deleting a chat (#4621) 2024-01-30 13:43:34 +00:00
wakuv2 feat_: add lightpush and filter bandwidth usage to telemetry (#5547) 2024-07-24 14:28:38 -04:00
walletdatabase fix(wallet)_: migration caused failure due to duplicates were not 2024-07-23 14:45:11 +02:00
.codeclimate.yml This PR (status-go) fixes #12821 (#4516) 2024-01-08 10:18:57 -08:00
.dockerignore fix(ci)_: lock Go at 1.20 and Alpine at 3.18 2024-05-20 08:25:49 +02:00
.gitignore fix(dapps)_: bring back missing wallet_connect_dapps migration file 2024-06-20 15:03:36 +02:00
.golangci.yml chore_: bump go to 1.20 (#5027) 2024-04-18 18:48:02 +02:00
.travis.yml Remove Ropsten and Rinkeby test networks 2022-10-24 14:17:46 +02:00
BOOTNODE.md docs: clarify purpose and describe ports 2020-02-06 18:44:23 +01:00
CMakeLists.txt dev: allow option to force compiling for apple silicon 2022-06-30 09:42:19 +02:00
CONTRIBUTING.md chore_: Update CONTRIBUTING.md 2024-06-24 11:52:50 +01:00
LICENSE.md Create LICENSE.md 2016-09-21 10:00:29 +08:00
MAILSERVER.md rcp.sh: curl wrapper for easier RPC calls 2021-08-24 11:23:25 +02:00
Makefile fix(wallet)_: fix provider down event happening too often (#5595) 2024-07-29 18:07:43 +01:00
README.md Added test policy 2024-03-20 20:38:24 +00:00
RELEASING.md chore_: Add tag-version command 2024-04-10 11:43:13 +01:00
VERSION feat_: bump go-waku to introduce new keep alive interval (#5484) 2024-07-11 14:36:34 -04:00
WAKU.md Create WAKU.md with spec support (#1855) 2020-02-21 17:56:15 +08:00
default.nix nix: Updating Nix Shell and Makefile to use nix-shell 2024-04-09 12:49:06 +03:00
go.mod feat(waku)_: disconnect all peers if ping to randomly choosen peers fail 2 times (#5526) 2024-07-21 20:44:00 -04:00
go.sum feat(waku)_: disconnect all peers if ping to randomly choosen peers fail 2 times (#5526) 2024-07-21 20:44:00 -04:00
shell.nix nix: Updating Nix Shell and Makefile to use nix-shell 2024-04-09 12:49:06 +03:00