The DMQ node allows for client peers to communicate efficiently by publishing and consuming messages which are diffused over a P2P network to other nodes.
This repository provides the dmq-node executable to participate in the DMQ
network.
The dmq-node is developed with respect to the CIP#137.
NOTE: This is still an early version of DMQ node, which comes with some quirks:
- issue#6 - experimental support for ledger peers see Ledger Peers below.
We use cabal to build our project, potentially inside a Nix shell (nix develop or nix-shell). It should suffice with:
> cabal build dmq-node:exe:dmq-nodeThe executable can be run with:
> cabal run dmq-nodeTo build the executable using Nix, one can use:
> nix build .#dmq-nodeTo get a statically linked executable using musl library, use:
> nix build .#dmq-node-staticTo build a docker image:
> nix build .#docker-dmqUsage: dmq-node [--host-addr IPv4] [--host-ipv6-addr IPv6]
[-p|--port Port Number] [--local-socket FILENAME]
[-c|--configuration-file FILENAME] [-t|--topology-file FILENAME]
[--cardano-node-socket Cardano node socket path]
[--cardano-network-magic Cardano node network magic]
[--dmq-network-magic dmq node network magic] [-v|--version]
Run the DMQ-Node
Available options:
--host-addr IPv4 IPv4 that the node will bind to
--host-ipv6-addr IPv6 IPv6 that the node will bind to
-p,--port Port Number Port Number that the node will bind to
(default: 3141)
--local-socket FILENAME Unix socket for node-to-client communication
(default: "dmq-node.socket")
-c,--configuration-file FILENAME
Configuration file for DMQ Node
(default: "dmq.config.json")
-t,--topology-file FILENAME
Topology file for DMQ Node
(default: "dmq.topology.json")
--cardano-node-socket Cardano node socket path
Used for local connections to Cardano node
(default: "cardano-node.socket")
--cardano-network-magic Cardano node network magic
The network magic of cardano-node client for local
connections
(default: 764824073)
--dmq-network-magic dmq node network magic
The network magic of the dmq network
(default: 3141592)
-v,--version Show dmq-node version
-h,--help Show this help text
dmq-node has default options for allmost all configuration values,
ref. You only need to create a configuration file if
you want to modify one of the options. To get a json key for
a configuration option just remove the dmqc prefix from a Configuration
record field (e.g. dmqcLedgerPeers → LedgerPeers).
Topology file has the same syntax as for cardano-node, see the original
documentation. However, the fields: bootstrapPeers and
peerSnapshotFile are not supported.
To use ledger peers, as cardano-node does there are additional requrements:
- You need
cardano-node-10.7or newer to support ledger peer snapshot query overcardano-node's node-to-client protocol. - You need to configure
cardano-node&dmq-nodeto use SRV records according to CIP#155 - You need to set
LedgerPeers: truein the configuration file.
Currently ledger peers are disabled by default, but in a near future we will enable them by default.
To enter a development shell with all dependencies available, use:
> nix developTo run the test suite, one can use:
> cabal run dmq-node:dmq-testsThis project comes with a CDDL specification for the DMQ protocols
(node-to-client and node-to-node). To check changes against the CDDL
specification, use:
cabal run dmq-node:dmq-cddlThe contributing guide is available here. The style guide is available here. The code of conduct is available here.