Skip to content

bitcoin-cli: Add -ipcconnect option#32297

Merged
achow101 merged 7 commits intobitcoin:masterfrom
ryanofsky:pr/ipc-cli
Mar 30, 2026
Merged

bitcoin-cli: Add -ipcconnect option#32297
achow101 merged 7 commits intobitcoin:masterfrom
ryanofsky:pr/ipc-cli

Conversation

@ryanofsky
Copy link
Copy Markdown
Contributor

@ryanofsky ryanofsky commented Apr 17, 2025

This implements an idea from sipa in #28722 (comment) to allow bitcoin-cli to connect to the node via IPC instead of TCP, if the ENABLE_IPC cmake option is enabled and the node has been started with -ipcbind.

This feature can be tested with:

build/bin/bitcoin-node -regtest -ipcbind=unix -debug=ipc
build/bin/bitcoin-cli -regtest -ipcconnect=unix -getinfo

The -ipconnect parameter can also be omitted, since this change also makes bitcoin-cli prefer IPC over HTTP by default, and falling back to HTTP if an IPC connection can't be established.


This PR is part of the process separation project.

@DrahtBot
Copy link
Copy Markdown
Contributor

DrahtBot commented Apr 17, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32297.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK pinheadmz, enirox001, achow101
Concept ACK laanwj, jlest01, yancyribbens, shahsb, sipa
Stale ACK janb84, BrandonOdiwuor

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:

  • #bitcoin-core/gui/870 ([DRAFT] Expose AssumeUTXO Load Snapshot Functionality To The GUI by D33r-Gee)
  • #34935 (cli: Return more correct error on -norpccookiefile without -rpcpassword by maflcko)
  • #34342 (cli: Replace libevent usage with simple http client by fjahr)
  • #33585 (cmake: Use builtin support for .manifest files by purpleKarrot)
  • #33117 (Interfaces: Expose UTXO Snapshot Loading and Add Progress Notifications by D33r-Gee)
  • #32061 (Replace libevent with our own HTTP and socket-handling implementation by pinheadmz)
  • #28690 (build: Introduce internal kernel library by sedited)

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.

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Apr 17, 2025

Concept ACK, it'd be useful to have an utility that can talk to the node through IPC and making bitcoin-cli double for that prevents code duplication.

@jlest01
Copy link
Copy Markdown

jlest01 commented Apr 17, 2025

Concept ACK, as it can make communication between the CLI and the node simpler and configuration-free.

@pinheadmz
Copy link
Copy Markdown
Member

concept ACK, cool idea and will review. Does this close #5029 (adding unix sockets to the bitcoind rpc api) or does it only apply to bitcoin-node? Or is IPC protocol different from RPC and must be defined in the client?

@ryanofsky
Copy link
Copy Markdown
Contributor Author

concept ACK, cool idea and will review. Does this close #5029 (adding unix sockets to the bitcoind rpc api) or does it only apply to bitcoin-node? Or is IPC protocol different from RPC and must be defined in the client?

It uses capnproto, so it may or may not achieve goals of #5029 depending on what they are. This PR does make it possible to call RPC methods over a unix socket, but in order to do that you need to use capnproto which is not available everywhere. For example there wouldn't be an easy way for our python test framework to use the socket directly unless it depended on https://github.com/capnproto/pycapnp. So another solution that uses a another protocol or just uses http over the socket might be preferable to this approach. But the first commit here could be useful for supporting other approaches as well.

Copy link
Copy Markdown
Contributor Author

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated df40f46 -> 538521a (pr/ipc-cli.2 -> pr/ipc-cli.3, compare) handling -rpcconnect option, adding a test, making various cleanups, adding comments, and fixing CI failures in non-ipc builds
Updated 538521a -> bd29de3 (pr/ipc-cli.3 -> pr/ipc-cli.4, compare) fixing compile error in intermediate commit, https://github.com/bitcoin/bitcoin/actions/runs/14538988101/job/40793056407?pr=32297, fixing functional test failure when socket path is too long https://cirrus-ci.com/task/6103052337283072, and adding new test to cover "bitcoin-cli was not built with IPC support" error

@ryanofsky ryanofsky marked this pull request as ready for review April 18, 2025 18:10
@yancyribbens
Copy link
Copy Markdown
Contributor

Concept ACK

@luke-jr
Copy link
Copy Markdown
Member

luke-jr commented Apr 21, 2025

This looks like it uses JSON-RPC inside Capnproto? Why not just use straight Capnproto?

@ryanofsky
Copy link
Copy Markdown
Contributor Author

This looks like it uses JSON-RPC inside Capnproto? Why not just use straight Capnproto?

Yes it is skipping the HTTP part of the protocol but keeping the JSON part. The capnproto interface this exposes looks like:

interface Rpc $Proxy.wrap("interfaces::Rpc") {
    executeRpc @0 (context :Proxy.Context, request :Text, uri :Text, user :Text) -> (result :Text);
}

where request and response above are JSON text strings with the expected JSON-RPC fields. The schema could be unwrapped further, or the data could be sent in some binary json format depending on what your goal is but that interface was the simplest way I could think of implementing this feature.

Copy link
Copy Markdown

@shahsb shahsb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Apr 24, 2025

The schema could be unwrapped further, or the data could be sent in some binary json format depending on what your goal is but that interface was the simplest way I could think of implementing this feature.

Right, Say, representing the entire RPC protocol as cap'n'proto structures directly would be interesting (anologous to how c-lightning has a gRPC version of their RPC), but this would be a huge project for which the first step would be the formal definition of the RPC protocol (including specific-enough types) so that that can be automatically generated.

And this would make it harder to make a cli tool, not easier, because the client needs to know the protocol to convert its command line to suitable calls.

So sending the JSON inside the interface seems like a good, low-impact way to implement this tool.

@sipa
Copy link
Copy Markdown
Member

sipa commented Apr 30, 2025

Concept ACK

@pinheadmz
Copy link
Copy Markdown
Member

While reviewing this I hit some weird behavior where bitcoin-node doesn't fully shutdown.

To reproduce:

In terminal 1: build/bin/bitcoin-node -regtest -ipcbind=unix -debug=rpc -debug=http -debug=ipc

Terminal 2: build/bin/bitcoin-cli -regtest waitforblock 0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862
(this will wait forever)

go back to terminal 1 and ctrl-c. I get Shutdown: done in the output but the process does not quit.

Then funny stuff like this, in Terminal 3:

--> build/bin/bitcoin-cli -regtest getblockcount
error code: -32603
error message:
Node chainman not found

--> build/bin/bitcoin-cli -regtest -getinfo
error code: -1
error message:
Internal bug detected: RPC call "getnetworkinfo" returned incorrect type:
{
    "localservices": "key missing, despite not being optional in doc",
    "localservicesnames": "key missing, despite not being optional in doc",
    "localrelay": "key missing, despite not being optional in doc",
    "timeoffset": "key missing, despite not being optional in doc",
    "connections": "key missing, despite not being optional in doc",
    "connections_in": "key missing, despite not being optional in doc",
    "connections_out": "key missing, despite not being optional in doc",
    "networkactive": "key missing, despite not being optional in doc",
    "relayfee": "key missing, despite not being optional in doc",
    "incrementalfee": "key missing, despite not being optional in doc"
}
Bitcoin Core v29.99.0-9ff5bc75659e
Please report this issue here: https://github.com/bitcoin/bitcoin/issues

I had to use killall -9 bitcoin-node to clean up

Copy link
Copy Markdown
Member

@sipa sipa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK and mild code review ACK.

@pinheadmz
Copy link
Copy Markdown
Member

Range diff since last review shows rebase including updating logging calls. Two commits were pulled out, and i think the libmultiprocess fixes were pulled in to master? Is this ready for review again?

@ryanofsky
Copy link
Copy Markdown
Contributor Author

Yep, it's ready for review. I don't think there have been any real changes. The commits that were dropped just became part of #33201, IIRC

Copy link
Copy Markdown
Member

@pinheadmz pinheadmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK b23e42a

Built and tested on arm64/macos. Re-reviewed each commit to refresh my memory on how interfaces work. A few questions below, nothing breaking but I am curious about the choice of ExecuteHTTPRPC vs JSONRPCExec().

Show Signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

ACK b23e42a8ea1d1db649aaa25c1c286b17ec7dcf39
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmmV3sMACgkQ5+KYS2KJ
yToxDhAAi75OL2MuiaURUSlGdf3zDKrodG4FRByGnFEas6ztTB/RpFCNd4cc+LUm
wGcPRXTLlYcVb1NwZAgrL20C6jy28Sy6NW/d4saKRHHO0ugqFmkL8OgxHaGEI7oL
nvZrw+fyZD9MBjtzy4unVURLKVBdQP5+KySC9E7b2JJmvNU4dq/8b98C3R92nH2I
9GxlhpfdtHlK0j5EiWUnIGh74+zfGzpLyra509q2pwJf4dEB4PTaDIL3Y8q7CeJL
LwFlKwjtO7P25qx7T2hAsKI9CH5zdnqcOB9N7bqjEhr2s4EoaZhu89Bx39laeOVu
5wPm1u+dONOG/moXoFKbkBNXygqLB0o9YV6hYtILgGdmQol+lmu+Ies3wlWTn58d
K18ovvqDp/RyFOM8mzMmL1S1Meu0AXj7eNP1hsDXpGH4izadBWCAGAN8y4z8cbdL
RbVsyVMNgFMBF02J/vcM7LmS3VoNTEOtHBp+RuJIKHAuZRmJHoR5j9P0bc2oXHoC
SWmAhKNPZIhEOf6URnqFLhY0MZhGFr1dOBk3wJAsPDQdD9lSN3KVk7v+dO5IGNjy
1rcDnCF0c8k93DTm8OqR4f6A1+R7scyDmEL70qSs2joR13Gq040hUM160BJdpxCy
Qqjo2+YG+gZRkAZCO6n/Vrnz8g9N8lD6x+PNgcqfRrE2O1MVr/c=
=A4RT
-----END PGP SIGNATURE-----

pinheadmz's public key is on openpgp.org

}

static bool HTTPReq_JSONRPC(const std::any& context, HTTPRequest* req)
UniValue ExecuteHTTPRPC(const UniValue& valRequest, JSONRPCRequest& jreq, HTTPStatusCode& status)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b56a36a

Looking at this with fresh eyes after some time, and I'm wondering why to expose this to the interface instead of going directly to JSONRPCExec()? Or essentially pull out the chunk of this function starting from // Execute each request .

We shouldn't need HTTP status codes at all for RPC over IPC

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

Reason for calling the HTTP function instead of the JSONRPCExec is just that the HTTP function provides some additional functionality like user authorization and method whitelisting. I imagine in the future it could also provide more functionality like having different default wallets or different settings for different users.

It would be reasonable for the IPC inteface to just expose the JSON-RPC methods without any higher level functionality, but since the IPC interface is used by bitcoin-cli I think it makes sense to provide whatever allows bitcoin-cli to be fully functional.

} // namespace node

namespace interfaces {
//! Interface giving clients ability to emulate RPC calls.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d408dc5

nit: "emulate"? Isn't the client literally making a remote procedure call?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

nit: "emulate"? Isn't the client literally making a remote procedure call?

That's a good point, this should be changed to say HTTP RPC since technically it is making a JSON-RPC call, and technically Cap'n Proto is also an RPC protocol.

Made this change locally so this will be updated if there is another push.

} catch (const std::system_error& e) {
// If connection type is auto and socket path isn't accepting connections, or doesn't exist, catch the error and return null;
if (e.code() == std::errc::connection_refused || e.code() == std::errc::no_such_file_or_directory) {
if (e.code() == std::errc::connection_refused || e.code() == std::errc::no_such_file_or_directory || e.code() == std::errc::not_a_directory) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

42b51dc

Kinda surprised this isn't std::errc::filename_too_long

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

Kinda surprised this isn't std::errc::filename_too_long

Interesting, I didn't know about that error code. In theory I think that error might be possible but in practice the maximum socket filename length is shorter than maximum path length on all platforms. The socket filename length error is handled separately below and originates from Bitcoin IPC code rather than from the OS:

if (path_str.size() >= sizeof(addr.sun_path)) {
error = strprintf("Unix address path %s exceeded maximum socket path length", fs::quoted(fs::PathToString(path)));
return false;
}

bitcoin/src/ipc/process.cpp

Lines 106 to 108 in 9e4567b

if (!ParseAddress(address, data_dir, dest_exe_name, addr, error)) {
throw std::invalid_argument(error);
}

Copy link
Copy Markdown
Contributor Author

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

}

static bool HTTPReq_JSONRPC(const std::any& context, HTTPRequest* req)
UniValue ExecuteHTTPRPC(const UniValue& valRequest, JSONRPCRequest& jreq, HTTPStatusCode& status)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

Reason for calling the HTTP function instead of the JSONRPCExec is just that the HTTP function provides some additional functionality like user authorization and method whitelisting. I imagine in the future it could also provide more functionality like having different default wallets or different settings for different users.

It would be reasonable for the IPC inteface to just expose the JSON-RPC methods without any higher level functionality, but since the IPC interface is used by bitcoin-cli I think it makes sense to provide whatever allows bitcoin-cli to be fully functional.

} // namespace node

namespace interfaces {
//! Interface giving clients ability to emulate RPC calls.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

nit: "emulate"? Isn't the client literally making a remote procedure call?

That's a good point, this should be changed to say HTTP RPC since technically it is making a JSON-RPC call, and technically Cap'n Proto is also an RPC protocol.

Made this change locally so this will be updated if there is another push.

} catch (const std::system_error& e) {
// If connection type is auto and socket path isn't accepting connections, or doesn't exist, catch the error and return null;
if (e.code() == std::errc::connection_refused || e.code() == std::errc::no_such_file_or_directory) {
if (e.code() == std::errc::connection_refused || e.code() == std::errc::no_such_file_or_directory || e.code() == std::errc::not_a_directory) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

Kinda surprised this isn't std::errc::filename_too_long

Interesting, I didn't know about that error code. In theory I think that error might be possible but in practice the maximum socket filename length is shorter than maximum path length on all platforms. The socket filename length error is handled separately below and originates from Bitcoin IPC code rather than from the OS:

if (path_str.size() >= sizeof(addr.sun_path)) {
error = strprintf("Unix address path %s exceeded maximum socket path length", fs::quoted(fs::PathToString(path)));
return false;
}

bitcoin/src/ipc/process.cpp

Lines 106 to 108 in 9e4567b

if (!ParseAddress(address, data_dir, dest_exe_name, addr, error)) {
throw std::invalid_argument(error);
}

ryanofsky and others added 7 commits February 27, 2026 19:26
Add a MakeBasicInit() function so simpler standalone IPC clients like
bitcoin-mine in bitcoin#30437 and bitcoin-cli in bitcoin#32297 that only initiate IPC
connections without exposing any IPC interfaces themselves can to avoid needing
to implement their own specialized interfaces::Init subclasses.
Add ExecuteHTTPRPC to provide a way to execute an HTTP request without relying
on HTTPRequest and libevent types.

Behavior is not changing in any way, this is just moving code. This commit may
be easiest to review using git's --color-moved option.
This allows `bitcoin-cli` to connect to the node via IPC instead TCP to execute
RPC methods in an upcoming commit.
This implements an idea from Pieter Wuille <pieter@wuille.net>
bitcoin#28722 (comment) to
allow `bitcoin-cli` to connect to the node via IPC instead of TCP, if the
`ENABLE_IPC` cmake option is enabled and the node has been started with
`-ipcbind`.

The feature can be tested with:

build/bin/bitcoin-node -regtest -ipcbind=unix -debug=ipc
build/bin/bitcoin-cli -regtest -ipcconnect=unix -getinfo

The `-ipconnect` parameter can also be omitted, since this change also makes
`bitcoin-cli` prefer IPC over HTTP by default, and falling back to HTTP if an
IPC connection can't be established.
When an invalid socket path is passed to -ipcconnect, either because the path
exceeds the maximum socket length, or the path includes a directory component
which is not actually a directory, treat this the same as the same as the
socket refusing connections or not existing, instead of treating it like a more
serious I/O error and throwing a fatal exception.

This is needed to avoid CI errors after the following commit which adds a
functional test and uses -datadir paths exceeding the maximum socket length
when running in CI.
Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
A missing Init::makeMining implementation was causing internal code using the
mining interface (like the `waitforblockheight` RPC method) to not work when
running inside the `bitcoin-gui` binary. It was working the other bitcoin
binaries ('bitocind`, `bitcoin-qt`, and `bitcoin-node`) because they
implmemented `Init::makeMining` methods in commit
8ecb681 from bitcoin#30200, but the `bitcoin-gui`
init class was forgotten in that change.

This bug was reported by Matthew Zipkin <pinheadmz@gmail.com>
bitcoin#32297 (review)
argsman.AddArg("-server", "Accept command line and JSON-RPC commands", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
if (can_listen_ipc) {
argsman.AddArg("-ipcbind=<address>", "Bind to Unix socket address and listen for incoming connections. Valid address values are \"unix\" to listen on the default path, <datadir>/node.sock, or \"unix:/custom/path\" to specify a custom path. Can be specified multiple times to listen on multiple paths. Default behavior is not to listen on any path. If relative paths are specified, they are interpreted relative to the network data directory. If paths include any parent directory components and the parent directories do not exist, they will be created.", ArgsManager::ALLOW_ANY, OptionsCategory::IPC);
argsman.AddArg("-ipcbind=<address>", "Bind to Unix socket address and listen for incoming connections. Valid address values are \"unix\" to listen on the default path, <datadir>/node.sock, or \"unix:/custom/path\" to specify a custom path. Can be specified multiple times to listen on multiple paths. Default behavior is not to listen on any path. If relative paths are specified, they are interpreted relative to the network data directory. If paths include any parent directory components and the parent directories do not exist, they will be created. Enabling this gives local processes that can access the socket unauthenticated RPC access, so it's important to choose a path with secure permissions if customizing this.", ArgsManager::ALLOW_ANY, OptionsCategory::IPC);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be doing something wrong here, but I am not seeing this help message in bitcoind -h or bitcoin node -h. Stepping through with debugger, the reason seems to be that SetupServerArgs() is called on the NodeContext's interfaces::Init which has canListenIpc() { return false; }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #32297 (comment)

Nice find. The current behavior is expected but pointlessly confusing.

The goal of this code is to show -ipcbind help when bitcoin-node -h is run and not show it when bitcoind -h is run, which is what you are observing.

The problem is the bitcoin wrapper prefers to call bitcoind instead of bitcoin-node when no IPC options are specified. So when you run bitcoin node -h you won't see any IPC help. A fix for this would be to make the wrapper prefer bitcoin-node when help is requested like:

--- a/src/bitcoin.cpp
+++ b/src/bitcoin.cpp
@@ -168,7 +168,7 @@ bool UseMultiprocess(const CommandLine& cmd)
 
     // If any -ipc* options are set these need to be processed by a
     // multiprocess-capable binary.
-    return args.IsArgSet("-ipcbind") || args.IsArgSet("-ipcconnect") || args.IsArgSet("-ipcfd");
+    return args.IsArgSet("-ipcbind") || args.IsArgSet("-ipcconnect") || args.IsArgSet("-ipcfd") || HelpRequested(args);
 }
 
 //! Execute the specified bitcoind, bitcoin-qt or other command line in `args`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh gotcha, bitcoin-node vs bitcoin node explains what I had here and not a blocker for this PR

Copy link
Copy Markdown
Member

@pinheadmz pinheadmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 4565cff

Minimal diff since last review, fix conflict with change to mining interface.

Another thing i noticed is that -rpcclienttimeout is ignore when connecting by IPC. Not a deal breaker. If we add it back we should avoid libevent and I guess use CScheduler like #32862 ?

Show Signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

ACK 4565cff72c60f56d8ad4b46716fe8df847554824
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmmwKO4ACgkQ5+KYS2KJ
yToDmw/+LVtqNGxF9Tva6NLvhdNc23Yv1VUaYEB4M6jtm8CTj2qg/YFVJTCFfd1V
KEyz0eyJXEF+EALW1If0ujfGMfKMiM17DVxjeUA46BWCjPAxdNZj4qgIWTZz1CZ/
0ff+UYR+5eMPZHm0jJRfzRAC2Ch/ZVXDXN+ONraP0rTmEN8WyB/1gds5BgxsKe/x
Ks99Lm2TDnVzFWeILJgQKeNlJQ09DnpWqtZ4Pi23sfoUBSeucynRGUumT9gbz1ma
Sf7lDHle5fhw9yZJLGxPKuyu6uKoEcACs4vq143crQ1KiTKgnoiXXWZOvL+1rFev
3QdA0ewgVeOUWCzYWKmFJNHUGVxx0satbgvBIDgXWA9ydsMEQ3GBvguAY/41a29d
RrbRSnADchec8xD0YwmLXi0l1E0orcAXsDgcA95BQrfm5do2RtjVdk/OnybGws8N
cVmQ13N47jLjFn4zhtqZpF/w0iIO4hS+zfg5AF8FTRip+UJ/GpQ20rUdMaMB4+KX
lJsvB7MtLXg4H9FUnBMq+gFTJo3w0KQHDT18T8XNE0ExqFYd8Z+IgRw10QgsXfkQ
84o+RQYiVquRoDSUjGpYA4bObSfV/HFK0v46paepP8CuKNNTAYuSL4XjgZN1SnVG
8X8Utt4+R3Ykm/msihXVQR8+eHPPvJllO1uLT2y5cli6MB0kUIQ=
=JdCA
-----END PGP SIGNATURE-----

pinheadmz's public key is on openpgp.org

Copy link
Copy Markdown
Contributor

@enirox001 enirox001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK 4565cff

Built on Fedora with ENABLE_IPC=ON. Ran interface_ipc_cli.py,
all tests pass.

Manually tested the following rpc commands

    bitcoin-node -regtest -ipcbind=unix -debug=ipc
    bitcoin-cli -regtest -ipcconnect=unix -getinfo
    bitcoin-cli -regtest -ipcconnect=unix getblocktemplate '{"rules": ["segwit"]}'

When node is stopped, -ipcconnect=auto correctly falls back to HTTP path.

@achow101
Copy link
Copy Markdown
Member

ACK 4565cff

@Sjors
Copy link
Copy Markdown
Member

Sjors commented Mar 31, 2026

Given that this PR takes the number of potential unix socket connections well beyond one (in the typical Mining IPC use case), we should introduce something like -maxconnections and use it for min_required_fds.

@enirox001
Copy link
Copy Markdown
Contributor

Given that this PR takes the number of potential unix socket connections well beyond one (in the typical Mining IPC use case), we should introduce something like -maxconnections and use it for min_required_fds.

Opened #34978 to address this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.