| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api.Genesis
Synopsis
- data ShelleyGenesis = ShelleyGenesis {
- sgSystemStart :: !UTCTime
- sgNetworkMagic :: !Word32
- sgNetworkId :: !Network
- sgActiveSlotsCoeff :: !PositiveUnitInterval
- sgSecurityParam :: !(NonZero Word64)
- sgEpochLength :: !EpochSize
- sgSlotsPerKESPeriod :: !Word64
- sgMaxKESEvolutions :: !Word64
- sgSlotLength :: !NominalDiffTimeMicro
- sgUpdateQuorum :: !Word64
- sgMaxLovelaceSupply :: !Word64
- sgProtocolParams :: !(PParams ShelleyEra)
- sgGenDelegs :: !(Map (KeyHash 'GenesisRole) GenDelegPair)
- sgInitialFunds :: ListMap Addr Coin
- sgStaking :: ShelleyGenesisStaking
- shelleyGenesisDefaults :: ShelleyGenesis
- alonzoGenesisDefaults :: AlonzoGenesis
- conwayGenesisDefaults :: ConwayGenesis
- dijkstraGenesisDefaults :: DijkstraGenesis
- defaultV1CostModel :: CostModel
- type ByronGenesisConfig = Config
- type ShelleyGenesisConfig = ShelleyConfig
- type AlonzoGenesisConfig = AlonzoGenesis
- type ConwayGenesisConfig = ConwayGenesis
- data ShelleyConfig = ShelleyConfig {}
- newtype GenesisHashByron = GenesisHashByron {}
- newtype GenesisHashShelley = GenesisHashShelley {}
- newtype GenesisHashAlonzo = GenesisHashAlonzo {}
- newtype GenesisHashConway = GenesisHashConway {}
- type ByronGenesisFile = File ByronGenesisConfig
- type ShelleyGenesisFile = File ShelleyGenesisConfig
- type AlonzoGenesisFile = File AlonzoGenesisConfig
- type ConwayGenesisFile = File ConwayGenesisConfig
- data GenesisParameters era = GenesisParameters {
- protocolParamSystemStart :: UTCTime
- protocolParamNetworkId :: NetworkId
- protocolParamActiveSlotsCoefficient :: Rational
- protocolParamSecurity :: NonZero Word64
- protocolParamEpochLength :: EpochSize
- protocolParamSlotLength :: NominalDiffTime
- protocolParamSlotsPerKESPeriod :: Int
- protocolParamMaxKESEvolutions :: Int
- protocolParamUpdateQuorum :: Int
- protocolParamMaxLovelaceSupply :: Coin
- protocolInitialUpdateableProtocolParameters :: PParams (ShelleyLedgerEra era)
- newtype EpochSize = EpochSize {}
- unsafeBoundedRational :: (HasCallStack, Typeable r, BoundedRational r) => Rational -> r
- fromShelleyGenesis :: ShelleyGenesis -> GenesisParameters ShelleyEra
Documentation
data ShelleyGenesis Source #
Shelley genesis information
Note that this is needed only for a pure Shelley network, hence it being defined here rather than in its own module. In mainnet, Shelley will transition naturally from Byron, and thus will never have its own genesis information.
Constructors
| ShelleyGenesis | |
Fields
| |
Instances
shelleyGenesisDefaults :: ShelleyGenesis Source #
Some reasonable starting defaults for constructing a ShelleyGenesis.
You must override at least the following fields for this to be useful:
sgSystemStartthe time of the first blocksgNetworkMagicto a suitable testnet or mainnet network magic number.sgGenDelegsto have some initial nodessgInitialFundsto have any money in the systemsgMaxLovelaceSupplymust be at least the sum of thesgInitialFundsbut more if you want to allow for rewards.
alonzoGenesisDefaults :: AlonzoGenesis Source #
Some reasonable starting defaults for constructing a AlonzoGenesis.
Based on https://github.com/IntersectMBO/cardano-node/blob/master/cardano-testnet/src/Testnet/Defaults.hs
conwayGenesisDefaults :: ConwayGenesis Source #
Some reasonable starting defaults for constructing a ConwayGenesis.
Based on https://github.com/IntersectMBO/cardano-node/blob/master/cardano-testnet/src/Testnet/Defaults.hs
Configuration
type ByronGenesisConfig = Config Source #
type ShelleyGenesisConfig = ShelleyConfig Source #
type AlonzoGenesisConfig = AlonzoGenesis Source #
type ConwayGenesisConfig = ConwayGenesis Source #
data ShelleyConfig Source #
Constructors
| ShelleyConfig | |
Fields | |
newtype GenesisHashByron Source #
Constructors
| GenesisHashByron | |
Fields | |
Instances
| Eq GenesisHashByron Source # | |
Defined in Cardano.Api.Genesis.Internal Methods (==) :: GenesisHashByron -> GenesisHashByron -> Bool Source # (/=) :: GenesisHashByron -> GenesisHashByron -> Bool Source # | |
| Show GenesisHashByron Source # | |
Defined in Cardano.Api.Genesis.Internal | |
newtype GenesisHashShelley Source #
Constructors
| GenesisHashShelley | |
Fields | |
Instances
| Eq GenesisHashShelley Source # | |
Defined in Cardano.Api.Genesis.Internal Methods (==) :: GenesisHashShelley -> GenesisHashShelley -> Bool Source # (/=) :: GenesisHashShelley -> GenesisHashShelley -> Bool Source # | |
| Show GenesisHashShelley Source # | |
Defined in Cardano.Api.Genesis.Internal | |
newtype GenesisHashAlonzo Source #
Constructors
| GenesisHashAlonzo | |
Fields | |
Instances
| Eq GenesisHashAlonzo Source # | |
Defined in Cardano.Api.Genesis.Internal Methods (==) :: GenesisHashAlonzo -> GenesisHashAlonzo -> Bool Source # (/=) :: GenesisHashAlonzo -> GenesisHashAlonzo -> Bool Source # | |
| Show GenesisHashAlonzo Source # | |
Defined in Cardano.Api.Genesis.Internal | |
newtype GenesisHashConway Source #
Constructors
| GenesisHashConway | |
Fields | |
Instances
| Eq GenesisHashConway Source # | |
Defined in Cardano.Api.Genesis.Internal Methods (==) :: GenesisHashConway -> GenesisHashConway -> Bool Source # (/=) :: GenesisHashConway -> GenesisHashConway -> Bool Source # | |
| Show GenesisHashConway Source # | |
Defined in Cardano.Api.Genesis.Internal | |
Files
Protocol parameters fixed in the genesis file
data GenesisParameters era Source #
Constructors
| GenesisParameters | |
Fields
| |
Constructors
| EpochSize | |
Fields | |
Instances
| FromJSON EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot | |||||
| ToJSON EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot | |||||
| FromCBOR EpochSize Source # | |||||
| ToCBOR EpochSize Source # | |||||
| DecCBOR EpochSize Source # | |||||
| EncCBOR EpochSize Source # | |||||
| NFData EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot | |||||
| Eq EpochSize Source # | |||||
| Ord EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot | |||||
| Enum EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot Methods succ :: EpochSize -> EpochSize Source # pred :: EpochSize -> EpochSize Source # toEnum :: Int -> EpochSize Source # fromEnum :: EpochSize -> Int Source # enumFrom :: EpochSize -> [EpochSize] Source # enumFromThen :: EpochSize -> EpochSize -> [EpochSize] Source # enumFromTo :: EpochSize -> EpochSize -> [EpochSize] Source # enumFromThenTo :: EpochSize -> EpochSize -> EpochSize -> [EpochSize] Source # | |||||
| Generic EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot Associated Types
| |||||
| Show EpochSize Source # | |||||
| NoThunks EpochSize Source # | |||||
| type Rep EpochSize Source # | |||||
Defined in Cardano.Slotting.Slot type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-572da24c8f9f31a4508c830415892e3bef0822dd3af95c8c7c1ac561b5a52a15" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
Utilities
unsafeBoundedRational :: (HasCallStack, Typeable r, BoundedRational r) => Rational -> r Source #
Convert Rational to a bounded rational. Throw an exception when the rational is out of bounds.