feat: seamless rollovers between bond and stx-only staking positions#7249
feat: seamless rollovers between bond and stx-only staking positions#7249brice-stacks wants to merge 13 commits into
Conversation
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.
|
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 |
|
This is built on top of #7223, and so includes those changes as well. The diff will shrink once that is merged. |
|
hmmm... looks like I may have messed something up with the last merge, causing errors in the new integration tests. Fixing now. |
Use the improved structure merged in from the upstream branch.
Increase default readonly read limit and adjust the cycle length in the integration test.
c27b59c to
4fd5c49
Compare
|
My new test, |
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