iotaledger / inx-tendercoo

INX-Tendercoo enables a committee of validators to operate as a distributed Coordinator using Tendermint Core BFT consensus.
Apache License 2.0
1 stars 0 forks source link

INX-TenderCoo

This repository contains an INX plugin for a distributed coordinator using Tendermint Core BFT consensus. Each plugin contains its own Tendermint node and represents one validator in the network.

Bootstrapping

In order to bootstrap a network without any previous INX-TenderCoo milestones, the --cooBootstrap command line flag needs to be set. Then, additional bootstrap parameters can be set used additional command line flags:

The plugin performs some sanity checks whether the given Index, Milestone ID and Milestone Block ID is consistent with the latest milestone (if present) of the connected node. It crashes when these checks fail. In an emergency, the bootstrapping fail-safes can be disabled completely by additionally setting the --cooBootstrapForce flag.

Restart

Once bootstrapped, each issued milestone contains its state in the Metadata field and the Tendermint blockchain contains all information needed to recreate previous milestones.

When the INX-TenderCoo plugin (and thus Tendermint) is restarted after a stop, it will query the node for the milestone matching the latest milestone present in its blockchain. As long as this milestone is still available (not pruned), the plugin can reconstruct its local state at that time. After this, replayed Tendermint blocks by other validators will eventually lead to a consistent state among all validators.

This means that, as long as the pruning interval of the connected node is longer than the maximum downtime INX-TenderCoo plugin, it can always be restarted without issues.

Config

Additional information on running Tendermint in production can be found here: Tendermint Core / Overview / Running in production

Tip Selection

Each validator proposes one tip to the consensus mechanism for selection as a milestone parent. This process is called Tip Selection and is based on the following algorithm:

Heaviest Tip Heuristic

Global

$\texttt{OnBlockSolid}(b)$

Input:

Steps:

$\texttt{Select}()$

Output:

Steps:

Implementation Details

Parameters: