You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As soon as we release to mainnet, we must not break compatibility on state. For that, we must be able to upgrade old states to current working version.
This can be done with a version tag on the state, and a set of orderable functions on some submodule, each one taking a raw object (not typed, to avoid keeping all io-ts codecs versions on the codebase forever) of version V and returning a raw object of version V+1. The last one then should return an object which is decodable as current RaidenState.
This will allow more easily allowing users to download and backup their state (as a JSON file), and possibly even in a new browser or client with the same private key, upload the state and continue from where from that point on. It'll be user's responsibility to keep the file safe, and to ensure no forks occur (e.g. having 2 clients running in parallel on same account)
Acceptance criteria
Old states can be loaded into the SDK
Upgrade is performed on it
Result is a state compatible with current SDK version.
Tokens should not be locked in a state where they can't be accessed anymore
Tasks
Detecting that it is an old state
The text was updated successfully, but these errors were encountered:
@christianbrb it's more or less like that, but we don't use redux-persist, mainly because our storage implementation makes use of the strong guarantees of our io-ts-based typing system, and also ensures no numeric precision loss with lossless-json, which would have been hard to implement over redux-persist.
But the state migration is very close to how they do it, although implementing it ourselves is trivial, the migration functions looks exactly the same.
Description
As soon as we release to mainnet, we must not break compatibility on state. For that, we must be able to upgrade old states to current working version.
This can be done with a version tag on the state, and a set of orderable functions on some submodule, each one taking a raw object (not typed, to avoid keeping all
io-ts
codecs versions on the codebase forever) of versionV
and returning a raw object of versionV+1
. The last one then should return an object which is decodable as currentRaidenState
.This will allow more easily allowing users to download and backup their
state
(as a JSON file), and possibly even in a new browser or client with the same private key, upload the state and continue from where from that point on. It'll be user's responsibility to keep the file safe, and to ensure no forks occur (e.g. having 2 clients running in parallel on same account)Acceptance criteria
Tasks
The text was updated successfully, but these errors were encountered: