Skip to content

PoX-5: Integrate sbtc address calculation#7192

Open
aaronb-stacks wants to merge 4 commits intostacks-network:pox-wf-integrationfrom
aaronb-stacks:feat/pox-wf-commits
Open

PoX-5: Integrate sbtc address calculation#7192
aaronb-stacks wants to merge 4 commits intostacks-network:pox-wf-integrationfrom
aaronb-stacks:feat/pox-wf-commits

Conversation

@aaronb-stacks
Copy link
Copy Markdown
Contributor

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-5 contract 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.

* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant