Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Byron.Ledger.Config
Synopsis
- data family BlockConfig blk
- byronEpochSlots :: BlockConfig ByronBlock -> EpochSlots
- byronGenesisHash :: BlockConfig ByronBlock -> GenesisHash
- byronProtocolMagic :: BlockConfig ByronBlock -> ProtocolMagic
- byronProtocolMagicId :: BlockConfig ByronBlock -> ProtocolMagicId
- data family CodecConfig blk
- mkByronCodecConfig :: Config -> CodecConfig ByronBlock
- data family StorageConfig blk
- compactGenesisConfig :: Config -> Config
Block config
data family BlockConfig blk #
Instances
byronEpochSlots :: BlockConfig ByronBlock -> EpochSlots Source #
byronGenesisHash :: BlockConfig ByronBlock -> GenesisHash Source #
byronProtocolMagic :: BlockConfig ByronBlock -> ProtocolMagic Source #
byronProtocolMagicId :: BlockConfig ByronBlock -> ProtocolMagicId Source #
Codec config
data family CodecConfig blk #
Instances
mkByronCodecConfig :: Config -> CodecConfig ByronBlock Source #
Storage config
data family StorageConfig blk #
Instances
Compact genesis config
compactGenesisConfig :: Config -> Config Source #
Byron's genesis config contains the AVVM balances, of which there are +14k in mainnet's genesis config. These balances are only used to create the initial ledger state, there is no reason to keep them in memory afterwards.
This function empties the gdAvvmDistr
field in the genesis config. As we
keep Byron's genesis config in memory (even in later eras), this can save us
a bit of memory.