Repository navigation
test: add P2MR PQC codeseparator vectors - #56
Conversation
dcaa33d to
0a26ca4
Compare
PR ReviewFindingsNo blocking findings from this review pass. Consensus Impact
This does not modify production consensus, script, wallet, or P2P behavior. It does change fixed P2MR Review ScopeReviewed PR 56 ( Deep Checks PerformedTraced the Rust generator’s manually serialized P2MR sighash message through prevouts, spent amounts/scripts, sequences, outputs, leaf hash, key version, and codeseparator position. Checked that the C++ tests hash pinned raw Issue FitThis matches issue #49. The fixture now has four entries: default, leading codeseparator position qbit-Specific ChecksThe reviewed surface is limited to P2MR/PQC test coverage and contrib generation tooling. The generator avoids qbit wallet/signing/sighash helpers for transcript construction and only uses libbitcoinpqc for key generation/sign/verify. No AuxPoW, ASERT, wallet persistence, RPC, GUI, PHOTON, release signing, or P2P behavior is touched. Validation ReviewedLocally ran:
CI reviewed: Core Checks passed, including build smoke, functional smoke, and focused unit suites. The focused unit log shows Residual RiskI did not run the C++ unit binary locally because there was no ready build tree in the review worktree. This review also does not mark the PR fully validated until the pending Full Validation and Required Merge Gate jobs finish successfully. |
0a26ca4 to
09a4f40
Compare
09a4f40 to
57cd932
Compare
b4d1863 to
40f4397
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 40f4397. Configure here.
9168195 to
3c98c5b
Compare
|
Expediting merge for 0.1.2 release |
* Accept legacy AuxPoW RPC payloads (#23) * Prevent AuxPoW signalling in permissionless GBT (#22) * wallet: defer P2MR getnewaddress keypool refill (#13) * wallet: defer P2MR getnewaddress keypool refill * wallet: bound internal P2MR keypool refill * wallet: align P2MR top-up lock ordering * wallet: schedule raw change P2MR refills * wallet: report paused P2MR refills as failed * wallet: log inline P2MR refill failures * ci: fix BuildKit helper lint * Document AuxPoW commitment order fields (#35) * Restrict explicit wallet output types on P2MR-only chains (#25) * Restrict explicit wallet output types * test: run BECH32 wallet suites on unrestricted regtest * fuzz: run wallet transaction target on unrestricted regtest * Fix BuildKit helper lint * Report missing wallet output managers accurately * Allow managerless wallets with default output options * test: add independent P2MR and CTV script vectors (#29) * Add independent P2MR PQC witness vector tests (#30) * test: add independent P2MR PQC witness vector * test: verify P2MR wrong-domain vector signature * Fix AuxPoW legacy payload disambiguation * wallet: avoid MarkUnused P2MR full top-up (#31) * wallet: avoid MarkUnused P2MR full top-up * wallet: avoid MarkUnused lock inversion * wallet: preserve P2MR recovery lookahead * Split P2MR wallet unit tests (#52) * Remove unused P2MR wallet test import (#58) * Shard P2MR wallet unit tests (#60) * Add independent CHECKDATASIGPQC vector tests (#38) * test: add P2MR data-hash proof fixtures (#43) * test: add independent P2MR commitment vectors (#47) * Reject invalid raw funding outputs (#37) * Validate witness-pruned assumevalid before wipe (#59) * Add independent CHECKDATASIGADDPQC vector tests (#42) * qt: recommend wallet encryption by default (#62) * Verify libbitcoinpqc tagged subtree imports (#41) * ci: verify libbitcoinpqc tagged subtree imports * ci: handle peeled libbitcoinpqc tag refs * ci: peel libbitcoinpqc tag objects before compare * ci: pass auth to libbitcoinpqc verifier * ci: pin libbitcoinpqc verifier inputs * ci: verify libbitcoinpqc import tree * Add P2MR PQC annex sighash vectors (#54) * Add P2MR PQC annex sighash vectors * Guard annex mutation vector test * Add P2MR data signature support to Qt Sign/Verify (#63) * qt: add P2MR data signature dialog * qt: support text data in P2MR signatures * qt: align P2MR proof verification with RPC * test: add P2MR CHECKSIGPQC sighash vectors (#55) * Add rawmr future-leaf coverage (#64) * test: cover P2MR SIGHASH_SINGLE missing outputs (#57) * test: add P2MR PQC codeseparator vectors (#56) * Fix PQC data-hash counter accounting (#46) * Fix PQC data-hash counter accounting * Fix PQC data-hash leaf error priority * Report final PQC slot failures as exhausted * doc: add v0.1.2-testnet4 release notes * build: bump version to v0.1.2-testnet4

Summary
OP_CHECKSIGPQCwitness vectors.Root Cause
Issue #49 identified that the existing fixed vector only covered the default
0xffffffffcodeseparator position, while the runtime already serializesm_codeseparator_pos. That left no independent fixture coverage for digest changes caused byOP_CODESEPARATOR.Verification
ci/lint_imagefilecmake --build build --target test_bitcoin -j 8cargo fmt --manifest-path contrib/testgen/p2mr_checksigpqc_vectors/Cargo.toml -- --checkcargo check --manifest-path contrib/testgen/p2mr_checksigpqc_vectors/Cargo.tomlcargo run --manifest-path contrib/testgen/p2mr_checksigpqc_vectors/Cargo.toml -- src/test/data/p2mr_pqc_witness_vectors.json./build/bin/test_qbit --run_test=script_p2mr_tests --log_level=errorFixes #49
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Test-only changes (generator, fixture JSON, and script unit tests); no consensus or production signing path is modified.
Overview
Adds independent P2MR
OP_CHECKSIGPQCwitness coverage forOP_CODESEPARATORpositions, which the prior fixture only exercised at the default0xffffffff.A new Rust tool under
contrib/testgen/p2mr_checksigpqc_vectorsbuilds P2MRSighash and spend data outside qbit’s wallet/sighash helpers, signs with libbitcoinpqc, and merges regenerated entries intop2mr_pqc_witness_vectors.jsonby vector name. Three new cases cover a leading codesep leaf, and IF/ELSE branch spends with different positions on the same leaf script.script_p2mr_tests.cppnow loadscodeSeparatorPositionand wrong-codesep fields, threadsm_codeseparator_posthroughBuildExecData, allows optional witness stack items between signature and leaf/control, and asserts sighash/signature behavior plus near-miss rejections (wrong codesep sig, cross-branch signatures).Reviewed by Cursor Bugbot for commit 3c98c5b. Bugbot is set up for automated code reviews on this repo. Configure here.