Repository navigation
Cover P2MR SIGHASH_SINGLE missing outputs - #57
Merged
Merged
Conversation
kiwidream
force-pushed
the
p2mr-sighash-single-missing-output
branch
from
June 29, 2026 19:12
0a51c4d to
fdf83e4
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.
Reviewed by Cursor Bugbot for commit fdf83e4. Configure here.
kiwidream
force-pushed
the
p2mr-sighash-single-missing-output
branch
from
June 30, 2026 01:00
8ef832c to
8b2e42d
Compare
djh58
self-requested a review
June 30, 2026 13:53
djh58
previously approved these changes
Jun 30, 2026
kiwidream
force-pushed
the
p2mr-sighash-single-missing-output
branch
from
June 30, 2026 14:51
8b2e42d to
8f8fbc0
Compare
djh58
previously approved these changes
Jun 30, 2026
kiwidream
force-pushed
the
p2mr-sighash-single-missing-output
branch
2 times, most recently
from
July 2, 2026 13:51
4a7af70 to
5a2b1a6
Compare
Member
Author
|
Expediting merge for 0.1.2 release |
kiwidream
force-pushed
the
p2mr-sighash-single-missing-output
branch
from
July 2, 2026 16:49
5a2b1a6 to
b19a676
Compare
djh58
pushed a commit
that referenced
this pull request
Jul 2, 2026
* 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
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.

Summary
SIGHASH_SINGLEcases.OP_CHECKSIGPQCaccepts a valid fixed P2MRSIGHASH_SINGLEspend.SIGHASH_SINGLErejects withSCRIPT_ERR_P2MR_SIG_HASHTYPE, includingANYONECANPAYvariants.SignatureHashP2MR(... MissingDataBehavior::FAIL)failure so the test guards against legacyuint256::ONEbehavior.Fixes #48
Validation
git diff --checkcmake -B build -DWITH_USDT=OFF -DBUILD_TESTS=ONcmake --build build --target test_bitcoin -j2build/bin/test_qbit --run_test=script_p2mr_tests --catch_system_error=no --log_level=test_suitebuild/bin/test_qbit --run_test=script_p2mr_tests/p2mr_checksigpqc_accepts_independent_sighash_single_matched_output --catch_system_error=no --log_level=test_suitebuild/bin/test_qbit --run_test=script_p2mr_tests/p2mr_checksigpqc_rejects_independent_sighash_single_missing_output --catch_system_error=no --log_level=test_suitebitcoin-linterimage fromci/lint_imagefileNote: local CMake configuration used
WITH_USDT=OFFbecause the dev preset could not find USDT headers on this machine.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Test and fixture-only changes; no production interpreter or sighash logic modified in this diff.
Overview
Adds four independent P2MR PQC witness vectors for
SIGHASH_SINGLE(andANYONECANPAYvariants) when the signed input index has no matching transaction output—emptyvoutor index past the last output. Those fixtures setexpectedError:P2MR_SIG_HASHTYPEand deliberately omitp2mrSigMsg/p2mrSighashbecause P2MR fails before a digest is defined.The vector generator gains
missing_output_vector_specs,build_missing_output_vector, and a sharedbuild_spent_outputshelper;build_vectoruses the helper for spent outputs.script_p2mr_testslearns to parseexpectedError, treats sighash fields as optional on failure vectors, skips the “accepts” loop for them, and addsp2mr_checksigpqc_rejects_independent_sighash_single_missing_output, which assertsSignatureHashP2MRfails and spend verification returnsSCRIPT_ERR_P2MR_SIG_HASHTYPE(not legacyuint256::ONEbehavior).Reviewed by Cursor Bugbot for commit b19a676. Bugbot is set up for automated code reviews on this repo. Configure here.