mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 16:29:39 +00:00
Testnet 5 (BIP95) #35861
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!35861
Loading…
Reference in a new issue
No description provided.
Delete branch "2026-07-t5-draft"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements BIP 95 (Testnet 5). Relative to Testnet 4 it removes the 20-minute minimum-difficulty exception, raises the minimum difficulty, and enforces BIP 54 from block 1. The Genesis block has not been mined yet.
Based on #35793, only the top five commits belong to this PR.
Per the discussion in a recent IRC meeting: since BIP 95 activates BIP 54 from block 1, this depends on #35793 and won't make the v32 feature freeze. So we can review and settle the changes now, but leave this in draft until #35793 lands. Once reviewers are happy with the state of the draft here we can add the Genesis block and the network can get started without being included in a release. We can then ship a patched v32 release with Testnet 5 included. A solo-mining ckpool endpoint is likely being set up and will be advertised here. There are no DNS or fixed seeds yet.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
CheckTxInputsby arejula27)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
LLM Linter (✨ experimental)
Possible places where named args for integral literals may be used (e.g.
func(x, /*named_arg=*/0)in C++, andfunc(x, named_arg=0)in Python):src/kernel/chainparams.cpp:CreateGenesisBlock(testnet5_genesis_msg, testnet5_genesis_script, 1794632593, 0x653d9131, 0x1a0fffff, 0x2230c000, 50 * COIN)src/test/bip54_tests.cpp:AddCoins(coins, CTransaction(tx_create), 0, false)src/test/bip54_tests.cpp:Coin(spent_txo, 0, false)Possible places where comparison-specific test macros should replace generic comparisons:
test/functional/data/invalid_txs.py:assert len(tx.serialize_without_witness()) == 63→ Preferassert_equal(len(tx.serialize_without_witness()), 63).test/functional/data/invalid_txs.py:assert MIN_STANDARD_TX_NONWITNESS_SIZE - 1 == 64→ Preferassert_equal(MIN_STANDARD_TX_NONWITNESS_SIZE - 1, 64).2026-11-22 11:23:43
🚧 At least one of the CI tasks failed.
Task
iwyu: https://github.com/bitcoin/bitcoin/actions/runs/30713233158/job/91404317894LLM reason (✨ experimental): CI failed because IWYU (include-what-you-use) reported a failure and forced the job to exit with “Failure generated from IWYU.”
Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
🐙 This pull request conflicts with the target branch and needs rebase.
This clashes with testnet3's Tor port?
Earlier concerns remain unresolved; see the Run archive linked from the Review report.
🟠 Minor · The future-leaf Taproot vector duplicates the preceding Tapscript spend
The future-leaf case in
bip54_legacy_sigopsrepeats the0xc0witness, leaving0xc2untested and producing a mislabeled duplicate if JSON vectors are exported.Location:
src/test/bip54_tests.cpp:1104(head).🔵 Suggestion · Release notes omit BIP54 compatibility changes outside Testnet5
The release notes omit BIP54's regtest,
getblocktemplate, and mempool compatibility changes; default mainnet mempool acceptance is unchanged.Location:
src/kernel/chainparams.cpp:745(head).🔵 Suggestion · BIP54 sigops rejections lose witness-independent
txidcachingChanging the BIP54 sigops failure from
TX_INPUTS_NOT_STANDARDtoTX_CONSENSUScan cause redundant parent downloads and retained orphans for witness transactions instead of immediately rejecting their children.Location:
src/consensus/tx_verify.cpp:205(head).🔵 Suggestion ·
doc/bips.mdomits the 32.x backport versions for BIP54 and BIP95Both new
doc/bips.mdentries list only v33.0, omitting availability in the intended 32.x backport release, whose exact patch version still needs confirmation.Location:
doc/bips.md:35(head).🔵 Suggestion · BIP54 reorg reinsertion and descendant cleanup lack coverage
Although reinsertion currently looks correct, tests do not verify that disconnecting a valid pre-activation block rejects its over-limit transaction from the mempool and removes descendants under the now-unconditional BIP54 sigops policy.
Location:
src/validation.cpp:894(head).Backport verdict: Needs clarification
I could not establish that this backport matches the upstream originals. It also has target-branch problems that need fixing or justifying. The packet bundles 29 commits that look like two upstream PRs: the BIP 54 implementation (#35793, 22 commits) and Testnet 5 (#35861, 7 commits). None of the commits has a resolved upstream original, so I could not check fidelity, adaptations or omitted dependencies commit by commit. The head is the 32.x release branch (CMakeLists.txt: version 32.1.0, CLIENT_VERSION_IS_RELEASE true). The PR's stated goal is a patched v32 release, but some user-visible changes are not adapted or documented for a point release. Regtest now always enforces BIP 54. As a result, getblocktemplate rejects any client that does not list the 'consensuscleanup' rule, and blocks whose coinbase lacks the nLockTime/nSequence pattern are rejected. Mempool reject reasons change, the BIP 54 sigops limit can no longer be bypassed with -acceptnonstdtxn, and doc/bips.md says 'v33.0' on a 32.x branch. Nothing I read in the code shows a consensus defect for mainnet, testnet3/4 or signet, where the deployment is NEVER_ACTIVE.
Review coverage was incomplete.
Reviewed:
f57b52aeea41· Review report · Previous reportspermalink
Approach ACK
Can we use this PR to also add the bash completation? See
bitcoin-cli.bash.Should we add tests for the restored difficulty behavior?
Maybe also some activation unit tests? Maybe test that block1 has bip54 active?
Ugh, I thought I had taken everything into account but I guess I didn't look at T3 seriously enough. I moved T5 to 18352/18353/18354 (RPC/P2P/onion), so 183N3 scheme that keeps our existing pattern for RPC = P2P-1 and onion = P2P+1 and that testnet3 already follows with N=3. This means we need changes the P2P port in BIP95, so I'll push an update for that. I think the BIP change is fine since there is no other implementation yet and I think there is some value in keeping the pattern in place.
Rebased on v32.1 with the latest state of the BIP 54 pull.
Done
Added two cases: no 20-minute exception on testnet5, and the raised
powLimit.Taken with small tweaks, thanks!
looks pretty good to me right now.
If it was not a draft I would directly ACK it ;)
After https://github.com/bitcoin/bips/pull/2347 expect this to change to something like
Concept ACK
Adapted the Genesis block layout to BIP95 v0.3.0 with @ajtowns suggested height at 975,744. For anyone intersted, this is in roughly 15 hours, if you want to point some hash power at the pool and be part of (testnet) history, here is the relevant information: https://gist.github.com/ajtowns/ebb148819c6028387271e6f0dce5e1da
Also taken out of draft status.
cACK
987ddefe25One minor inconvenience is that the boost tests are mostly comparing against testnet4 and a observer without external/historical context may not understand why.
Params are here:
Also here and here.
For reviewers, the params can be verified here: https://lapis.erisian.com.au/chain.json
Rebased on the latest version of #35793 and added the genesis block from bitcoin/bips#2356. The node can now sync the current chain when you have a node to manually connect to and
-testnet5 -addnode=lapis.erisian.com.au:18353works for now.Achow is already running a seeder that we can commit here so users can relay on.
Note that it has been running for a few hours and it takes time to start returning results.
Also we should update the generate fixed seeds script:
Thanks! I added Ava's seeder in one commit and kept the changes to the fixed seeds script as a separate commit. The reason is the script change didn't work just like that.
generate-seeds.pywould fail becausenodes_testnet5.txtdoesn't exist yet and the user agent filter inmakeseeds.pystops at 31.x currently so it excludes all Testnet5 nodes run 32.x and an empty list doesn't compile oncechainparams.cppuses it.I opted for a complete fix to these issues in the second commit which adds 32.x to the filter, adds
nodes_testnet5.txt(currently 6 addresses) and regenerateschainparamsseeds.hwith that included. The other networks seeds are untouched.I was a bit unsure about this initially and kept it as a separate commit because the filter is usually updated in the seed update before each release and also the list is still extremely small. But the list can be refreshed once this moves closer to merge and I don't see any harm that could be caused by updating the filter now. But if I missed something the commit can also just be dropped for now.
I think the PR description is a bit out of date now. The genesis block was already added ( bitcoin/bips#2356), there is a DNS seed and fixed seeds (
49a44031d2) and the PR is no longer in draft. It could be nice to update .Thanks for working on this! I'm looking forward to finding some time to try mining on it with p2poolv2.
🐙 This pull request conflicts with the target branch and needs rebase.