stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 672 forks source link

feat/SIP-029 #5461

Open jcnelson opened 1 week ago

jcnelson commented 1 week ago

This PR implements the proposed emissions schedule in SIP-029. It does so by way of introducing StacksEpochId::Epoch31, and all of the necessary changes therein (e.g. block-commit memo bump, peer version bump, etc.).

This PR moves the coinbase calculation logic into StacksEpochId, and out of StacksChainState. This is done to make epoch-gating slightly easier. It also adds a means by which unit and integration tests can override the coinbase schedule, which will allow us to test it on a shorter timescale with confidence.

I'm opening this against develop because it's backwards-compatible. The rules don't go into effect until Bitcoin height 875,000.

I'm leaving this as a draft until I can get an integration test in place which tests the new coinbase emissions logic.

jcnelson commented 6 days ago

N.B. This will require a block replay test to verify that it works. A genesis sync may be overkill.

will-corcoran commented 6 days ago

This PR will be noted in the "Reference Implementation" section of SIP-029 (here)

aldur commented 4 days ago

Once merged this will close #5446