ouroboros-consensus-byron-0.1.0.0: Byron ledger integration in the Ouroboros consensus layer
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Byron.Ledger.Config

Synopsis

Block config

data family BlockConfig blk Source #

Static configuration required to work with this type of blocks

Instances

Instances details
Generic (BlockConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Associated Types

type Rep (BlockConfig ByronBlock) ∷ TypeType Source #

NoThunks (BlockConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Methods

noThunks ∷ Context → BlockConfig ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig ByronBlock) → String #

data BlockConfig ByronBlock Source #

Extended configuration we need for Byron

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

data BlockConfig ByronBlock = ByronConfig {}
type Rep (BlockConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (BlockConfig ByronBlock) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-byron-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ByronConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronGenesisConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Config) :*: (S1 ('MetaSel ('Just "byronProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ProtocolVersion) :*: S1 ('MetaSel ('Just "byronSoftwareVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SoftwareVersion))))

Codec config

data family CodecConfig blk Source #

Static configuration required for serialisation and deserialisation of types pertaining to this type of block.

Data family instead of type family to get better type inference.

Instances

Instances details
Generic (CodecConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Associated Types

type Rep (CodecConfig ByronBlock) ∷ TypeType Source #

NoThunks (CodecConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Methods

noThunks ∷ Context → CodecConfig ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig ByronBlock) → String #

newtype CodecConfig ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (CodecConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (CodecConfig ByronBlock) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-byron-0.1.0.0-inplace" 'True) (C1 ('MetaCons "ByronCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochSlots)))

Storage config

data family StorageConfig blk Source #

Config needed for the NodeInitStorage class. Defined here to avoid circular dependencies.

Instances

Instances details
Generic (StorageConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Associated Types

type Rep (StorageConfig ByronBlock) ∷ TypeType Source #

NoThunks (StorageConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Methods

noThunks ∷ Context → StorageConfig ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig ByronBlock) → String #

newtype StorageConfig ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (StorageConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (StorageConfig ByronBlock) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-byron-0.1.0.0-inplace" 'True) (C1 ('MetaCons "ByronStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronBlockConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BlockConfig ByronBlock))))

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.

Orphan instances

Generic (BlockConfig ByronBlock) Source # 
Instance details

Associated Types

type Rep (BlockConfig ByronBlock) ∷ TypeType Source #

Generic (CodecConfig ByronBlock) Source # 
Instance details

Associated Types

type Rep (CodecConfig ByronBlock) ∷ TypeType Source #

Generic (StorageConfig ByronBlock) Source # 
Instance details

Associated Types

type Rep (StorageConfig ByronBlock) ∷ TypeType Source #

NoThunks (BlockConfig ByronBlock) Source # 
Instance details

Methods

noThunks ∷ Context → BlockConfig ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig ByronBlock) → String #

NoThunks (CodecConfig ByronBlock) Source # 
Instance details

Methods

noThunks ∷ Context → CodecConfig ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig ByronBlock) → String #

NoThunks (StorageConfig ByronBlock) Source # 
Instance details

Methods

noThunks ∷ Context → StorageConfig ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig ByronBlock) → String #