Open
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
| >; | ||
| type SecurityDeposit = ConstU128<{ 10 * UNITS }>; | ||
| type MaxFriendsPerConfig = ConstU32<100>; | ||
| type WeightInfo = (); |
Contributor
There was a problem hiding this comment.
Do we need to generate new weights?
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Member
Author
|
/cmd bench --pallet pallet_recovery --runtime asset-hub-westend |
Contributor
|
Command "bench --pallet pallet_recovery --runtime asset-hub-westend" has started 🚀 See logs here |
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
Contributor
|
Command "bench --pallet pallet_recovery --runtime asset-hub-westend" has failed ❌! See logs here |
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recovery Pallet
Pallet Recovery allows you to have friends or family recover access to your account if you lose
your seed phrase or private key.
Terminology
lost: An account that has lost access to its private key and needs to be recovered.friend: A befriended account that can approve a recovery process.initiator: An account that initiated a recovery attempt.recovered: An account that has been successfully recovered.inheritor: An account that is inheriting access to a lost account after recovery.attempt: An attempt to recover a lost account by an initiator.order: The level of trust that an account has in a friend group.deposit: The amount that a friends of this group needs to reserve to initiate an attempt.threshold: The number of friends that need to approve an attempt.inheritance delay: How long an attempt will be delayed before it can succeed.provided block: The blocks that are provided by theT::BlockNumberProvider.Scenario: Recovering a lost account
Story of how the user Alice user loses access and is recovered by her friends.
inheritoraccount that will inherit the access to her account foreach friend group. This could be a multisig.
set_friend_groups.lostaccount.initiator) of Alice's friend groups become aware of the situation andstarts a recovery
attemptviainitiate_attempt.approve_attempt.thresholdfriends approve the attempt (further approvals will fail since they areuseless).
finish_attemptafter at least inheritance delayblocks since the initiation have passed.
recoveredand accessible by theinheritoraccount.inheritormay callcontrol_inherited_accountat any point to transfer Alice's fundsto her new account.
Scenario: Multiple friend group try to recover an account
Alice may have configured multiple friend groups that all try to recover her account at the same
time. This can lead to a conflict of which friend group should eventually inherit the access.
In the case above you see how the Friends group is now unable to recover Alice account since
the Family group already did it and has a higher inheritance order.
Now, imagine the case that the Friends group would have started on day 4 and would have
already recovered the account on day 24. Two days later, the Family group can take access back
and will replace the inheritor account with their own. The Friends group had access for two
days since they were faster.
If Alice account has most balance locked in 28 day staking this would not make a big difference,
since only the free balance would be immediately transferable.
After a recovery attempt was completed, friend groups with a higher inheritance order cannot
open a new attempt to recover the account.
Data Structures
The pallet has three storage items, see the in-code docs [
FriendGroups], [Attempts] and[
Inheritor]. Storage items may contain deposit "tickets" or similar noise and should thereforenot be read directly but only through the API.
API
Reading data can be done through the view functions:
provided_block_number: The block number that will be used to measure time.friend_groups: The friend groups of an account that can initiate recovery attempts.attempts: Ongoing recovery attempts for a lost account.inheritor: The account that inherited full access to the lost account.inheritance: All the recovered accounts that an account inherited access to.TODO