Skip to content

[Consensus] Fresh testnet6 chain with new genesis and spork key - #2982

Open
Liquid369 wants to merge 7 commits into
PIVX-Project:masterfrom
Liquid369:2026_testnet6
Open

[Consensus] Fresh testnet6 chain with new genesis and spork key#2982
Liquid369 wants to merge 7 commits into
PIVX-Project:masterfrom
Liquid369:2026_testnet6

Conversation

@Liquid369

Copy link
Copy Markdown
Member

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:

  • New genesis and new message start bytes. Port stays
    51474. Fixed seeds cleared and vSeeds emptied.
  • v6.0 activation at block 5000. Everything before it stays at 201 like the old
    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.
  • New spork key. General housekeeping with new team, new testnet, new controls.
  • Fix for a PIVXMiner bug that made PoW mining impossible.

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 <= hashTarget ends up comparing the hash against itself, finds
a "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.

Liquid369 and others added 7 commits July 9, 2026 18:36
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 Fuzzbawls added this to the 6.0.0 milestone Jul 27, 2026

@Fuzzbawls Fuzzbawls left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ebc6453

@RainDeveloper69

Copy link
Copy Markdown

Clean build
Node starts correctly
New Testnet6 genesis is recognized
RPCs are working
LLMQ threads initialize correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants