mirror of https://github.com/bitcoin/bitcoin
Merge bitcoin/bitcoin#27679: ZMQ: Support UNIX domain sockets
pull/29998/head21d0e6c7b7
doc: release notes for PR 27679 (Matthew Zipkin)791dea204e
test: cover unix sockets in zmq interface (Matthew Zipkin)c87b0a0ff4
zmq: accept unix domain socket address for notifier (Matthew Zipkin) Pull request description: This is a follow-up to https://github.com/bitcoin/bitcoin/pull/27375, allowing ZMQ notifications to be published to a UNIX domain socket. Fortunately, libzmq handles unix sockets already, all we really have to do to support it is allow the format in the actual option. [libzmq](https://libzmq.readthedocs.io/en/latest/zmq_ipc.html) uses the prefix `ipc://` as opposed to `unix:` which is [used by Tor](https://gitlab.torproject.org/tpo/core/tor/-/blob/main/doc/man/tor.1.txt?ref_type=heads#L1475) and now also by [bitcoind](a85e5a7c9a/doc/release-notes-27375.md
?plain=1#L5) so we need to switch that internally. As far as I can tell, [LND](d20a764486/zmq.go (L38)
) supports `ipc://` and `unix://` (notice the double slashes). With this patch, LND can connect to bitcoind using unix sockets: Example: *bitcoin.conf*: ``` zmqpubrawblock=unix:/tmp/zmqsb zmqpubrawtx=unix:/tmp/zmqst ``` *lnd.conf*: ``` bitcoind.zmqpubrawblock=ipc:///tmp/zmqsb bitcoind.zmqpubrawtx=ipc:///tmp/zmqst ``` ACKs for top commit: laanwj: Code review ACK21d0e6c7b7
tdb3: crACK for21d0e6c7b7
. Changes lgtm. Will follow up with some testing within the next few days as time allows. achow101: ACK21d0e6c7b7
guggero: Tested and code review ACK21d0e6c7b7
Tree-SHA512: ffd50222e80dd029d903e5ddde37b83f72dfec1856a3f7ce49da3b54a45de8daaf80eea1629a30f58559f4b8ded0b29809548c0638cd1c2811b2736ad8b73030
commit
04c90f1059
@ -0,0 +1,2 @@
|
||||
- unix socket paths are now accepted for `-zmqpubrawblock` and `-zmqpubrawtx` with
|
||||
the format `-zmqpubrawtx=unix:/path/to/file`
|
Loading…
Reference in new issue