Skip to content

fix: restore ZMQ ipc:// Unix domain socket support#387

Open
JohnnyLawDGB wants to merge 1 commit intoDigiByte-Core:feature/digidollar-v1from
JohnnyLawDGB:fix/zmq-ipc-socket-validation
Open

fix: restore ZMQ ipc:// Unix domain socket support#387
JohnnyLawDGB wants to merge 1 commit intoDigiByte-Core:feature/digidollar-v1from
JohnnyLawDGB:fix/zmq-ipc-socket-validation

Conversation

@JohnnyLawDGB
Copy link

Summary

  • Restores ZMQ Unix domain socket (ipc://) support that broke in v8.26 during the Bitcoin Core v26.2 merge
  • Splits the port validation loop so ZMQ options skip validation for ipc:// addresses while TCP-only options (-rpcbind, -proxy, etc.) retain strict validation
  • Backward compatible with DigiByte v8.22.2 configurations and existing documentation (doc/zmq.md:88)

Background

Port validation added in the v26.2 merge rejects ipc:// addresses because SplitHostPort() expects host:port format. Unix domain sockets use filesystem paths (ipc:///tmp/dgb.hashblock), not ports. This causes nodes configured with zmqpubhashblock=ipc:///tmp/dgb.hashblock to crash on startup with "Invalid port specified".

Bitcoin Core fixed this in v28.0 (PRs #27375, #27679) using a unix: prefix with internal ipc:// conversion. This PR takes a simpler approach — directly allowing ipc:// — since DigiByte v8.22.2 already used ipc:// and libzmq natively supports it.

Targeting feature/digidollar-v1 for testnet validation, intended for inclusion in v9.26 mainnet release.

Fixes #340

Test plan

  • Verify zmqpubhashblock=ipc:///tmp/dgb.hashblock no longer crashes on startup
  • Verify zmqpubhashblock=tcp://127.0.0.1:212024 still works (TCP validation intact)
  • Verify invalid TCP addresses (e.g. zmqpubhashblock=tcp://badhost) are still rejected
  • Verify non-ZMQ options (-rpcbind, -proxy) still require valid ports

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant