-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Direct conversion from staking contract to delegation pool #12256
base: main
Are you sure you want to change the base?
Direct conversion from staking contract to delegation pool #12256
Conversation
⏱️ 21s total CI duration on this PR
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12256 +/- ##
==========================================
- Coverage 71.1% 64.1% -7.1%
==========================================
Files 795 792 -3
Lines 183022 176059 -6963
==========================================
- Hits 130291 113005 -17286
- Misses 52731 63054 +10323 ☔ View full report in Codecov by Sentry. |
This issue is stale because it has been open 45 days with no activity. Remove the |
This issue is stale because it has been open 45 days with no activity. Remove the |
aptos-move/framework/aptos-framework/sources/delegation_pool.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/delegation_pool.move
Outdated
Show resolved
Hide resolved
d8c70bd
to
354b18f
Compare
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.
Thank you for adding this conversion! I left a couple of comments and questions
aptos-move/framework/aptos-framework/sources/delegation_pool.move
Outdated
Show resolved
Hide resolved
inactive_shares, | ||
pending_withdrawals: table::new<address, ObservedLockupCycle>(), | ||
stake_pool_signer_cap, | ||
// `staking_contract::distribute_internal` has already withdrawn any existing inactive stake |
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 wonder if we should just do an assert that inactive == 0 just to be absolutely certain
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.
should we use the error::internal
code as this is an invariant that's not expected to fail? we may also formally prove it
aptos-move/framework/aptos-framework/sources/delegation_pool.move
Outdated
Show resolved
Hide resolved
54337fe
to
47e2d07
Compare
Update main
- added a mockup spec to unblock the CI test failure
…version Add a Prover mockup spec
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.
After completing the localnet test, we just need to add the forge test here, and I think we’re good to go.
This issue is stale because it has been open 45 days with no activity. Remove the |
Description
This implements AIP: aptos-foundation/AIPs#311
The staker of a staking contract would be able to atomically convert it to a delegation pool of same operator and commission fee without incurring any validator downtime. The staker becomes the owner of the newly created delegation pool.
Test Plan
Module UTs validating core functionality and invariants.