Building on #10102, this adds an -ipcconnect option to bitcoin-wallet and an -ipcbind option to bitcoin-node (both enabled by default in multiprocess builds) so bitcoin node will listen on a <datadir>/sockets/node.sock unix socket, and bitcoin-wallet will connect to it.
The idea is that bitcoin-wallet can be extended in the future to have some online functionality. For example, there could be a bitcoin-wallet sync command that will update balances and sync latest transactions to an unloaded wallet, or a bitcoin-wallet serve subcommand that loads a wallet and serves RPC requests, or a bitcoin-wallet shell subcommand that allows running RPC methods interactively like the GUI console, or just general support for bitcoin-wallet <rpc method> <rpc params> invocations suggested #13926 (comment).
This PR is small and doesn’t do much. The only visible change is that bitcoin-wallet now checks whether a node socket exists on startup and prints “Connected to IPC address” if it can connect it it.
The default bitcoin-wallet connect option is -ipcconnect=auto, which connects if possible as described above, and proceeds offline if not possible. Other supported options are -noipcconnect to disable ipc, -ipcconnect to require a connection and fail if it can’t be established, and -ipcconnect=unix:<socket> to require a connection and use a custom socket path.
These changes require multiprocess support and this PR has no effect unless bitcoin is configured with --enable-multiprocess as described in doc/multiprocess.md
#25722 (refactor: Use util::Result class for wallet loading by ryanofsky)
#25665 (refactor: Add util::Result failure values, multiple error and warning messages by ryanofsky)
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.
DrahtBot added the label
Needs rebase
on Jul 11, 2020
ryanofsky force-pushed
on Jul 14, 2020
ryanofsky
commented at 1:55 pm on July 14, 2020:
contributor
DrahtBot removed the label
Needs rebase
on Jul 14, 2020
DrahtBot added the label
Needs rebase
on Jul 30, 2020
ryanofsky force-pushed
on Aug 12, 2020
DrahtBot removed the label
Needs rebase
on Aug 12, 2020
DrahtBot added the label
Needs rebase
on Aug 13, 2020
ryanofsky force-pushed
on Aug 28, 2020
DrahtBot removed the label
Needs rebase
on Aug 28, 2020
DrahtBot added the label
Needs rebase
on Aug 31, 2020
ajtowns removed the label
Docs
on Sep 17, 2020
ajtowns removed the label
GUI
on Sep 17, 2020
ajtowns removed the label
P2P
on Sep 17, 2020
ajtowns removed the label
RPC/REST/ZMQ
on Sep 17, 2020
ajtowns removed the label
Tests
on Sep 17, 2020
ryanofsky force-pushed
on Sep 28, 2020
DrahtBot removed the label
Needs rebase
on Sep 28, 2020
ryanofsky force-pushed
on Oct 2, 2020
DrahtBot added the label
Needs rebase
on Oct 27, 2020
ryanofsky force-pushed
on Nov 25, 2020
DrahtBot removed the label
Needs rebase
on Nov 25, 2020
DrahtBot added the label
Needs rebase
on Dec 2, 2020
ryanofsky force-pushed
on Dec 11, 2020
DrahtBot removed the label
Needs rebase
on Dec 11, 2020
DrahtBot added the label
Needs rebase
on Dec 16, 2020
ryanofsky force-pushed
on Dec 18, 2020
DrahtBot removed the label
Needs rebase
on Dec 18, 2020
jonasschnelli
commented at 8:02 am on December 18, 2020:
contributor
Impressive change. Again!
Conceptual I’m not yet convinced.
My understanding is/was that bitcoin-wallet is an offline wallet exploring and manipulation tool without the requirement of a node or online connectivity.
Things that require a node, should IMO go into wallet RPC calls.
But my conceptual understanding might be old and rusty (happy to get convinced).
Things like bitcoin-wallet shell would be nice though. I guess we would just need to make sure the IPC/node option is completely optional and thus the offline functionality (for things that can work offline) is still guaranteed.
Or is this also an attempt to decouple the wallet from the node (in the long run)?
DrahtBot added the label
Needs rebase
on Dec 18, 2020
ryanofsky
commented at 11:34 am on December 18, 2020:
contributor
My understanding is/was that bitcoin-wallet is an offline wallet exploring and manipulation tool without the requirement of a node or online connectivity.
To address any concern here, there’s no thought of changing this. This PR gives bitcoin-wallet tool ability to do online things as well as offline things. It doesn’t require a node or take away the ability to do offline things. Even if you require separate bitcoin-wallet-online-stuff and bitcoin-wallet-offline-only binaries, it only needs build changes not code changes (a new automake entry and src/init/bitcoin-wallet-offline-only.cpp stub)
Make sure to run all tests locally, according to the documentation.
The failure may 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.
DrahtBot added the label
CI failed
on Jul 26, 2024
knst referenced this in commit
3411577473
on Jul 27, 2024
knst referenced this in commit
a7993de34b
on Aug 3, 2024
knst referenced this in commit
aa2d3b8164
on Aug 7, 2024
hebasto added the label
Needs CMake port
on Aug 16, 2024
DrahtBot added the label
Needs rebase
on Aug 28, 2024
maflcko removed the label
Needs CMake port
on Aug 29, 2024
achow101 referenced this in commit
df3f63ccfa
on Sep 9, 2024
ryanofsky force-pushed
on Sep 19, 2024
DrahtBot removed the label
Needs rebase
on Sep 19, 2024
DrahtBot added the label
Needs rebase
on Sep 25, 2024
Add capnp serialization code for bitcoin types
- Add capnp ToBlob, ToArray, Wrap, Serialize, and Unserialize helper functions
- Add support for std::chrono::seconds capnp serialization
- Add support for util::Result capnp serialization
e7619a84bd
Add capnp wrapper for Handler interface76fd4e56c4
Add capnp wrapper for Chain interfacef6c7786c41
multiprocess: Expose Chain interface
Expose Chain interface to external processes spawning or connecting to
bitcoin-node.
64b833854a
ryanofsky force-pushed
on Sep 26, 2024
DrahtBot removed the label
Needs rebase
on Sep 26, 2024
DrahtBot added the label
Needs rebase
on Nov 21, 2024
Add `-ipcconnect` option to `bitcoin-wallet` to allow connecting to a bitcoin
node process over IPC. The `bitcoin-wallet` tool doesn't really do anything with its
connection to the node yet, but it could potentially run or serve RPCs that
require being online.
Example usage:
src/bitcoin-node -regtest -debug -ipcbind=unix
src/bitcoin-wallet -regtest -ipcconnect=unix info
be6795a292
ryanofsky force-pushed
on Dec 6, 2024
DrahtBot removed the label
Needs rebase
on Dec 6, 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: 2024-12-18 12:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me