Skip to content

IntersectMBO/dmq-node

x86_64-linux x86_64-darwin aarch64-darwin mingw64 Haddocks Discord

Decentralized Message Queue

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:

Instructions

Building the project

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-node

The executable can be run with:

> cabal run dmq-node

Building with Nix

To build the executable using Nix, one can use:

> nix build .#dmq-node

Static build

To get a statically linked executable using musl library, use:

> nix build .#dmq-node-static

Docker image

To build a docker image:

> nix build .#docker-dmq

Running

Usage

Usage: 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

Configuration

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

Topology file has the same syntax as for cardano-node, see the original documentation. However, the fields: bootstrapPeers and peerSnapshotFile are not supported.

Ledger Peers

To use ledger peers, as cardano-node does there are additional requrements:

  • You need cardano-node-10.7 or newer to support ledger peer snapshot query over cardano-node's node-to-client protocol.
  • You need to configure cardano-node & dmq-node to use SRV records according to CIP#155
  • You need to set LedgerPeers: true in the configuration file.

Currently ledger peers are disabled by default, but in a near future we will enable them by default.

Developing with Nix

To enter a development shell with all dependencies available, use:

> nix develop

Testing the project

To run the test suite, one can use:

> cabal run dmq-node:dmq-tests

CDDL

This 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-cddl

Contributing

The contributing guide is available here. The style guide is available here. The code of conduct is available here.

References

About

DMQ-Node is a diffusion layer for Mithril, based on Ouroboros-Network.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors