mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
wallet: avoid global access in external signer SPKM #35429
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!35429
Loading…
Reference in a new issue
No description provided.
Delete branch "wallet-external-signer-no-globals"
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?
This PR removes direct access to process-wide state from
ExternalSignerScriptPubKeyMan.Instead of reading
gArgs/Params()from theSPKM, the wallet load/setup path now reads the external signer command and chain once, stores them onCWallet, and passes the narrow values into the external signer SPKM.This keeps argument and chain selection at the wallet boundary and makes the SPKM less coupled to global state.
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.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
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.
🐙 This pull request conflicts with the target branch and needs rebase.
Ping for rebase @w0xlt
Are you still working on this?
🔵 Suggestion · Signer configuration has independent wallet and SPKM copies
Independent wallet and SPKM copies require extra factory parameters and leave address display and signing reading configuration from different owners.
Location:
src/wallet/external_signer_scriptpubkeyman.h:21(head).🔵 Suggestion · Tests miss reload-path command propagation and chain forwarding
The reload-path command gap is fixed: test_disconnected_signer now asserts "No external signers found". Chain forwarding is still untested. mocks/signer.py ignores --chain, and the new unit test only checks CWallet fields on a non-signer wallet, so a wrong SPKM chain would go unnoticed.
Location:
test/functional/mocks/signer.py:74(head).Review coverage was incomplete.
Reviewed:
d28c185d275b· Full review report · Previous reportspermalink
@sedited Still on it, thanks for the ping!
Rebased, conflicts resolved, and tests strengthened. Ready for review.