cardano-ledger-byron-1.0.1.0: The blockchain layer of Cardano during the Byron era
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Chain.Block.Boundary

Description

Boundary blocks have been deprecated, but we keep functions to decode them

Synopsis

Documentation

dropBoundaryExtraHeaderDataRetainGenesisTagDecoder s Bool Source #

When starting a new chain in ourorobos-consensus, we often start from a non-zero epoch. This is done in order to ensure synchronisation between nodes - we assume that the chain started at some fixed point in the past (e.g. midnight) which all nodes can agree on despite different node start times. However, the standard deserialisation assumes that the genesis EBB is precisely that in epoch zero.

In order to successfully round-trip a genesis EBB in a non-zero epoch, then, we add a "magic" tag which indicates the presense of the genesis hash. The choice of 255 and the word Genesis is completely arbitrary, and only done to correspond with the matching encoder. This encoding will only ever be seen when processing blocks from a demo.