Repository navigation
Add P2MR data-hash proof fixtures - #43
Conversation
cde2e86 to
adb0c19
Compare
PR ReviewFindingsNo blocking findings from this review pass. Consensus Impact
The diff is test/fixture-only, with no production consensus, wallet signing, or RPC implementation changes. I’m still classifying it as consensus-adjacent because it pins P2MR/PQC proof behavior around Review ScopeReviewed PR #43 against issue #39, the PR body, all five changed files, and the relevant production wallet/RPC/P2MR code paths. The main review targets were Deep Checks PerformedTraced the fixture through the new C++ vector test, wallet Issue FitThe PR satisfies the issue #39 contract: the fixture pins the full signature and proof fields, includes schema versioning, validates fixed hash/tree/address/signature values, passes the pinned proof directly to The functional negatives cover wrong message hash, wrong signature, wrong leaf/pubkey binding, malformed leaf script, wrong address/root commitment, wrong control block, unsupported leaf version, unsupported proof mode, malformed message/signature/pubkey/control sizes, and control-block leaf-version mismatch. qbit-Specific ChecksChecked the P2MR/PQC-specific surfaces: Validation ReviewedReviewed the author’s listed local commands. Locally, I ran Residual RiskI did not locally build or run |
adb0c19 to
d350a41
Compare
d350a41 to
ac9bdd2
Compare
ac9bdd2 to
cdf4fbf
Compare
* 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
QbitDataSigPQCdata-hash domain.SignP2MRDataHashreproduces the pinned proof without changing signing behavior.feature_p2mr.pywith RPC fixture coverage forverifydatapqchash, including negative cases for malformed proof shape, wrong signature/hash/script/root/control block, unsupported leaf version, and unsupported proof mode.Fixes #39.
Validation
cmake --preset dev-mode -DWITH_USDT=OFFcmake --build build_dev_mode --target test_bitcoin -j 8build_dev_mode/bin/test_qbit --run_test=p2mr_datapqchash_testsbuild_dev_mode/bin/test_qbit --run_test=wallet_tests/P2MRDataHashSigningMatchesPinnedProofFixturecmake --build build_dev_mode --target qbitd qbit-cli -j 8ulimit -n 1024 && test/functional/feature_p2mr.py --configfile build_dev_mode/test/config.inipython3 -m json.tool src/test/data/p2mr_datapqchash_vectors.json >/dev/nullpython3 -m py_compile test/functional/feature_p2mr.pygit diff --checkNote:
-DWITH_USDT=OFFwas needed locally because the dev environment is missing USDT headers.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Test-only changes (fixtures and coverage); no node, wallet, or RPC implementation logic is modified.
Overview
Adds a pinned regtest fixture (
p2mr_datapqchash_vectors.json) for theQbitDataSigPQCP2MRp2mr-pubkeydata-hash proof path, wired into the unit test build.C++ coverage recomputes
datasig_hash, two-leaf Merkle root, address, and PQC verify from the vector, and assertsSignP2MRDataHashin the wallet reproduces the same signature and proof fields.Functional tests load that JSON and exercise
verifydatapqchashon the happy path plus negatives (bad signature/message, leaf/address/control mismatch, unsupported leaf version and proof mode, and RPC size/shape errors), ahead of the existing wallet round-trip test.Reviewed by Cursor Bugbot for commit cdf4fbf. Bugbot is set up for automated code reviews on this repo. Configure here.