* 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
* feat(sync)!: remove compatibility with v2.29
* feat(sync)_: add AC notifications when initiating the sync fallback
Needed for https://github.com/status-im/status-desktop/issues/15750
Adds an AC notification when the syncing fails and the user is prompted to use a seed phrase instead.
There is one notification for the initiator (created) and one for the old account (received).
Once the flow is completed, ie the receiver presses Enable and sync, the notifications are deleted
* test_: update test
* fix_: lint issue
* chore_: ignore tmp file generated by make lint-fix
* chore_: rename EnableAndSyncInstallation to EnableInstallationAndSync
* chore_: address review feedback
* chore_: revert changes to .gitignore
* fix_: simplify code
* fix_: keep old API
---------
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
* 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>
Previously, Messenger was `Start`ed multiple times, which resulted in
the shutdown process not being invoked on previously initialized
Messenger's sub-instances. This led to the failure of MVDS instance
shutdown causing massive error logs due to the attempts to read from a
closed database.
- use `appdatabse.DbInitializer{}` in tests to ensure consistent migrations
- remove protocol's open database functions due to improper
initialization caused by missing node config migration
- introduce `PushNotificationServerConfig` to resolve cyclic dependency
issues
* Prevent Logged In Account Local Pairing / Syncing With Another Account
* addressed feedback from @siddarthkay
* fixed `TestPairingThreeDevices`
* replace `prepareBackendWithAccount` with `prepareBackendWithoutAccount`
- send transferred keyuids instead of number of transferred files
- updating keypair's operability for transferred keypairs
- unnecessary check of a number of transferred keystore files
There is a desktop app feature where we need to transfer keystore files for selected
keypair/s only via local network using a QR code (of course, which are not migrated
to a keycard, otherwise we wouldn't need to do that).
If user followed onboarding flow to recover his account using seed phrase or keycard,
then `ProcessBackedupMessages` property of node config json object should be set to
`true`, otherwise it should be set to `false` or be omitted.