Provider refusals
write_verifier: Provider declined the request because of a cybersecurity restriction. Experiments remain incomplete; static verification can continue.
1 major finding · 3 minor findings · 13 suggestions
Earlier concerns neither republished nor resolved: 1 major finding · 1 minor finding · 4 suggestions. See the Run archive for their assessments.
Findings
[major] · Restored wallets can bypass silent-payment fee-bump protection
Restoring a pre-send backup can let bumpfee add an input while retaining a silent-payment script, so the recipient cannot discover the replacement through normal BIP352 scanning.
Location: src/wallet/feebumper.cpp:272 (head).
Details and suggested fix
A backup taken before an unconfirmed SP send contains neither its m_rbf_needs_sp_outputs flag nor its recipients. Loading requests mempool transactions, and rediscovery calls AddToWallet without the callback that supplies those fields. Consequently, the missing-recipient guard does not fire and the feebumper treats the SP output as a fixed P2TR destination. For a changeless send with a spare confirmed coin, a bump can add that coin while retaining the old script, despite changing the shared-secret derivation. A second wallet with the same descriptors has the same metadata gap. Recovery using the original inputs or an out-of-band tweak is not established here.
Distinguish unknown provenance from a known ordinary payment, and require explicit replacement destinations before adding inputs to such transactions with non-wallet P2TR outputs. This conservative policy also affects ordinary Taproot bumps. Add a backup-before-send regression that restores and attempts an input-adding bump.
[minor] · Coin selection can reject funded silent-payment sends
Wallets containing both eligible and noncontributing coins can receive No silent payment eligible inputs were found. even when a valid input set exists.
Location: src/wallet/spend.cpp:1448 (head).
Details and suggested fix
A sufficient preset P2WSH input makes SelectCoins return that input alone even with add_inputs=true and an eligible wallet coin available. Automatic selection can likewise choose a sufficiently large P2WSH-only pool before trying to mix in a smaller P2TR coin. P2WSH passes the participation check but supplies no shared-secret key, so CreateSilentPaymentsOutputs rejects the selection without a retry. This also affects bumpfee when replacing noncontributing original outputs with SP destinations; default descriptor wallets without these supplemental input types are unaffected. When an actual SP output is needed and additional inputs are allowed, retry with an eligible coin required. Preserve rejection for restricted input sets and the exception where an SP change destination produces no change.
[minor] · Rejected silent-payment requests leave selected coins locked
With lock_unspents=true, successful funding followed by a new SP capability or incomplete-signing error leaves selected coins locked despite the failed request.
Location: src/wallet/rpc/spend.cpp:1360 (head).
Details and suggested fix
send checks psbt=true and add_to_wallet=false after FundTransaction has locked the inputs. fundrawtransaction and walletcreatefundedpsbt reject SP change_address at the same late stage. The new incomplete-signing error in FinishTransaction also follows locking in both send and sendall. These nonpersistent locks keep coins out of automatic selection until cleared with lockunspent or a restart. Reject unsupported combinations after parsing but before funding, and roll back newly acquired locks when signing fails. Add assertions that listlockunspent remains unchanged after these rejected requests.
[minor] · Identical SP resends violate Assume(new_tx)
Repeating a deterministic send reaches Assume(new_tx) with new_tx=false, aborting builds configured to enforce assumptions; ordinary release builds are unaffected by this resend.
Location: src/wallet/rpc/spend.cpp:1363 (head).
Details and suggested fix
Use one explicit input, an explicit locktime and fee_rate, and no change, for example by subtracting the fee from the full input amount. Repeating that SP send rebuilds the same txid because preset-input retrieval does not reject the spent wallet output. AddToWallet finds the existing entry and invokes the callback with new_tx=false, contradicting the new assumption. No production scenario beyond a deliberate identical resend was identified. Handle existing transactions explicitly and persist supplied sprecipients before writing their flag; the existing-entry Update path currently writes only transaction metadata.
Optional improvements
[suggestion] · Downgrade sentinel affects change selection and RPC metadata
On downgrade to code with the comparison-base replacement handling, the sentinel excludes unconfirmed SP change from default selection and appears as a nonexistent replaced_by_txid.
Location: src/wallet/transaction.h:304 (head).
Details and suggested fix
The pre-PR implementation reads the sentinel as a real replacement, marks its depth-zero outputs unsafe, and exposes it through gettransaction and listtransactions. Confirmation ends the selection exclusion, but the serialized tag remains for an unreplaced SP transaction, so the misleading RPC field can remain after confirmation. Keep the bump protection, but document this compatibility cost and extend the downgrade test to check unconfirmed change selection and its recovery on confirmation. The current test checks bump refusal and successful re-upgrade only.
[suggestion] · Python SP scanner omits the future-witness transaction exclusion
The functional-test scanner can report a payment in a transaction that BIP352 excludes because an input spends a native witness version above 1.
Location: test/functional/test_framework/bip352.py:58 (head).
Details and suggested fix
get_input_pubkey returns None for a witness-v2 input, and scan merely omits its key while continuing derivation. The production receiver instead returns NOT_ELIGIBLE for the whole transaction. Before aggregating keys, return [] when any prevout is a native witness program with version greater than 1, without excluding witness-v1 P2A. Add a unit case combining an eligible P2WPKH input and a witness-v2 input with an output that would otherwise match.
[suggestion] · SP recipient-data rejection guards lack regression coverage
The new fee-bump tests preserve valid recipient metadata and never exercise the missing-data or output-mismatch guards.
Location: src/wallet/feebumper.cpp:300 (head).
Details and suggested fix
Create a bumpable SP transaction with a spare eligible coin, then test two metadata failures: retain the SP flag while clearing its recipients, and replace its recipients with an unrelated valid destination. Assert the corresponding errors and that no replacement is committed or broadcast. Without these guards, an input-adding bump can retain a stale SP script. Also verify that explicit replacement outputs remain usable without the original recipient data, as intended.
[suggestion] · SP scanning assertions do not check recipient amounts
The end-to-end tests check that each recipient finds an output, but swapping scripts between the 3 BTC and 4 BTC outputs would still pass.
Location: test/functional/wallet_silentpayments_sending.py:145 (head).
Details and suggested fix
CreateTransactionInternal associates generated scripts with vecSend amounts by index, while assert_sp_outputs checks only the number of matches. Map each scanned output key back to its decoded vout and compare its value with the requested recipient amount for sendtoaddress, sendmany, and send. For sendall, check its computed remainder allocation instead of reusing those requested amounts. The existing distinct-amount fixture already supplies a useful negative case.
[suggestion] · Two retained same-scan-key SP outputs are not independently scanned
The shared-scan-key test scans only after dropping one output, leaving recipient-plus-change k numbering without an end-to-end assertion.
Location: src/wallet/spend.cpp:1443 (head).
Details and suggested fix
test_rbf_sp_change_dropped never scans the original two-output SP payment, and test_sp_change_address has only one SP output. Send to the same SP destination as both a recipient and change_address, then assert two matches with the existing scanner. Reload the wallet and force a bump that adds a spare input, checking two matches again. This exercises the recipient-then-change derivation and its reconstruction while avoiding the scanner's lack of label support.
[suggestion] · sendall skipped-SP-coin refusal lacks coverage
The P2WSH-only sweep test does not exercise skipped_silent_payments_ineligible, so silently leaving a forbidden SP input behind would not be caught.
Location: src/wallet/rpc/spend.cpp:1614 (head).
Details and suggested fix
Fund an eligible P2WPKH coin and a tr(<xonly pub>,pk(<priv>)) coin. The latter is spendable through its script path, but SP derivation requires the unavailable output private key, so the SP participation check rejects it. Assert that an automatic SP sendall returns the skipped-coins error rather than sweeping only the P2WPKH coin. Then select that eligible coin explicitly with inputs and verify the allowed sweep using scan_tx.
[suggestion] · rawtr() SP key retrieval has no sending test
The SP tests do not cover the untweaked rawtr() branch of GetPrivKeyForSilentPayments, leaving an accidental tweak or missing branch undetected.
Location: src/wallet/scriptpubkeyman.cpp:1563 (head).
Details and suggested fix
Fund a rawtr(<priv>) coin and spend it alone to an SP address through sendall with explicit inputs. Verify the resulting output with scan_tx. Existing tr() fixtures exercise the internal-key tweaking path, not the ComputeKeyPair(nullptr) branch used here.
[suggestion] · test_eligible_input_types reuses change for later RPCs
Within this fixture, only sendtoaddress spends the funded P2PKH or P2SH-P2WPKH coin; sendmany, send, and sendall instead spend P2WPKH change.
Location: test/functional/wallet_silentpayments_sending.py:253 (head).
Details and suggested fix
create_funded_wallet supplies one coin, and do_send runs sendtoaddress before the other RPCs. For these two input types, the internal descriptor is wpkh, so the first send consumes the named coin and changes the inputs used by every later call. Fund a fresh coin of the named type before each RPC, or use separate wallets, and assert the actual prevout script types. This makes the fixture exercise sendall's separate construction path with the intended inputs.
[suggestion] · RPC help omits SP result shape and sending restrictions
Although scriptPubKey is already optional, validateaddress now accepts SP addresses without script or witness fields, and RPC help does not explain that result or the new sending restrictions.
Location: src/rpc/output_script.cpp:83 (head).
Details and suggested fix
Document that a valid SP address has no fixed output script, so successful validateaddress validation does not imply compatibility with raw-transaction output construction. Update its result descriptions and the affected address and change_address help. Add a release note identifying which wallet RPCs accept SP destinations and their private-key, unlock, full-signing, psbt, and add_to_wallet requirements. These are user-visible capability boundaries, not merely implementation details.
[suggestion] · Qt bump tests miss the SP unlock and export paths
The Qt tests use regular payments and do not cover SP-specific early unlocking, suppressed PSBT export, or recipient-metadata forwarding.
Location: src/qt/walletmodel.cpp:458 (head).
Details and suggested fix
Create an SP transaction through the backend in an encrypted wallet with PSBT controls enabled. Exercise cancellation of the unlock prompt, cancellation of confirmation followed by relocking, and a successful retry that preserves the replacement's recipient data. Assert that unsigned export is not offered for the SP transaction, while retaining a regular-payment case where it is available. The GUI cannot compose SP sends itself, but it can reach this bump path for transactions created through RPC.
[suggestion] · Empty-input SP sweeps report an eligibility error
When confirmation filters leave no inputs, SP sendall reports -4 eligibility failure instead of the existing -6 insufficient-funds error.
Location: src/wallet/rpc/spend.cpp:1638 (head).
Details and suggested fix
sendall derives SP outputs before checking effective_value, so an empty sp_input_coins set produces No silent payment eligible inputs were found. This suggests an input-type problem even when there are no selected coins at all. Handle an empty rawTx.vin with the existing insufficient-funds error before derivation, and restore the corresponding wallet_sendall.py expectations. Keep the eligibility error for nonempty sets containing only noncontributing inputs.
[suggestion] · Oversized sendall fixture is funded twice
The second target adds another 1,600 UTXOs even though the first rejected sweep leaves its oversized input pool untouched.
Location: test/functional/wallet_sendall.py:606 (head).
Details and suggested fix
Move keypoolrefill, the 1,600-output sendmany, and block generation before the loop over remainder targets. Both assertions can then use the same oversized pool, since sendall rejects the transaction before locking or committing inputs. This avoids duplicating fixture construction and making the SP attempt process roughly twice as many inputs.
[suggestion] · SP integration assertions arrive after the behavior they validate
The dedicated SP integration suite arrives after RPC enablement and change-address support, separating those changes from their assertions; the sendall commit already contains some functional coverage.
Location: test/functional/wallet_silentpayments_sending.py:534 at b1ca8673f488 (commit) (commit).
Details and suggested fix
For review flow, move the independent scanner commit eb98f5540929e778896d5ef6ce141779af840da7 before RPC enablement in b712f9d3e84eb179ac8fede690e67c9463460c26. Introduce the basic sending, eligibility, and must-add-to-wallet portions of wallet_silentpayments_sending.py with that enablement commit. Extend them for sendall in c40bd078bc87c2b6d11b5a3421c6db4862995bb2, which already updates wallet_sendall.py, and for SP change in 1f118d03401b003d0038a8b7c944cccaa38c8294. In particular, the latter adds the unsupported-change errors asserted here only in b1ca8673f4887cc13b441939a77228f2d889dc8d. Stage composite helpers accordingly: omit sendall from the earlier do_send, and defer SP-change subcases until change support exists. RBF and reorg cases can remain in the final test commit. This keeps the final tree unchanged while making each enabled behavior locally verifiable in the series.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [minor]: Fee bump can misclassify a fixed Taproot output as silent payment
- [major]: Fee bump can misclassify a duplicate-script output as silent payment
- [suggestion]: Ancestor-funding test repeats without exercising SP funding (earlier report)
- [suggestion]: SP recipient cleanup precedes durable replacement marking (earlier report)
- [suggestion]: An SP recipient without the coin-control flag reaches an abort (earlier report)
- [suggestion]: Dummy-output sizing is separated from its first consumers (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
Silent payments deliberately replace sender–receiver interaction and notification records with receiver-side blockchain scanning. The stated goals include unique payment outputs, no additional transaction footprint, and payments that cannot be linked to the published address by outsiders. The cost is additional scanning work, especially for light clients.
The sender must construct precisely the outputs that the receiver's deterministic scan will discover. A transaction can remain valid Bitcoin while failing this discovery requirement; ordinary signing and broadcast success are therefore insufficient measures of silent-payment delivery.
Recipient addresses are grouped by scan key for shared-secret computation, and receiver discovery is sequential: after finding a match it advances k, but stops when no match exists. A later BIP352 clarification warns that filtering a matched output by wallet policy, such as dust, must not terminate this sequence or subsequent outputs may be missed.
Outputs sharing a scan key are derivationally interdependent even when their spend keys differ. This makes recipient derivation order relevant to reconstruction and makes removal of an output different from merely ignoring it in a wallet UI. It does not establish a requirement to sort the transaction's physical vout order.
The historical silent-payment PSBT proposal identified ordinary PSBTv2 responsibilities as insufficient: output scripts depend on the completed input set, other participants must be able to verify ECDH contributions, and signing must protect the derivation. Its proposed machinery carried scan/spend keys, ECDH shares and DLEQ proofs, and disabled input modification once scripts were computed.
This supplies historical context for treating silent-payment export as more than exporting ordinary Taproot scripts. It also shows that PSBT restrictions in this PR are an implementation boundary, not an inherent BIP352 ban on PSBTs: a separate protocol was proposed to carry and verify the necessary information.