fix: restore ZMQ ipc:// Unix domain socket support#387
Conversation
Port validation added during the Bitcoin Core v26.2 merge rejects ipc:// addresses because they use filesystem paths, not host:port format. This breaks users who rely on Unix domain sockets for ZMQ notifications (e.g. zmqpubhashblock=ipc:///tmp/dgb.hashblock), which worked in DigiByte v8.22.2. Split the validation loop so ZMQ options skip port validation for ipc:// addresses while TCP-only options (-rpcbind, -proxy, etc.) retain strict validation. libzmq natively handles ipc:// endpoints. Fixes: DigiByte-Core#340 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Hey @JohnnyLawDGB — did a full audit of this PR and I appreciate the work here. The ZMQ Note: the macOS CI failure appears to be a pre-existing flaky test issue unrelated to your change (Ubuntu passes clean). The actual diff is only the Merging — thanks for tracking down and fixing this one. 🙏 |
42cff0c
into
DigiByte-Core:feature/digidollar-v1
|
Hello everyone! Thank you for taking the time to deep dive into this issue. I hope it has been solved by now. Does that mean I can test it on a testnet using version DigiByte v9.26.0-rc24 ? |
Summary
ipc://) support that broke in v8.26 during the Bitcoin Core v26.2 mergeipc://addresses while TCP-only options (-rpcbind,-proxy, etc.) retain strict validationdoc/zmq.md:88)Background
Port validation added in the v26.2 merge rejects
ipc://addresses becauseSplitHostPort()expectshost:portformat. Unix domain sockets use filesystem paths (ipc:///tmp/dgb.hashblock), not ports. This causes nodes configured withzmqpubhashblock=ipc:///tmp/dgb.hashblockto crash on startup with "Invalid port specified".Bitcoin Core fixed this in v28.0 (PRs #27375, #27679) using a
unix:prefix with internalipc://conversion. This PR takes a simpler approach — directly allowingipc://— since DigiByte v8.22.2 already usedipc://andlibzmqnatively supports it.Targeting
feature/digidollar-v1for testnet validation, intended for inclusion in v9.26 mainnet release.Fixes #340
Test plan
zmqpubhashblock=ipc:///tmp/dgb.hashblockno longer crashes on startupzmqpubhashblock=tcp://127.0.0.1:212024still works (TCP validation intact)zmqpubhashblock=tcp://badhost) are still rejected-rpcbind,-proxy) still require valid ports🤖 Generated with Claude Code