Repository navigation
Conversation
…xture The fixture headers used bits 0x0f00ffff with nonce 1 and 2, which no hash meets. verifychain level 4 replays them through connect, and connect now checks proof of work (blvm-consensus criticals/connect-pow), so the replay rejected genesis. Set regtest bits and grind the nonce; valid headers pass with or without that change.
This was referenced Oct 21, 2026
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.
What
This is the companion to the blvm-consensus PoW fix (
fix(consensus): reject a block whose hash is above its target on connect).test_verify_chain_level4_with_undo_logsbuilds its genesis and block 1 withbits: 0x0f00ffffand nonce 1 and 2. No hash meets that target. verifychain level 4 replays those blocks through connect with the ancestor lookup, and once connect checks proof of work it rejects them:This PR gives the fixture regtest bits (
0x207fffff) and grinds the nonce (mine_regtest, about 2 tries per header). Headers that meet their target pass with or without the consensus change. Only test code changes.Evidence
blockchain_rpc_testshad 3 passed and 1 failed, the failure shown above. It was the only failure in the full node suite (3018 passed).cargo test --test blockchain_rpc_testshas 4 passed and 0 failed.cargo fmt --all -- --check: clean.Merge order
This can go in before or after the consensus PR. It must be in before node CI builds against a consensus that includes the PoW check.
Review notes: merge order and open decisions (BLVM criticals set)
This PR is one of 7 fixing the four criticals from the BLVM three-lens review:
blvm-consensus#22 (undo log), blvm-consensus#23 (PoW vs target), blvm-node#32 (PoW test fixture), blvm-primitives#2 (min chainwork), blvm-node#31 (assume-valid), blvm-secp256k1#1 (no CUDA by default), blvm#10 (release build + no-CUDA check).
Merge order
consensus_config_default.json, or its test fails.cargo update -p blvm-secp256k1in blvm, then cut a release with blvm#10. v0.1.63 and v0.1.64 stay broken (need libcudart) until then.Decisions for the reviewer
Known, not fixed here:
-assumevalid=<hash>CLI parses the hash in the wrong byte order; the GHCR image ships a different binary (blvm 0.1.0).