status-go/multiaccounts
Andrea Maria Piana 23f71c1125 Fix encryption id && rekey with a single message
This commit changes the format of the encryption id to be based off 3
things:

1) The group id
2) The timestamp
3) The actual key

Previously this was solely based on the timestamp and the group id, but
this might lead to conflicts. Moreover the format of the key was an
uint32 and so it would wrap periodically.

The migration is a bit tricky, so first we cleared the cache of keys,
that's easier than migrating, and second we set the new field hash_id to
the concatenation of group_id / key_id.
This might lead on some duplication in case keys are re-received, but it
should not have an impact on the correctness of the code.

I have added 2 tests covering compatibility between old/new clients, as
this should not be a breaking change.

It also adds a new message to rekey in a single go, instead of having to
send multiple messages
2023-10-24 20:48:54 +01:00
..
accounts feat: arbitrum sepolia 2023-10-17 09:28:13 +02:00
common chore: Add ColorId for Wallet accounts that can be shared with mobile (#3521) 2023-06-02 17:06:51 +02:00
errors feat: keypair_name and last_used_derivation_index columns added to accounts table 2023-03-28 16:19:27 +02:00
migrations Fix encryption id && rekey with a single message 2023-10-24 20:48:54 +01:00
settings fix: shared links and link previews contain full self information (#4169) 2023-10-24 11:15:32 +01:00
settings_notifications fix: don't return an error on empty rows 2023-01-24 16:26:36 -04:00
settings_social_links fix(tests): moved test db setup to a common place 't/helpers', created 2023-08-18 09:00:56 +02:00
database.go fix: shared links and link previews contain full self information (#4169) 2023-10-24 11:15:32 +01:00
database_test.go fix: use proper migrations for protocol's test database 2023-10-03 15:11:58 +02:00