CardanoSolutions / cardano-node

The core component that is used to participate in a Cardano decentralised blockchain.

Home Page:https://cardano.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Overview

This repository is a fork of input-output-hk/cardano-node which aims at experimenting new features which may or may not end up in the original node implementation. Our goal is to play with new interfaces, and harness unexploited possibilities of the Cardano node without causing disruption on the core team day-to-day maintenance work.

There's therefore no intention whatsoever to change anything regarding the semantics of the existing consensus protocol or to alter any of the ledger rules.

Additions

Ledger Events

We introduce a new (optional) command-line option --ledger-event-handler TCP/PORT to the run command of the node. If provided, the cardano-node will open a TCP socket on the given port and await for a client connection. From there, any event emitted by the ledger will be pushed through that socket as a serialized CBOR object, anchored in a block header hash and a slot. Those ledger events are currently produced by the cardano-node but discarded by the consensus layer in the original implementation.

The CIP-0078 proposes to extend the LocalChainSync to optionally include those events and this repository is a prototype towards that goal: It exposes the ledger events, without storing them, and without modifying the existing mini-protocols in order for the changes to be minimally invasive.

Anchored events abides by the following CDDL schema:

rule =
  [ version                    ; The codec version used to encode the following event.
  , bytes .cbor anchored-event ; An CBOR-encoded anchored ledger event.
  ]

anchored-event =
  { 0: block-header-hash ; The block header hash from where this event was emitted.
  , 1: slot              ; The slot number corresponding to the aforementioned header hash.
  , 2: ledger-event      ; The actual ledger event.
  }

The complete schema for ledger-event, as well as additional documentation for the nature of those events is given in cardano-node/ledger-events.cddl.

About

The core component that is used to participate in a Cardano decentralised blockchain.

https://cardano.org

License:Apache License 2.0


Languages

Language:Haskell 80.8%Language:Shell 11.9%Language:Nix 4.5%Language:jq 1.2%Language:JSONiq 0.5%Language:Python 0.4%Language:C 0.3%Language:Makefile 0.2%Language:Emacs Lisp 0.1%Language:Gnuplot 0.1%Language:Rust 0.0%Language:C++ 0.0%Language:Standard ML 0.0%