Expand description

§Highway

The core logic of Casper’ Highway consensus protocol.

At the center of Highway are:

  • the protocol state, a grow-only data structure which can be considered a directed acyclic graph (DAG), and needs to be continually synchronized among the participating nodes,
  • rules for the active participants — the validators — to create and add new vertices, and
  • a finality detector that provides a criterion to consider a block “finalized”. Finalized blocks are guaranteed to remain finalized as the DAG grows further, unless too many validators are malicious.

It’s not a complete protocol. To implement permissioned consensus, several components must be added:

  • Networking, serialization and cryptographic primitives for signing and hashing.
  • A synchronizer that exchanges messages with other participating nodes to exchange their DAG vertices and ensure that each vertex becomes eventually known to every node.
  • Semantics for the consensus values, which can e.g. represent token transfers, or programs to be executed in a virtual machine for a smart contract platform.
  • Signing of finalized blocks, as a finality proof to third parties/clients.

Note that consensus values should be small. If they represent a lot of data, e.g. lists of complex transactions, they should not be passed into highway_core directly. Instead, the consensus value should be the list’s hash.

Permissioned consensus protocols can also be used in a permissionless Proof-of-Stake context, or with some other governance system that can add and remove validators, by starting a new protocol instance whenever the set of validators changes.

Modules§

  • Functions for detecting finality of proposed blocks and calculating rewards.
  • The implementation of the Highway consensus protocol.

Structs§

  • A passive instance of the Highway protocol, containing its local state.

Enums§

  • The observed behavior of a validator at some point in time.

Type Aliases§

  • The observed behavior of all validators at some point in time.