PoX-5: Integrate sbtc address calculation#7192
Open
aaronb-stacks wants to merge 4 commits intostacks-network:pox-wf-integrationfrom
Open
PoX-5: Integrate sbtc address calculation#7192aaronb-stacks wants to merge 4 commits intostacks-network:pox-wf-integrationfrom
aaronb-stacks wants to merge 4 commits intostacks-network:pox-wf-integrationfrom
Conversation
* sBTC initial integration with reward-set calculation * expect single miner commit outputs * integration test harness * test overrides for loading information from pox-5 * porting pox-5 iteration code from pre-existing impl, NOT testable without initial PoX-5
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.
Description
This implements (and integrates) the new miner commitment scheme for PoX-5.
Leader block commitments now have a single output (rather than 2), using a computed-once-per-cycle P2TR address.
This also includes some porting over of pox-5 signer-set iteration code from the previous PoX-5 approach.
The signer-set iteration code isn't covered by testing. This is because the
pox-5contract has not yet landed in the integration branch when work began here. I don't expect this to be a terribly challenging thing to wire into place when we're ready.The integration testing in this PR avoids needing pox-5 for signer-set calculation by adding test-only overrides, which will be removed when no longer needed.
The SBTC address generation code is covered in integration tests using a configurable contract for fetching the aggregate key. The address generation code is unit tested using fixtures generated from
stacks-sbtc/sbtc's deposit module (see: https://github.com/aaronb-stacks/sbtc-fixtures).I initially implemented the taproot generation by pulling in a bitcoin rust dependency (the same version used by sbtc), and that lives on in a commit in this branch, but the taproot code was simple enough to vendor in to avoid adding a dependency. The crypto code makes me a little nervous, though the fixture coverage should help on that front.