[Consensus] Fresh testnet6 chain with new genesis and spork key - #2982
Open
Liquid369 wants to merge 7 commits into
Open
[Consensus] Fresh testnet6 chain with new genesis and spork key#2982Liquid369 wants to merge 7 commits into
Liquid369 wants to merge 7 commits into
Conversation
Old nonce never met the target for the April 30 timestamp so the genesis assert aborted on startup, remined with the same timestamp.
hashTarget held a reference to a temporary, so the miner ended up comparing the hash against itself and instantly submitting invalid blocks in a loop. Take it by value.
All at 201 meant the chain never crossed an upgrade boundary. Block version is gated per upgrade and the stake modifier changes at POS_V2, so none of it got exercised. Spread from 201 to 700.
Testnet was still on LLMQ_400_60, which needs 300 masternodes before a quorum forms. Testnet has nowhere near that so chainlocks could never form at all. LLMQ_50_60 needs 40, which a testnet fleet can actually reach.
Fuzzbawls
approved these changes
Jul 31, 2026
|
Clean build |
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.
Starts testnet over as testnet6. The old testnet had drifted far enough that a
clean chain was easier than patching it, and we want somewhere to put v6.0
through its paces before it goes anywhere near mainnet.
What's here:
51474. Fixed seeds cleared and vSeeds emptied.
testnet, so the chain is a normal PoS network almost immediately and there's a
decent window of v5 rules before the upgrade to v6.
arith_uint256& hashTarget = arith_uint256().SetCompact(pblock->nBits);SetCompact returns *this so it compiles, but the temporary dies at the end of
the statement and the stack slot gets reused by the hash computed on the next
line. So
hash <= hashTargetends up comparing the hash against itself, findsa "solution" at nNonce 0 every time, and CheckProofOfWork throws it out as
high-hash. The miner spins on that as fast as it can. On a test fleet it wrote
over 100GB of rejects per node in a few hours and filled the disks. Taking the
target by value fixes it.
Tested on 60 nodes across 10 hosts with mixed IPv4, IPv6 and Tor. All come up
on the new genesis, peer, and mine.
I can remove the miner commit if needed, but felt necessary because I was testing everything and it came up.