-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Move external signer out of wallet module #21467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
19b30f3
to
5eaf0d9
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, 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. |
5eaf0d9
to
cafc7d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. While you're moving this around, could you also pull in a change similar to fanquake@42228d7. Note there are changes other than whitespace & formattting.
cafc7d2
to
a1991f4
Compare
@fanquake done |
src/wallet/rpcwallet.cpp
Outdated
"walletdisplayaddress", | ||
"Display address on an external signer for verification.\n", | ||
return RPCHelpMan{"walletdisplayaddress", | ||
"\nDisplay address on an external signer for verification.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think the leading and trailing newlines should be the responsibility of RPCHelpMan. Also, they wouldn't make sense if the help is exported as json.
src/wallet/rpcwallet.cpp
Outdated
if (!wallet) return NullUniValue; | ||
CWallet* const pwallet = wallet.get(); | ||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: For new code it would be good to use properly clang-formatted code. Any reason to make a change to move away from clang-formatted code?
@Sjors I discussed with @MarcoFalke, and given there isn't currently a correct |
a1991f4
to
1f6b367
Compare
@fanquake done (I think) @MarcoFalke wrote:
I left out the newline characters. |
a7b9a42
to
8b0c553
Compare
8b0c553
to
fdab2d0
Compare
After rebase the command
Not sure what I'm doing wrong here... @MarcoFalke? |
fdab2d0
to
80ed396
Compare
This commit moves the ExternalSigner class and RPC methods out of the wallet module. The enumeratesigners RPC can be used without a wallet since bitcoin#21417. With additional modifications external signers could be used without a wallet in general, e.g. via signrawtransaction. The signerdisplayaddress RPC is ranamed to walletdisplayaddress because it requires wallet context. A future displayaddress RPC call without wallet context could take a descriptor argument. This commit fixes a rpc_help.py failure when configured with --disable-wallet.
An earlier version of bitcoin#16546 used both --with-boost-process and --enable-external-signer, which was simplified to only use the latter. However I forgot to update CI, so the external signer tests were not run.
80ed396
to
88d4d5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 88d4d5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requested changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 88d4d5f
c8f469c external_signer: remove ExternalSignerException (fanquake) 9e0b199 external_signer: use const where appropriate (fanquake) aaa4e5a wallet: remove CWallet::GetExternalSigner() (fanquake) 06a0673 external_signer: remove ignore_errors from Enumerate() (fanquake) 8fdbb89 refactor: unify external wallet runtime errors (fanquake) f4652bf refactor: add missing includes to external signer code (fanquake) 54569cc refactor: move all signer code inside ENABLE_EXTERNAL_SIGNER #ifdefs (fanquake) Pull request description: These are a few followups after #21467. ACKs for top commit: Sjors: tACK c8f469c instagibbs: utACK c8f469c Tree-SHA512: 3d5ac5df81680075e71e0e4a7595c520d746c3e37f016cf168c1e10da15541ebb1595aecaf2c08575636e9ff77d499644cae53180232b7049cfae0b923106e4e
In addition, this PR enables external signer testing on CI.
This PR moves the ExternalSigner class and RPC methods out of the wallet module.
The
enumeratesigners
RPC can be used without a wallet since #21417. With additional modifications external signers could be used without a wallet in general, e.g. viasignrawtransaction
.The
signerdisplayaddress
RPC is ranamed towalletdisplayaddress
because it requires wallet context. A futuredisplayaddress
RPC call without wallet context could take a descriptor argument.This commit fixes a
rpc_help.py
failure when configured with--disable-wallet
.