mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
sign: Remove FillableSigningProvider #35733
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!35733
Loading…
Reference in a new issue
No description provided.
Delete branch "rm-fillablesigningprovider"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
FillableSigningProviderwas initially extracted from the wallet in order to produce theSigningProviderencapsulation 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 intoLegacyDataSPKMwhere the functionality is actually being used to support migrating legacy wallets.The remaining uses are tests and the
bitcoin-txtool, some of which were relying on the implicit addition of segwit scripts when adding a key. However, these can also useFlatSigningProviderwith explicitly adding the segwit scripts when necessary, and have thusly been converted to do so.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.
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:
test_IsStandardinto independent test cases by yuvicc)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
🚧 At least one of the CI tasks failed.
Task
test ancestor commits: https://github.com/bitcoin/bitcoin/actions/runs/29456873744/job/87491882670LLM reason (✨ experimental): CI failed because the build broke under
clangwith-Werror,-Wthread-safety-analysis(missing exclusive lock oncs_KeyStoreinscriptpubkeyman.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.
ACK for the bitcoin-tx changes. Will try to review the remaining parts
Following this function, the maximum script element size condition is being checked
redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZEappropriate for the self-contained bitcoin-tx
The key path works correctly. A helper function would maybe be handy same as the
AddKeyone 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
Signing the transaction
Confirming
The values used were generated from
bitcoin 24.0binary from the commandsIt was thoughtful to remove the check since
pay-to-witness-script-hashdoesn't share the sameMAX_SCRIPT_ELEMENT_SIZElimit as thepay-to-script-hash.The script path works correctly.
bitcoin-tx testing
Creating unsigned transaction
Signing the transaction
Confirming
The values used were generated from
bitcoin 24.0binary from the commandsappropriate for the self-contained bitcoin-tx
🐙 This pull request conflicts with the target branch and needs rebase.
Approach ACK
Built and ran the tests.
AddCScriptrejected 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 withPush value size limit exceeded. Worth keeping the limit for the script the scriptSig pushes? Neither case seems to have a vector inbitcoin-util-test.json.AddKey(k)also answeredGetPubKey()and, for compressed keys, inserted the P2WPKH script P2SH-P2WPKH needs. The currentscript_signcorpus finds both, and with onlyprovider.keysthose lookups start failing. Could the explicit insertionsbitcoin-txdoes be kept here too?For a script over 520 bytes
LoadCScriptreturns true without storing it, whereAddCScriptreturned false. Soadded_scriptcounts a script that was never stored, and the>=branch runs instead of the exact-equality one. 16 compressed keys already reach 547 bytes.Concept ACK 03969968a7dd517c0ae7ba31918ff5244ccb3839 to containerise the codepath related to legacy wallets while discouraging usage of this seemingly outdated signing provider.
I added a commit to enforce this in signing.
Fixed
Done
🐙 This pull request conflicts with the target branch and needs rebase.
Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive linked from the Review report for their assessments.
🟠 Minor ·
bitcoin-txloses the oversized P2SHredeemScripterrorAlthough signing is best-effort, supplying a P2SH
redeemScriptover 520 bytes now leaves an input unsigned instead of raising the previousbitcoin-txerror.Location:
src/bitcoin-tx.cpp:669(head).🟠 Minor · Oversized P2SH
redeemScripts now produce a misleading missing-key diagnosticFor an unsigned input with a supplied P2SH
redeemScriptover 520 bytes,signrawtransactionwithkeynow 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
ProduceSignaturereturns 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-txvectors miss implicit P2SH-P2WPKH script learningExisting
bitcoin-txsigning 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_scriptsloses its ownership and persistence documentationThe new
m_scriptsdeclaration omits the old distinction between solving material and watch-only ownership, while relocated comments still refer to removedAddCScriptand renamedmapScripts.Location:
src/wallet/scriptpubkeyman.h:183(head).🔵 Suggestion ·
SetupDummyInputsretains an unused, incomplete provider outputThe 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 reportspermalink
🐙 This pull request conflicts with the target branch and needs rebase.
🐙 This pull request conflicts with the target branch and needs rebase.
🐙 This pull request conflicts with the target branch and needs rebase.