disassembler / jormungandr

aspiring blockchain node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Full Node

Just because you call something a blockchain, that doesn't mean you aren't subject to normal engineering laws.

How to install from sources

We do support multiple versions of the rust compiler, however we recommend to utilise the most recent stable version of the rust compiler.

  1. install rustup
  2. make sure you have cloned the submodule too: git submodule update
  3. install: cargo install

Note:

  • on windows, you'll need to add the /userProfile/.cargo/bin into the Path;
  • on linux and OSX: add ${HOME}/.cargo/bin to your ${PATH}

This will install 2 tools:

  • jormungandr: the cardano node;
  • jcli: a command line tool to help you use and setup the cardano node;

How To Use

In order to use jormungandr you need to configure your blockchain and configure your node.

  • the Genesis File is the source of truth, the configuration of the blockchain;
  • the Node Configuration file is the configuration of the node (logging, peer addresses...);

Node Configuration

Example of node config:

storage: "/tmp/storage"
logger:
  verbosity: 1
  format: json
rest:
  listen: "127.0.0.1:8443"
  pkcs12: "example.p12"
  prefix: "api"
peer_2_peer:
  trusted_peers: []
  public_access: "/ip4/127.0.0.1/tcp/8080"
  topics_of_interests:
    transactions: low
    blocks: normal

Fields description:

  • bft.leaders: public keys of the nodes.
  • storage: (optional) path to the storage. If omitted, the blockchain is stored in memory only.
  • logger: (optional) logger configuration,
    • verbosity: 0 - warning, 1 - info, 2 -debug, 3 and above - trace
    • format: log output format - plain or json.
  • rest: (optional) configuration of the rest endpoint.
    • listen: listen address
    • pkcs12: certificate file (optional)
    • prefix: (optional) api prefix
  • peer_2_peer: the P2P network settings
    • trusted_peers: (optional) the list of nodes to connect to in order to bootstrap the p2p topology (and bootstrap our local blockchain);
    • public_address: (optional) the address to listen from and accept connection from. This is the public address that will be distributed to other peers of the network that may find interest into participating to the blockchain dissemination with the node;
    • topics_of_interests: the different topics we are interested to hear about:
      • transactions: notify other peers this node is interested about Transactions typical setting for a non mining node: "low". For a stakepool: "high";
      • blocks: notify other peers this node is interested about new Blocs. typical settings for a non mining node: "normal". For a stakepool: "high";

Starting the node

If you are not a leader node, then you can start the jormundandr with:

jormungandr --genesis-block block-0.bin \
  --config example.config \
  --without-leadership

documentations

Extra tooling

CLI

Building:

cargo build --bin jcli

The binary has subcommands

License

This project is licensed under either of the following licenses:

Please choose the licence you want to use.

About

aspiring blockchain node

License:Apache License 2.0


Languages

Language:Rust 91.5%Language:JavaScript 4.6%Language:HTML 2.2%Language:Shell 1.6%Language:Nix 0.1%