cardano-ledger-shelley-1.16.0.0: Shelley Ledger Executable Model
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Shelley.Genesis

Synopsis

Documentation

data ShelleyGenesisStaking Source #

Genesis Shelley staking configuration.

This allows us to configure some initial stake pools and delegation to them, in order to test Praos in a static configuration, without requiring on-chain registration and delegation.

For simplicity, pools defined in the genesis staking do not pay deposits for their registration.

Constructors

ShelleyGenesisStaking 

Fields

  • sgsPoolsListMap (KeyHash 'StakePool) PoolParams

    Pools to register

    The key in this map is the hash of the public key of the _pool_. This need not correspond to any payment or staking key, but must correspond to the cold key held by TPraosIsCoreNode.

  • sgsStakeListMap (KeyHash 'Staking) (KeyHash 'StakePool)

    Stake-holding key hash credentials and the pools to delegate that stake to. We require the raw staking key hash in order to:

    • Avoid pointer addresses, which would be tricky when there's no slot or transaction to point to.
    • Avoid script credentials.

Instances

Instances details
FromJSON ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

ToJSON ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Monoid ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Semigroup ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Generic ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Associated Types

type Rep ShelleyGenesisStakingTypeType #

Show ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

DecCBOR ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

EncCBOR ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Eq ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

NoThunks ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep ShelleyGenesisStaking Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep ShelleyGenesisStaking = D1 ('MetaData "ShelleyGenesisStaking" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyGenesisStaking" 'PrefixI 'True) (S1 ('MetaSel ('Just "sgsPools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'StakePool) PoolParams)) :*: S1 ('MetaSel ('Just "sgsStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'Staking) (KeyHash 'StakePool)))))

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

Instances details
FromJSON ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

ToJSON ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Generic ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Associated Types

type Rep ShelleyGenesisTypeType #

Show ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

FromCBOR ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

ToCBOR ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

DecCBOR ShelleyGenesis Source #

Genesis are always encoded with the version of era they are defined in.

Instance details

Defined in Cardano.Ledger.Shelley.Genesis

EncCBOR ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Eq ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

NoThunks ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep ShelleyGenesis = D1 ('MetaData "ShelleyGenesis" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyGenesis" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sgSystemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "sgNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "sgNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network))) :*: ((S1 ('MetaSel ('Just "sgActiveSlotsCoeff") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositiveUnitInterval) :*: S1 ('MetaSel ('Just "sgSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just "sgEpochLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochSize) :*: S1 ('MetaSel ('Just "sgSlotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)))) :*: (((S1 ('MetaSel ('Just "sgMaxKESEvolutions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgSlotLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTimeMicro)) :*: (S1 ('MetaSel ('Just "sgUpdateQuorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgMaxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "sgProtocolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams ShelleyEra)) :*: S1 ('MetaSel ('Just "sgGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'Genesis) GenDelegPair))) :*: (S1 ('MetaSel ('Just "sgInitialFunds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap Addr Coin)) :*: S1 ('MetaSel ('Just "sgStaking") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShelleyGenesisStaking))))))

newtype NominalDiffTimeMicro Source #

Unlike NominalDiffTime that supports Pico precision, this type only supports Micro precision.

Constructors

NominalDiffTimeMicro Micro 

Instances

Instances details
FromJSON NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

ToJSON NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Generic NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Associated Types

type Rep NominalDiffTimeMicroTypeType #

Num NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Fractional NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Real NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Show NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

DecCBOR NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

EncCBOR NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Eq NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Ord NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

NoThunks NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep NominalDiffTimeMicro Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep NominalDiffTimeMicro = D1 ('MetaData "NominalDiffTimeMicro" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.16.0.0-inplace" 'True) (C1 ('MetaCons "NominalDiffTimeMicro" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Micro)))

genesisUTxO ∷ ∀ era. EraTxOut era ⇒ ShelleyGenesisUTxO era Source #

initialFundsPseudoTxInAddrTxIn Source #

Compute the TxIn of the initial UTxO pseudo-transaction corresponding to the given address in the genesis initial funds.

The Shelley initial UTxO is constructed from the sgInitialFunds which is not a full UTxO but just a map from addresses to coin values.

This gets turned into a UTxO by making a pseudo-transaction for each address, with the 0th output being the coin value. So to spend from the initial UTxO we need this same TxIn to use as an input to the spending transaction.

validateGenesisShelleyGenesisEither [ValidationErr] () Source #

Do some basic sanity checking on the Shelley genesis file.

Orphan instances

EraGenesis ShelleyEra Source # 
Instance details

Associated Types

type Genesis ShelleyEra Source #