sign: Remove FillableSigningProvider #35733

Open
achow101 wants to merge 7 commits from rm-fillablesigningprovider into master AGit
achow101 commented 2026-07-15 22:53:29 +00:00 (Migrated from github.com)

FillableSigningProvider was initially extracted from the wallet in order to produce the SigningProvider encapsulation system that we use today for the wallet and for providing key material to signing. It's primary user was the legacy wallet, but it was also being used as a convenience in a few other places. Since the legacy wallet is removed, there is no need to keep it around as a separate class. Instead, the things that it was doing can be inlined into LegacyDataSPKM where the functionality is actually being used to support migrating legacy wallets.

The remaining uses are tests and the bitcoin-tx tool, some of which were relying on the implicit addition of segwit scripts when adding a key. However, these can also use FlatSigningProvider with explicitly adding the segwit scripts when necessary, and have thusly been converted to do so.

`FillableSigningProvider` was initially extracted from the wallet in order to produce the `SigningProvider` encapsulation system that we use today for the wallet and for providing key material to signing. It's primary user was the legacy wallet, but it was also being used as a convenience in a few other places. Since the legacy wallet is removed, there is no need to keep it around as a separate class. Instead, the things that it was doing can be inlined into `LegacyDataSPKM` where the functionality is actually being used to support migrating legacy wallets. The remaining uses are tests and the `bitcoin-tx` tool, some of which were relying on the implicit addition of segwit scripts when adding a key. However, these can also use `FlatSigningProvider` with explicitly adding the segwit scripts when necessary, and have thusly been converted to do so.
DrahtBot commented 2026-07-15 22:53:36 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
Concept ACK vicjuma, rkrux
Approach ACK jeanpablojp

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36897 (wallet, migration: Contain all legacy wallet and migration related things in its own subdirectory, namespace, and classes by achow101)
  • #36831 (test: split test_IsStandard into independent test cases by yuvicc)
  • #36794 (test: make script_combineSigs and spends_witness_prog cases independent by alexanderwiederin)
  • #36188 (crypto: plug hardware optimized SHA256 into libsecp256k1's context by furszy)
  • #34520 (refactor: Add nodiscard to functions returning bool+mutable ref by maflcko)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

LLM Linter (✨ experimental)

Possible typos and grammar issues:

  • src/wallet/scriptpubkeyman.cpp: redeemscripts → redeem scripts [misspelling]

2026-11-24 20:08:07

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/35733 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/35733.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/35733#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | Concept ACK | [vicjuma](https://github.com/bitcoin/bitcoin/pull/35733#pullrequestreview-4901065729), [rkrux](https://github.com/bitcoin/bitcoin/pull/35733#issuecomment-5426550343) | | Approach ACK | [jeanpablojp](https://github.com/bitcoin/bitcoin/pull/35733#pullrequestreview-5025284697) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#36897](https://github.com/bitcoin/bitcoin/pull/36897) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36897.svg"></sub> (wallet, migration: Contain all legacy wallet and migration related things in its own subdirectory, namespace, and classes by achow101) * [#36831](https://github.com/bitcoin/bitcoin/pull/36831) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36831.svg"></sub> (test: split `test_IsStandard` into independent test cases by yuvicc) * [#36794](https://github.com/bitcoin/bitcoin/pull/36794) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36794.svg"></sub> (test: make script_combineSigs and spends_witness_prog cases independent by alexanderwiederin) * [#36188](https://github.com/bitcoin/bitcoin/pull/36188) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36188.svg"></sub> (crypto: plug hardware optimized SHA256 into libsecp256k1's context by furszy) * [#34520](https://github.com/bitcoin/bitcoin/pull/34520) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34520.svg"></sub> (refactor: Add [[nodiscard]] to functions returning bool+mutable ref by maflcko) If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. <!--5faf32d7da4f0f540f40219e4f7537a3--> ### LLM Linter (✨ experimental) Possible typos and grammar issues: - `src/wallet/scriptpubkeyman.cpp`: `redeemscripts` → `redeem scripts` [misspelling] <sup>2026-11-24 20:08:07</sup>
DrahtBot commented 2026-07-15 23:51:24 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task test ancestor commits: https://github.com/bitcoin/bitcoin/actions/runs/29456873744/job/87491882670
LLM reason (✨ experimental): CI failed because the build broke under clang with -Werror,-Wthread-safety-analysis (missing exclusive lock on cs_KeyStore in scriptpubkeyman.cpp).

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `test ancestor commits`: https://github.com/bitcoin/bitcoin/actions/runs/29456873744/job/87491882670</sub> <sub>LLM reason (✨ experimental): CI failed because the build broke under `clang` with `-Werror,-Wthread-safety-analysis` (missing exclusive lock on `cs_KeyStore` in `scriptpubkeyman.cpp`).</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
vicjuma (Migrated from github.com) reviewed 2026-08-10 22:24:41 +00:00
vicjuma (Migrated from github.com) left a comment

ACK for the bitcoin-tx changes. Will try to review the remaining parts

ACK for the bitcoin-tx changes. Will try to review the remaining parts
vicjuma (Migrated from github.com) commented 2026-08-10 21:32:37 +00:00

Following this function, the maximum script element size condition is being checked redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE

Following this function, the maximum script element size condition is being checked `redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE`
vicjuma (Migrated from github.com) commented 2026-08-10 22:14:08 +00:00

appropriate for the self-contained bitcoin-tx

appropriate for the self-contained bitcoin-tx
vicjuma (Migrated from github.com) commented 2026-08-10 21:22:58 +00:00

The key path works correctly. A helper function would maybe be handy same as the AddKey one but since we are only using it in a single place, I guess expanding it here may be fine.

bitcoin-tx testing

Creating unsigned transaction

ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest -create \
     in=7dc357e7ba70b0b503c9a12f4a293add0b1d230e08de3cad83e142737746c4b8:1 \
     outaddr=0.9:mmhnpJgEDuPxTmw6Nuu5Ms2xmP21n6XoCi)
ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$

Signing the transaction

ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest "$TX" \
     set=prevtxs:"[{\"txid\":\"7dc357e7ba70b0b503c9a12f4a293add0b1d230e08de3cad83e142737746c4b8\",\"vout\":1,\"scriptPubKey\":\"76a91443dd6b08400c8e763c5e1b8520957e132cac817088ac\",\"amount\":1}]" \
     set=privatekeys:"[\"cNPgXXtoNEkhZd6txFEPQvWMF8gfvyG15JnYxgtrbQgiesHPwERA\"]" \
     sign=ALL)

Confirming

ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ ./bitcoin-cli -regtest testmempoolaccept "[\"$TX\"]" 0
[
  {
    "txid": "96aba7a976963a610c82d8fe5ba0f5da1837d64e875127fc74b3253c2de1b9d9",
    "wtxid": "96aba7a976963a610c82d8fe5ba0f5da1837d64e875127fc74b3253c2de1b9d9",
    "allowed": true,
    "vsize": 191,
    "fees": {
      "base": 0.10000000
    }
  }
]

The values used were generated from bitcoin 24.0 binary from the commands

The key path works correctly. A helper function would maybe be handy same as the `AddKey` one but since we are only using it in a single place, I guess expanding it here may be fine. ### bitcoin-tx testing **Creating unsigned transaction** ```console ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest -create \ in=7dc357e7ba70b0b503c9a12f4a293add0b1d230e08de3cad83e142737746c4b8:1 \ outaddr=0.9:mmhnpJgEDuPxTmw6Nuu5Ms2xmP21n6XoCi) ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ ``` **Signing the transaction** ```console ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest "$TX" \ set=prevtxs:"[{\"txid\":\"7dc357e7ba70b0b503c9a12f4a293add0b1d230e08de3cad83e142737746c4b8\",\"vout\":1,\"scriptPubKey\":\"76a91443dd6b08400c8e763c5e1b8520957e132cac817088ac\",\"amount\":1}]" \ set=privatekeys:"[\"cNPgXXtoNEkhZd6txFEPQvWMF8gfvyG15JnYxgtrbQgiesHPwERA\"]" \ sign=ALL) ``` **Confirming** ```console ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ ./bitcoin-cli -regtest testmempoolaccept "[\"$TX\"]" 0 [ { "txid": "96aba7a976963a610c82d8fe5ba0f5da1837d64e875127fc74b3253c2de1b9d9", "wtxid": "96aba7a976963a610c82d8fe5ba0f5da1837d64e875127fc74b3253c2de1b9d9", "allowed": true, "vsize": 191, "fees": { "base": 0.10000000 } } ] ``` The values used were generated from `bitcoin 24.0` binary from the [commands](https://github.com/vicjuma/pr-35733-used-commands/blob/main/pr-35733.txt)
vicjuma (Migrated from github.com) commented 2026-08-10 21:59:41 +00:00

It was thoughtful to remove the check since pay-to-witness-script-hash doesn't share the same MAX_SCRIPT_ELEMENT_SIZE limit as the pay-to-script-hash.

The script path works correctly.

bitcoin-tx testing

Creating unsigned transaction

ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest -create \
  in=f4e3e878eefc814436f3cf27752bb1896934dcd8fa8663ffd8187e9358d0c03b:0 \
  outaddr=0.9:mwbmunN2ojMDLGWwZJuqPNX3dfyuvNqheF)
ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ 

Signing the transaction

ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest "$TX" \
  set=prevtxs:"[{\"txid\":\"f4e3e878eefc814436f3cf27752bb1896934dcd8fa8663ffd8187e9358d0c03b\",\"vout\":0,\"scriptPubKey\":\"a91417c74210b483bf6dd004660b05b356b6c3aa12dc87\",\"redeemScript\":\"522103804969501e96ed27704e3d82bef2b5ef04a53d80683ea1a4dbbb9d2e63b7e09921034c988b448e0fa6a1fcc09f33a20abf5ab0ca3e393fa717bb251493dd2819412752ae\",\"amount\":1.00000000}]" \
  set=privatekeys:"[\"cTzVvTMsbz75L9mF15FdM6AZWe22EXstSoQGhBGNMjYRjm28N7Yx\",\"cNc7X8u7KCubwor6rsuSMFdNCCEwK2qSkbHv5WFTPDWmBdRNWHgG\"]" \
  sign=ALL)

Confirming

ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ ./bitcoin-cli -regtest testmempoolaccept "[\"$TX\"]" 0
[
  {
    "txid": "6286887e90dfd4aebcbdec8d1949593ce46ed6b0d10a03e8f84db6fe7d52a914",
    "wtxid": "6286887e90dfd4aebcbdec8d1949593ce46ed6b0d10a03e8f84db6fe7d52a914",
    "allowed": true,
    "vsize": 302,
    "fees": {
      "base": 0.10000000
    }
  }
]

The values used were generated from bitcoin 24.0 binary from the commands

It was thoughtful to remove the check since `pay-to-witness-script-hash` doesn't share the same `MAX_SCRIPT_ELEMENT_SIZE` limit as the `pay-to-script-hash`. The script path works correctly. ### bitcoin-tx testing **Creating unsigned transaction** ```console ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest -create \ in=f4e3e878eefc814436f3cf27752bb1896934dcd8fa8663ffd8187e9358d0c03b:0 \ outaddr=0.9:mwbmunN2ojMDLGWwZJuqPNX3dfyuvNqheF) ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ ``` **Signing the transaction** ```console ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ TX=$(./bitcoin-tx -regtest "$TX" \ set=prevtxs:"[{\"txid\":\"f4e3e878eefc814436f3cf27752bb1896934dcd8fa8663ffd8187e9358d0c03b\",\"vout\":0,\"scriptPubKey\":\"a91417c74210b483bf6dd004660b05b356b6c3aa12dc87\",\"redeemScript\":\"522103804969501e96ed27704e3d82bef2b5ef04a53d80683ea1a4dbbb9d2e63b7e09921034c988b448e0fa6a1fcc09f33a20abf5ab0ca3e393fa717bb251493dd2819412752ae\",\"amount\":1.00000000}]" \ set=privatekeys:"[\"cTzVvTMsbz75L9mF15FdM6AZWe22EXstSoQGhBGNMjYRjm28N7Yx\",\"cNc7X8u7KCubwor6rsuSMFdNCCEwK2qSkbHv5WFTPDWmBdRNWHgG\"]" \ sign=ALL) ``` **Confirming** ```console ratedg@0xratedg:~/projects/contributions/bitcoin/build2/bin$ ./bitcoin-cli -regtest testmempoolaccept "[\"$TX\"]" 0 [ { "txid": "6286887e90dfd4aebcbdec8d1949593ce46ed6b0d10a03e8f84db6fe7d52a914", "wtxid": "6286887e90dfd4aebcbdec8d1949593ce46ed6b0d10a03e8f84db6fe7d52a914", "allowed": true, "vsize": 302, "fees": { "base": 0.10000000 } } ] ``` The values used were generated from `bitcoin 24.0` binary from the [commands](https://github.com/vicjuma/pr-35733-used-commands/blob/main/pr-35733.txt)
vicjuma (Migrated from github.com) commented 2026-08-10 22:14:21 +00:00

appropriate for the self-contained bitcoin-tx

appropriate for the self-contained bitcoin-tx
DrahtBot commented 2026-08-18 09:46:06 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
jeanpablojp (Migrated from github.com) reviewed 2026-08-25 23:28:03 +00:00
jeanpablojp (Migrated from github.com) left a comment

Approach ACK

Built and ran the tests.

Approach ACK Built and ran the tests.
jeanpablojp (Migrated from github.com) commented 2026-08-25 23:28:03 +00:00

AddCScript rejected scripts over 520 bytes for both P2SH and P2WSH, but the limit only applies to the script the scriptSig has to push. With a 1-of-16 multisig of 547 bytes, master leaves both inputs unsigned. This branch fixes P2WSH, which now makes it into the mempool, and also signs P2SH, producing a transaction that is consensus-invalid with Push value size limit exceeded. Worth keeping the limit for the script the scriptSig pushes? Neither case seems to have a vector in bitcoin-util-test.json.

`AddCScript` rejected scripts over 520 bytes for both P2SH and P2WSH, but the limit only applies to the script the scriptSig has to push. With a 1-of-16 multisig of 547 bytes, master leaves both inputs unsigned. This branch fixes P2WSH, which now makes it into the mempool, and also signs P2SH, producing a transaction that is consensus-invalid with `Push value size limit exceeded`. Worth keeping the limit for the script the scriptSig pushes? Neither case seems to have a vector in `bitcoin-util-test.json`.
jeanpablojp (Migrated from github.com) commented 2026-08-25 23:28:03 +00:00

AddKey(k) also answered GetPubKey() and, for compressed keys, inserted the P2WPKH script P2SH-P2WPKH needs. The current script_sign corpus finds both, and with only provider.keys those lookups start failing. Could the explicit insertions bitcoin-tx does be kept here too?

`AddKey(k)` also answered `GetPubKey()` and, for compressed keys, inserted the P2WPKH script P2SH-P2WPKH needs. The current `script_sign` corpus finds both, and with only `provider.keys` those lookups start failing. Could the explicit insertions `bitcoin-tx` does be kept here too?
jeanpablojp (Migrated from github.com) commented 2026-08-25 23:28:03 +00:00

For a script over 520 bytes LoadCScript returns true without storing it, where AddCScript returned false. So added_script counts a script that was never stored, and the >= branch runs instead of the exact-equality one. 16 compressed keys already reach 547 bytes.

For a script over 520 bytes `LoadCScript` returns true without storing it, where `AddCScript` returned false. So `added_script` counts a script that was never stored, and the `>=` branch runs instead of the exact-equality one. 16 compressed keys already reach 547 bytes.
rkrux commented 2026-08-26 14:09:17 +00:00 (Migrated from github.com)

Concept ACK 03969968a7dd517c0ae7ba31918ff5244ccb3839 to containerise the codepath related to legacy wallets while discouraging usage of this seemingly outdated signing provider.

Concept ACK 03969968a7dd517c0ae7ba31918ff5244ccb3839 to containerise the codepath related to legacy wallets while discouraging usage of this seemingly outdated signing provider.
achow101 (Migrated from github.com) reviewed 2026-08-26 18:13:39 +00:00
achow101 (Migrated from github.com) commented 2026-08-26 18:13:39 +00:00

I added a commit to enforce this in signing.

I added a commit to enforce this in signing.
achow101 (Migrated from github.com) reviewed 2026-08-26 18:13:48 +00:00
achow101 (Migrated from github.com) commented 2026-08-26 18:13:48 +00:00

Fixed

Fixed
achow101 (Migrated from github.com) reviewed 2026-08-26 18:13:53 +00:00
achow101 (Migrated from github.com) commented 2026-08-26 18:13:53 +00:00

Done

Done
DrahtBot commented 2026-09-09 16:23:24 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
First-time contributor

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive linked from the Review report for their assessments.

🟠 Minor · bitcoin-tx loses the oversized P2SH redeemScript error

Although signing is best-effort, supplying a P2SH redeemScript over 520 bytes now leaves an input unsigned instead of raising the previous bitcoin-tx error.

Location: src/bitcoin-tx.cpp:669 (head).

🟠 Minor · Oversized P2SH redeemScripts now produce a misleading missing-key diagnostic

For an unsigned input with a supplied P2SH redeemScript over 520 bytes, signrawtransactionwithkey now reports a possibly missing key instead of the previous push-size error.

Location: src/script/sign.cpp:685 (head).

🔵 Suggestion · Signing tests do not distinguish early P2SH size refusal from verification failure

A test checking only that ProduceSignature returns false would miss removal of the new guard, because final verification also rejects the oversized push after signatures have been created.

Location: src/script/sign.cpp:684 (head).

🔵 Suggestion · The bitcoin-tx vectors miss implicit P2SH-P2WPKH script learning

Existing bitcoin-tx signing vectors use only P2PKH or native P2WPKH, so they do not exercise the witness-program insertion now performed explicitly for compressed keys.

Location: src/bitcoin-tx.cpp:609 (head).

🔵 Suggestion · The relocated m_scripts loses its ownership and persistence documentation

The new m_scripts declaration omits the old distinction between solving material and watch-only ownership, while relocated comments still refer to removed AddCScript and renamed mapScripts.

Location: src/wallet/scriptpubkeyman.h:183 (head).

🔵 Suggestion · SetupDummyInputs retains an unused, incomplete provider output

The helper now omits the public keys needed to sign its P2PKH outputs, but none of its three callers consumes the provider, making that output parameter unnecessary.

Location: src/test/util/transaction_utils.cpp:50 (head).

Review coverage was incomplete.


Reviewed: 73373d116cd0 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:5cfea17ba7610fa178d67839cc6796a49c08c7f7be4d932c06b37a8bd66e2a40:3329223fb40bbbe44124b0523f0fa08f23650d06836368f60e45a38d2db02971 --> <!-- ralph-base:74f3ed9021e853aa14a402ed0ceef78544c5b4a7 --> <!-- ralph-head:73373d116cd0941b016ae140aaa39905fcef4272 --> <!-- ralph-case:d64bdf5368ad66270b78d7f058e4e4d3bdc38424ac93fe7b052aaedd7694cfac --> Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive linked from the Review report for their assessments. **🟠 Minor · `bitcoin-tx` loses the oversized P2SH `redeemScript` error** Although signing is best-effort, supplying a P2SH `redeemScript` over 520 bytes now leaves an input unsigned instead of raising the previous `bitcoin-tx` error. Location: [`src/bitcoin-tx.cpp:669`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/73373d116cd0941b016ae140aaa39905fcef4272/src/bitcoin-tx.cpp#L669>) (head). **🟠 Minor · Oversized P2SH `redeemScript`s now produce a misleading missing-key diagnostic** For an unsigned input with a supplied P2SH `redeemScript` over 520 bytes, `signrawtransactionwithkey` now reports a possibly missing key instead of the previous push-size error. Location: [`src/script/sign.cpp:685`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/73373d116cd0941b016ae140aaa39905fcef4272/src/script/sign.cpp#L685>) (head). **🔵 Suggestion · Signing tests do not distinguish early P2SH size refusal from verification failure** A test checking only that `ProduceSignature` returns false would miss removal of the new guard, because final verification also rejects the oversized push after signatures have been created. Location: [`src/script/sign.cpp:684`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/73373d116cd0941b016ae140aaa39905fcef4272/src/script/sign.cpp#L684>) (head). **🔵 Suggestion · The `bitcoin-tx` vectors miss implicit P2SH-P2WPKH script learning** Existing `bitcoin-tx` signing vectors use only P2PKH or native P2WPKH, so they do not exercise the witness-program insertion now performed explicitly for compressed keys. Location: [`src/bitcoin-tx.cpp:609`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/73373d116cd0941b016ae140aaa39905fcef4272/src/bitcoin-tx.cpp#L609>) (head). **🔵 Suggestion · The relocated `m_scripts` loses its ownership and persistence documentation** The new `m_scripts` declaration omits the old distinction between solving material and watch-only ownership, while relocated comments still refer to removed `AddCScript` and renamed `mapScripts`. Location: [`src/wallet/scriptpubkeyman.h:183`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/73373d116cd0941b016ae140aaa39905fcef4272/src/wallet/scriptpubkeyman.h#L183>) (head). **🔵 Suggestion · `SetupDummyInputs` retains an unused, incomplete provider output** The helper now omits the public keys needed to sign its P2PKH outputs, but none of its three callers consumes the provider, making that output parameter unnecessary. Location: [`src/test/util/transaction_utils.cpp:50`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/73373d116cd0941b016ae140aaa39905fcef4272/src/test/util/transaction_utils.cpp#L50>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`73373d116cd0`](<https://git.fish.foo/bitcoin/bitcoin/commit/73373d116cd0941b016ae140aaa39905fcef4272>) · [Review report](<https://review.fish.foo/report/35733-73373d116cd0941b016ae140aaa39905fcef4272-3078-4.html>) · [Previous reports](<https://review.fish.foo/traces/35733/>) [permalink](<https://review.fish.foo/report/35733-73373d116cd0941b016ae140aaa39905fcef4272-3078-4.html>)
DrahtBot commented 2026-10-06 00:30:03 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
DrahtBot commented 2026-11-08 13:52:22 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
DrahtBot commented 2026-11-24 17:11:35 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!35733
No description provided.