luke-jr
commented at 10:51 PM on September 13, 2022:
member
This is a minimal "step 1" to migrating wallet RPC methods to access via the abstract interfaces. Only trivial methods are ported at this stage.
Long term goal is to support different actual wallet classes (in particular, core-lighting wallets) which won't have remotely the same internals as Bitcoin Core wallets.
Wallet: Add destIsMine to interfaces::Wallet680a0ac71e
RPC/Wallet: addresses: Convert RPCs to use interfaces::Wallet where simple
getnewaddress, setlabel, and walletdisplayaddress
cfdef6cf27
RPC/Wallet: coins: Convert listlockunspent RPC to use interfaces::Walletf00ce8bcea
RPC/Wallet: encrypt: Convert walletpassphrasechange RPC to use interfaces::Wallet88a1884919
Wallet: Add missing const attribute to interfacescc0a1d565e
RPC/Wallet: Support interfaces::Wallet in EnsureWalletIsUnlockeda1be2b07ce
RPC/Wallet: signmessage: Convert RPC to use interfaces::Wallet9c52aa7ae9
w0xlt
commented at 11:34 PM on September 13, 2022:
contributor
Approach ACK. This provides a better separation of concerns.
S3RK
commented at 7:09 AM on September 14, 2022:
contributor
Can you elaborate on "support different actual wallet classes (in particular, core-lighting wallets)"? I always though of lighting wallets operating on another abstraction layer on-top of bitcoin wallets, i.e. bitcoin wallets abstract the use of the blockchain while lighting wallets make use of that. Thus it seems like lighting wallets should have different interface from bitcoin wallets.
DrahtBot
commented at 9:25 AM on September 14, 2022:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
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.
luke-jr
commented at 11:34 AM on September 14, 2022:
member
Can you elaborate on "support different actual wallet classes (in particular, core-lighting wallets)"? I always though of lighting wallets operating on another abstraction layer on-top of bitcoin wallets, i.e. bitcoin wallets abstract the use of the blockchain while lighting wallets make use of that. Thus it seems like lighting wallets should have different interface from bitcoin wallets.
Wallets in general are at the same abstraction layer. Most interfaces are common whether you're sending/receiving on-chain or Lightning.
ryanofsky
commented at 6:16 PM on September 14, 2022:
contributor
I think this is a good change for a different reason than the one stated. Even if there won't be multiple wallet implementations, letting RPC methods interact with wallets through the interfaces::Wallet class instead of the CWallet class means new RPC methods can avoid accessing internal wallet state just like GUI code avoids it, and new RPC features should be easier to port to the GUI because they can be implemented behind the interface rather than on top of it.
One suggestion I would have is to drop commit "Wallet: Add missing const attribute to interfaces" (cc0a1d565e1aeb9f399a6b406528a80f4d0d0180) from this PR. The interface::Wallet class is an abstract class and the methods it declares are intentionally non-const, because making them const exposes internal implementation details of interface::Wallet subclasses that callers should not be aware of. In practice, it breaks multiprocess support (see #25337 (review), commit e81daff985867bfe88fdef325384dac344eb6aad from #10102). Dropping this would also make the PR more focused and smaller.
S3RK
commented at 6:59 PM on September 14, 2022:
contributor
I think this is a good change for a different reason than the one stated. Even if there won't be multiple wallet implementations, letting RPC methods interact with wallets through the interfaces::Wallet class instead of the CWallet class means new RPC methods can avoid accessing internal wallet state just like GUI code avoids it, and new RPC features should be easier to port to the GUI because they can be implemented behind the interface rather than on top of it.
Agree that having RPC interacting through clear interface is great. Maybe we should discuss the long-term goal "to support different actual wallet classes (in particular, core-lighting wallets)" in some other place.
maflcko referenced this in commit 0cfbb171bd on Sep 24, 2022
sidhujag referenced this in commit 9547d5270a on Sep 25, 2022
DrahtBot added the label Needs rebase on Nov 1, 2022
DrahtBot
commented at 7:27 PM on November 1, 2022:
contributor
<!--cf906140f33d8803c4a75a2196329ecb-->
🐙 This pull request conflicts with the target branch and needs rebase.
bitcoin deleted a comment on Dec 5, 2022
fanquake marked this as a draft on Feb 6, 2023
fanquake
commented at 2:56 PM on February 6, 2023:
member
Moved to draft, as it looks like this needs further discussion, and has needed rebase for 3 months.
DrahtBot
commented at 12:14 AM on May 7, 2023:
contributor
<!--13523179cfe9479db18ec6c5d236f789-->
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
Is it no longer relevant? ➡️ Please close.
Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
DrahtBot
commented at 12:28 AM on August 5, 2023:
contributor
<!--13523179cfe9479db18ec6c5d236f789-->
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
Is it no longer relevant? ➡️ Please close.
Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
maflcko
commented at 9:08 AM on August 8, 2023:
member
DrahtBot
commented at 12:09 AM on November 6, 2023:
contributor
<!--13523179cfe9479db18ec6c5d236f789-->
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
Is it no longer relevant? ➡️ Please close.
Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
maflcko
commented at 9:32 AM on November 6, 2023:
member
Closing for now. Please leave a comment here, to have it re-opened by someone.
maflcko closed this on Nov 6, 2023
PastaPastaPasta referenced this in commit 5426f0afc4 on Feb 29, 2024
PastaPastaPasta referenced this in commit 7167dd3164 on Feb 29, 2024
PastaPastaPasta referenced this in commit 4d676ce788 on Feb 29, 2024
PastaPastaPasta referenced this in commit 185cf8231e on Feb 29, 2024
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me