Repository navigation
Restrict explicit wallet output types on P2MR-only chains - #25
Conversation
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 3c301b4. Configure here.
3c301b4 to
3c30f14
Compare
3c30f14 to
4eee323
Compare
PR ReviewFindingsNo blocking findings from this review pass. Consensus Impact
The PR does not change consensus validation itself, but it changes wallet/RPC output selection on restricted-output chains so wallet-created transactions do not produce spendable non-P2MR outputs that consensus later rejects with Review ScopeReviewed issue #19 as the contract, PR #25 body, full diff, surrounding wallet/RPC/spend call paths, changed tests, review timeline, and thread state. The prior bugbot missing-manager error report is resolved and outdated on the latest head. Deep Checks PerformedTraced explicit Issue FitThe PR matches #19: mixed-manager wallets under qbit-Specific ChecksP2MR restricted-output behavior is kept at the wallet/RPC boundary; no AuxPoW, PHOTON, serialization, validation-state, or block-validity code is changed. Lower-level destination guards add defense for direct receive/change calls that bypass RPC parsing. Validation ReviewedAuthor-listed validation includes targeted unit, wallet functional, full wallet unit suite, build targets, and Docker lint. Visible GitHub checks were still pending for many jobs at review time, so I am not treating CI as fully green. Local static checks for this review: Residual RiskFull CI completion is still needed, especially wallet functional/unit jobs and Docker lint. I also did not exercise runtime behavior locally against built binaries; this review is based on static tracing plus the visible test additions. |
* 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
* 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
Fixes #19.
Validation
python3 -m py_compile test/functional/wallet_p2mr.pycmake --build build --target test_qbit qbitd qbit-cli -j 8build/bin/test_qbit --run_test=wallet_tests/WalletOutputAvailabilityRequiresAllowedTypeAndManagerulimit -n 256; build/test/functional/wallet_p2mr.py --configfile build/test/config.iniulimit -n 256; build/bin/test_qbit --run_test=wallet_testsci/lint_imagefile/ci/lint/06_script.shNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Medium Risk
Changes wallet address/change selection and RPC error semantics on restricted chains; behavior shifts for wallets without managers for requested types, but defaults and existing P2MR-only flows are covered by new tests.
Overview
Wallet output types must now be both chain-allowed and backed by a script-pubkey manager; availability is no longer satisfied by chain policy alone when the wallet lacks that manager.
RPC and startup split failures into “not available on this chain” vs “not available in this wallet,” and wallet load validates
-addresstype/-changetypethrough shared init helpers. Receive/change paths (GetNewDestination,ReserveDestination) reject disallowed chain types before P2MR activation checks.Unit/fuzz coin-selection fixtures run regtest with
-p2mronly=0so BECH32 tests still work.wallet_p2mr.pyadds mixed-manager coverage (startup config, addresses, change, fundrawtransaction, PSBT). CI BuildKit helper setsLC_ALL=Cfor consistent locale.Reviewed by Cursor Bugbot for commit e9cf2ac. Bugbot is set up for automated code reviews on this repo. Configure here.