forked from zeropoolnetwork/libzeropool-rs
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
In order to allow our users to migrate seamlessly between devices w/o redundant sync we should introduce automatic opt-in backup service, that would encrypt and store client state backup in a cloud storage ( preferably a decentralized one)
Saving backups
- Client init method must accept a new optional parameter
automaticBackup : bool - If automaticBackup is set , than after every successful transaction or receiving a shielded note or every
Xindices a backup procedure must be called, which performs following steps:- collects all of the known unspent notes, account , latest index to a single struct ( using Borsh)
- serializes, encrypts the data ( the same ChaChaPoly in AEAD mode) using
eta - calls proxy RPC to store the data with some retry policy. A hash of
etacan be used as identifier
Sync from backup
Whenever a user logs in and client initializes, it should call the storage proxy service to check whether a backup for this user is available. If a backup is available and was successfully decrypted, then the client state is populated from decrypted response
Why proxy?
The proxy is needed to abstract storage integration logic away from client code. That would allow to migrate from eg S3 to IPFS or StorJ without any changes on the client side.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels