-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Go/No-Go] ARC-0037 - Introduce withdrawal address for stakers #2385
Merged
Conversation
This file contains 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
ljedrz
reviewed
Mar 8, 2024
ljedrz
reviewed
Mar 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far 👍.
vicsn
approved these changes
Mar 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits
d0cd
approved these changes
Mar 14, 2024
Signed-off-by: Raymond Chu <14917648+raychu86@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
This PR implements withdrawal addresses that staker can use claim their unbonded credits in accordance to ARC-0037.
Validators and delegators now need to specify an additional
withdrawal_address
when they callbond_public
. While they are bonded this withdrawal address can not be changed, which is important because a core reason for this separation of addresses is so that the validator funds are secure even if their "hot" keys are compromised. This withdraw address will receive the credits that are unbonded by the staker inclaim_unbond_public
.This is done with the following changes:
Added a new
withdraw
mappingUpdated
bond_public
:withdrawal_address
exists in thewithdraw
mapping:Updated
claim_unbond_public
:withdrawal_address
Updated
BondedBalances
:atomic_pre_ratify
to process the withdrawal addressesTest Plan
Tests have been added to ensure that:
bond_public
with a different withdrawal address that was was set in thewithdraw
mapping.Ratify::Genesis
is correct with the new withdrawal addresses.Additional Notes
Related PRs
The sister PR can be found here - https://github.com/AleoHQ/snarkOS/pull/3165