-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added function for locking previously delegated stake and removed requirement that delegation pool vesting start times be in the future #152
Conversation
…kes of existing delegators to be made subject to the delegation pool's vesting schedule.
… the new functionality.
…w upper bounds on the total amount locked for the related delegator. Updated the tests accordingly.
aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move
Outdated
Show resolved
Hide resolved
…ew principle stake for the account. Added additional checks to the stake reactivation logic to address Dr Joshi's PR comments.
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.
I believe that the amount is too low for reactivation, the assertion can fail because in the pool we would have less than MIN_COIN_SHARES_IN_POOL
. So (i) either we ensure that the assertion will always hold or (ii) do not perform the operation for those delegator where this might fail.
See #150 and #151.
QA Notes:
Please perform the following steps to help us verify that this new functionality is safe to deploy to and use in mainnet:
release/v7.1
). Setepoch_duration_secs
to something short---maybe 30 seconds. Also setrecurring_lockup_duration_secs
andvoting_duration_secs
to small values so that it is possible to unlock and withdraw stake during this test. Finally, set thegenesis_timestamp_microseconds
to 31 days ago (in microseconds). This will ensure that the first lockup period of the Delegation Pool vesting schedules has passed.0x1::pbo_delegation_pool::fund_delegators_with_stake
. You can find the keys for the pool owners after starting the local network insmr-moonshot/remote-env/Logs/owners
.a. Leave one account untouched.
b. Unlock half of the stake of one account, but do not withdraw any.
c. Unlock the full stake of one account, but do not withdraw any.
d. Unlock the full stake of one account and withdraw half.
dev
of our fork ofaptos-core
and deploy it to the local network via a framework upgrade governance transaction.pending_inactive
allocation when Step 6 is performed.0x1::pbo_delegation_pool::lock_delegators_stakes
. Use the original allocations when calling this function: Do not adjust for the fact that some of the stake has been withdrawn from some accounts.active
and are subject to the vesting schedule. This can be confirmed by ensuring that the accounts that did not withdraw anything in the steps above can now unlock and withdraw their first-period allocations, and that the other accounts cannot unlock anything (yet).