cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Type.Genesis

Description

Conversion of the network's per-era genesis configuration to the UTxO RPC Genesis message.

The Genesis message has one field per Byron, Shelley, Alonzo and Conway genesis parameter. Each era is mapped by an updater over one shared accumulator (byronGenesisToProto, shelleyGenesisToProto, alonzoGenesisToProto, conwayGenesisToProto); genesisBundleToProto threads a single defMessage through all four. The shared accumulator lets Alonzo and Conway both contribute to the single cost_models field (PlutusV1 from Alonzo, PlutusV3 from Conway) without any message merge.

Synopsis

Documentation

genesisBundleToProto :: GenesisBundle -> Proto Genesis Source #

Convert the network's genesis bundle to the UTxO RPC Genesis message, populating the Byron, Shelley, Alonzo and Conway fields.

Per-era mappers

Exported for differential fixture testing against real genesis JSON (see Test.Cardano.Rpc.Genesis.Fixture); not part of the public API.