Add support for PoX-5 and Epoch 4.0#40
Open
radu-stacks wants to merge 11 commits into
Open
Conversation
simone-stacks
left a comment
Contributor
There was a problem hiding this comment.
Great changes, left just two comments
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.
This PR updates hacknet to boot the network in
Epoch 4.0withPoX-5enabled. It buildsstacks-nodeandstacks-signerfrom the PoX waterfall integration commit (STACKS_CORE_BASE_BRANCH), adds the4.0epoch entry to the node configs, and ships a regenerated chainstate archive that already starts past the 4.0 activation height (STACKS_40_HEIGHT, default 262).Stacking
pox5.ts/stacking.ts: PoX-5 stake and stake-update against a per-account signer-manager contract.pox5-signer-manager.clar: minimal signer-manager that grants its signer key and registers with.pox-5.ensurePox5Signerdeploys it once per account and only registers when not already registered.pox5-setup.ts: deploys the PoX-5 prerequisite contracts before 4.0 using a funded deployer key.Bitcoin Staking (opt-in)
New
bitcoin-stakingcompose profile andbitcoin-staking.ts. Waits for.pox-5and signer registration, sets up a protocol bond, mints mock sBTC to the configured participants, and registers them throughregister-for-bond.sBTC is mocked
PoX-5 needs an sBTC token and an sBTC registry, so this PR stubs both instead of running real sBTC:
sbtc-token.clar: a plain fungible token withmint/transfer/get-balance.sbtc-registry.template.clar: returns a configured aggregate pubkey.That covers the PoX-5 bond and staking paths well enough to run them. The deployer key is temporary and goes away once these become boot contracts upstream. Wiring up real sBTC can follow in a later PR if it proves useful.
CI
ci.yml: dry-run on Linux and macOS (Makefile parses, dependency check passes, macOS chainstate extraction), plus a Linux live-run that boots from the archive, waits for liveness, and tears down.Notes
rmso genesis re-runs work on both;cleannow also wipes./docker/chainstate/*.docker-compose.yml:POX_5_DEPLOYER_PRIVATE_KEY,POX_5_SBTC_CONTRACT,POX_5_SBTC_REGISTRY_CONTRACT,POX_5_BOND_ADMIN,POX_5_BOND_ADMIN_PRIVATE_KEY. Changing any of them needs a freshmake genesisand a regenerated archive.