feat: seamless rollovers between bond and stx-only staking positions#7249
Open
brice-stacks wants to merge 23 commits into
Open
feat: seamless rollovers between bond and stx-only staking positions#7249brice-stacks wants to merge 23 commits into
brice-stacks wants to merge 23 commits into
Conversation
The simnet doesn't provide a way to do much real testing with the L1 data, so we need to remove those from the unit tests and check that behavior in integration tests.
The `construct-lockup-script` now correctly handles the `unlock-bytes` from the user. The `check_pox_5_register_for_bond_l1_lockup_lifecycle` test is extended to verify that the staker, and no one else, can spend the BTC when the lock expires.
A pox-5 staker can now move directly from one staking position to the
next with no gap in either signer participation or the STX lock:
- bond N -> bond N+6 (or any later non-overlapping bond) via
`register-for-bond`
- bond N -> STX-only stake via `stake`
- STX-only stake -> bond via `register-for-bond`
The STX lock is carried forward in place (amount may go up or down,
unlock height is rescheduled) rather than released and re-acquired.
The bond's custodied sBTC is rolled forward via a *net* transfer:
equal amounts move zero sBTC, larger pulls only the delta from the
staker, smaller refunds the delta back. Rolling out of a bond into
stx-only (or any path where the new position has no sBTC) refunds
the bond's full sBTC custody.
Contributor
Author
|
I'll merge the latest pox-wf-integration into this, and then also move the integration test after I finish that change in #7223. |
Coverage Report for CI Build 26598194932Coverage decreased (-0.2%) to 85.794%Details
Uncovered Changes
Coverage Regressions4987 previously-covered lines in 77 files lost coverage.
Coverage Stats
💛 - Coveralls |
Contributor
Author
|
This is built on top of #7223, and so includes those changes as well. The diff will shrink once that is merged. |
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.
A pox-5 staker can now move directly from one staking position to the
next with no gap in either signer participation or the STX lock:
register-for-bondstakeregister-for-bondThe STX lock is carried forward in place (amount may go up or down,
unlock height is rescheduled) rather than released and re-acquired.
The bond's custodied sBTC is rolled forward via a net transfer:
equal amounts move zero sBTC, larger pulls only the delta from the
staker, smaller refunds the delta back. Rolling out of a bond into
stx-only (or any path where the new position has no sBTC) refunds
the bond's full sBTC custody.
This change also replaces my previous PRs #7237 and #7238.
The interesting commits are 957b509 and e313078