⚠ Stacks 2.4 and Testnet Reorg

Good news 2.4.0.0.0 :rocket: is out and set to activate at block #791551 on mainnet, you can track the exact time of activation here. More context here.

Please note that the Stacks 2.4 Testnet activation height occurred before the finalized SIP-024 updates and release of the stacks-node versioned 2.4.0.0.0. The final 2.4.0.0.0 node is incompatible with the version that was running on testnet last week during 2.4 activation, this means that the Stacks testnet will undergo a deep reorg when 2.4.0.0.0 is released.

What this means to you:

Blocks mined after testnet BTC block 2,432,545 will all be considered invalid by 2.4.0.0.0 nodes and upgrading Testnet to the 2.4.0.0.0 release will require resetting your node to a chainstate snapshot from before that height.
Nodes will recognize that an affirmed PoX anchor block is missing, but should recover automatically.

We will be resetting the Stacks Testnet to a chainstate before 2,432,545 as we upgrade to 2.4.0.0.0.
You can follow the progress on testing for 2.4 here

PS: This only affects Testnet, 2.4 hasn’t yet been activated on mainnet.

Update:
The stacks-node currently doesn’t seamlessly recover from the unexpectedly absent PoX anchor blocks in testnet, so it needs to apply affirmation map overrides using the overrides table:

echo 'INSERT INTO overrides (reward_cycle, affirmation_map) VALUES (413, "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnppnnnnnnnnnnnnnnnnnnnnnnnnpppppnnnnnnnnnnnnnnnnnnnnnnnpppppppppppppppnnnnnnnnnnnnnnnnnnnnnnnppppppppppnnnnnnnnnnnnnnnnnnnppppnnnnnnnnnnnnnnnnnnnnnnnppppppppnnnnnnnnnnnnnnnnnnnnnnnppnppnnnnnnnnnnnnnnnnnnnnnnnppppnnnnnnnnnnnnnnnnnnnnnnnnnppppppnnnnnnnnnnnnnnnnnnnnnnnnnppnnnnnnnnnnnnnnnnnnnnnnnnnpppppppnnnnnnnnnnnnnnnnnnnnnnnnnnpnnnnnnnnnnnnnnnnnnnnnnnnnpppnppppppppppppppnnppppnpa");' | sqlite3 ./xenon/burnchain/burnchain.sqlite
and

echo 'INSERT INTO overrides (reward_cycle, affirmation_map) VALUES (414, "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnppnnnnnnnnnnnnnnnnnnnnnnnnpppppnnnnnnnnnnnnnnnnnnnnnnnpppppppppppppppnnnnnnnnnnnnnnnnnnnnnnnppppppppppnnnnnnnnnnnnnnnnnnnppppnnnnnnnnnnnnnnnnnnnnnnnppppppppnnnnnnnnnnnnnnnnnnnnnnnppnppnnnnnnnnnnnnnnnnnnnnnnnppppnnnnnnnnnnnnnnnnnnnnnnnnnppppppnnnnnnnnnnnnnnnnnnnnnnnnnppnnnnnnnnnnnnnnnnnnnnnnnnnpppppppnnnnnnnnnnnnnnnnnnnnnnnnnnpnnnnnnnnnnnnnnnnnnnnnnnnnpppnppppppppppppppnnppppnpaa");' | sqlite3 ./xenon/burnchain/burnchain.sqlite

Should be sufficient to get the stacks-node to ignore the relevant invalidated anchor blocks.

More Context

1 Like

For anyone needing to reset their testnet nodes, Hiro provides an archive service to quickly restore from a recent chainstate snapshot: Overview | Hiro Docs

The re-org was completed on 6/1/2023. It was discovered that a third override was needed.

echo 'INSERT INTO overrides (reward_cycle, affirmation_map) VALUES (415, "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnppnnnnnnnnnnnnnnnnnnnnnnnnpppppnnnnnnnnnnnnnnnnnnnnnnnpppppppppppppppnnnnnnnnnnnnnnnnnnnnnnnppppppppppnnnnnnnnnnnnnnnnnnnppppnnnnnnnnnnnnnnnnnnnnnnnppppppppnnnnnnnnnnnnnnnnnnnnnnnppnppnnnnnnnnnnnnnnnnnnnnnnnppppnnnnnnnnnnnnnnnnnnnnnnnnnppppppnnnnnnnnnnnnnnnnnnnnnnnnnppnnnnnnnnnnnnnnnnnnnnnnnnnpppppppnnnnnnnnnnnnnnnnnnnnnnnnnnpnnnnnnnnnnnnnnnnnnnnnnnnnpppnppppppppppppppnnppppnpaa");' | sqlite3 ./xenon/burnchain/burnchain.sqlite

It is necessary for all testnet nodes to resync either by way of genesis sync or preferably with the snapshot provided below as well as run the minimum Stacks version of 2.4.0.0.0:

https://archive.hiro.so/testnet/stacks-blockchain/testnet-stacks-blockchain-2.4.0.0.0-20230602.tar.gz
or
https://archive.hiro.so/testnet/stacks-blockchain/testnet-stacks-blockchain-2.4.0.0.0-latest.tar.gz

2 Likes