Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Ledger.Shelley.API.Types
Synopsis
- data StrictMaybe a
- bbody ∷ Block h era → TxSeq era
- bheader ∷ Block h era → h
- data Block h era where
- Block' !h !(TxSeq era) ByteString
- pattern UnserialisedBlock ∷ h → TxSeq era → Block h era
- pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era
- pattern Block ∷ (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era
- balance ∷ EraTxOut era ⇒ UTxO era → Value era
- newtype UTxO era = UTxO {}
- data InstantaneousRewards = InstantaneousRewards {
- iRReserves ∷ !(Map (Credential 'Staking) Coin)
- iRTreasury ∷ !(Map (Credential 'Staking) Coin)
- deltaReserves ∷ !DeltaCoin
- deltaTreasury ∷ !DeltaCoin
- data DState era = DState {}
- data PState era = PState {
- psStakePoolParams ∷ !(Map (KeyHash 'StakePool) PoolParams)
- psFutureStakePoolParams ∷ !(Map (KeyHash 'StakePool) PoolParams)
- psRetiring ∷ !(Map (KeyHash 'StakePool) EpochNo)
- psDeposits ∷ !(Map (KeyHash 'StakePool) Coin)
- data VState era = VState {
- vsDReps ∷ !(Map (Credential 'DRepRole) DRepState)
- vsCommitteeState ∷ !(CommitteeState era)
- vsNumDormantEpochs ∷ !EpochNo
- type family CertState era = (r ∷ Type) | r → era
- class (Era era, ToJSON (CertState era), EncCBOR (CertState era), DecShareCBOR (CertState era), Share (CertState era) ~ (Interns (Credential 'Staking), Interns (KeyHash 'StakePool), Interns (Credential 'DRepRole), Interns (Credential 'HotCommitteeRole)), Default (CertState era), NoThunks (CertState era), NFData (CertState era), Show (CertState era), Eq (CertState era), Generic (CertState era)) ⇒ EraCertState era where
- type CertState era = (r ∷ Type) | r → era
- mkCertState ∷ VState era → PState era → DState era → CertState era
- upgradeCertState ∷ CertState (PreviousEra era) → CertState era
- certDStateL ∷ Lens' (CertState era) (DState era)
- certPStateL ∷ Lens' (CertState era) (PState era)
- certVStateL ∷ Lens' (CertState era) (VState era)
- obligationCertState ∷ CertState era → Obligations
- certsTotalDepositsTxBody ∷ PParams era → CertState era → TxBody era → Coin
- certsTotalRefundsTxBody ∷ PParams era → CertState era → TxBody era → Coin
- calculatePoolDistr' ∷ (KeyHash 'StakePool → Bool) → SnapShot → PoolDistr
- calculatePoolDistr ∷ SnapShot → PoolDistr
- newtype Stake = Stake {
- unStake ∷ VMap VB VP (Credential 'Staking) (CompactForm Coin)
- data SnapShot = SnapShot {
- ssStake ∷ !Stake
- ssDelegations ∷ !(VMap VB VB (Credential 'Staking) (KeyHash 'StakePool))
- ssPoolParams ∷ !(VMap VB VB (KeyHash 'StakePool) PoolParams)
- data SnapShots = SnapShots {}
- newtype TxId = TxId {}
- data TxIn = TxIn !TxId !TxIx
- individualPoolStake ∷ IndividualPoolStake → Rational
- data PoolDistr = PoolDistr {}
- data AccountState = AccountState {
- asTreasury ∷ !Coin
- asReserves ∷ !Coin
- isOverlaySlot ∷ SlotNo → UnitInterval → SlotNo → Bool
- data PoolCert
- = RegPool !PoolParams
- | RetirePool !(KeyHash 'StakePool) !EpochNo
- data PoolMetadata = PoolMetadata {
- pmUrl ∷ !Url
- pmHash ∷ !ByteString
- data StakePoolRelay
- = SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6)
- | SingleHostName !(StrictMaybe Port) !DnsName
- | MultiHostName !DnsName
- data PoolParams = PoolParams {
- ppId ∷ !(KeyHash 'StakePool)
- ppVrf ∷ !(VRFVerKeyHash 'StakePoolVRF)
- ppPledge ∷ !Coin
- ppCost ∷ !Coin
- ppMargin ∷ !UnitInterval
- ppRewardAccount ∷ !RewardAccount
- ppOwners ∷ !(Set (KeyHash 'Staking))
- ppRelays ∷ !(StrictSeq StakePoolRelay)
- ppMetadata ∷ !(StrictMaybe PoolMetadata)
- data Addr
- data RewardAccount = RewardAccount {
- raNetwork ∷ !Network
- raCredential ∷ !(Credential 'Staking)
- newtype Withdrawals = Withdrawals {}
- word64ToCoin ∷ Word64 → Coin
- newtype Coin = Coin {}
- data Credential (kr ∷ KeyRole)
- = ScriptHashObj !ScriptHash
- | KeyHashObj !(KeyHash kr)
- data StakeReference
- data Ptr = Ptr !SlotNo32 !TxIx !CertIx
- certIxFromIntegral ∷ (Integral a, MonadFail m) ⇒ a → m CertIx
- certIxToInt ∷ CertIx → Int
- txIxFromIntegral ∷ (Integral a, MonadFail m) ⇒ a → m TxIx
- txIxToInt ∷ TxIx → Int
- data ProtVer = ProtVer {}
- data Nonce
- = Nonce !(Hash Blake2b_256 Nonce)
- | NeutralNonce
- newtype Port = Port {}
- data Globals = Globals {
- epochInfo ∷ !(EpochInfo (Either Text))
- slotsPerKESPeriod ∷ !Word64
- stabilityWindow ∷ !Word64
- randomnessStabilisationWindow ∷ !Word64
- securityParameter ∷ !(NonZero Word64)
- maxKESEvo ∷ !Word64
- quorum ∷ !Word64
- maxLovelaceSupply ∷ !Word64
- activeSlotCoeff ∷ !ActiveSlotCoeff
- networkId ∷ !Network
- systemStart ∷ !SystemStart
- data Network
- data TxIx
- data CertIx
- hashVerKeyVRF ∷ ∀ c (r ∷ KeyRoleVRF). Crypto c ⇒ VerKeyVRF (VRF c) → VRFVerKeyHash r
- type Hash = Hash HASH
- type SignedDSIGN = SignedDSIGN DSIGN
- type SignKeyDSIGN = SignKeyDSIGN DSIGN
- type KESignable c = Signable (KES c)
- type SignedKES c = SignedKES (KES c)
- type SignKeyKES c = SignKeyKES (KES c)
- type VerKeyKES c = VerKeyKES (KES c)
- type CertifiedVRF c = CertifiedVRF (VRF c)
- type SignKeyVRF c = SignKeyVRF (VRF c)
- type VerKeyVRF c = VerKeyVRF (VRF c)
- data BootstrapWitness where
- pattern BootstrapWitness ∷ VKey 'Witness → SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody) → ChainCode → ByteString → BootstrapWitness
- data WitVKey (kr ∷ KeyRole) where
- pattern WitVKey ∷ Typeable kr ⇒ VKey kr → SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody) → WitVKey kr
- hashKey ∷ ∀ (kd ∷ KeyRole). VKey kd → KeyHash kd
- newtype KeyHash (r ∷ KeyRole) = KeyHash {}
- newtype ScriptHash = ScriptHash (Hash ADDRHASH EraIndependentScript)
- data GenDelegPair = GenDelegPair {}
- newtype GenDelegs = GenDelegs {}
- data KeyRole
- coerceKeyRole ∷ ∀ (r ∷ KeyRole) (r' ∷ KeyRole). HasKeyRole a ⇒ a r → a r'
- newtype VKey (kd ∷ KeyRole) = VKey {}
- data Metadatum
- data ShelleyUTXOW era
- data ShelleyUTXO era
- data ShelleyTICKF era
- data ShelleyTICK era
- data ShelleyPPUP era
- data ShelleyPOOLREAP era
- data ShelleyPOOL era
- data ShelleyNEWEPOCH era
- data ShelleyLEDGERS era
- data ShelleyLEDGER era
- data ShelleyDELPL era
- data ShelleyDELEGS era
- data ShelleyDELEG era
- newtype ProposedPPUpdates era = ProposedPPUpdates (Map (KeyHash 'Genesis) (PParamsUpdate era))
- data Update era = Update !(ProposedPPUpdates era) !EpochNo
- data ShelleyGovState era = ShelleyGovState {
- sgsCurProposals ∷ !(ProposedPPUpdates era)
- sgsFutureProposals ∷ !(ProposedPPUpdates era)
- sgsCurPParams ∷ !(PParams era)
- sgsPrevPParams ∷ !(PParams era)
- sgsFuturePParams ∷ !(FuturePParams era)
- data NonMyopic
- data RewardUpdate = RewardUpdate {}
- data PpupEnv era = PPUPEnv SlotNo (PParams era) GenDelegs
- data MultiSig era
- computeStabilityWindow ∷ Word64 → ActiveSlotCoeff → Word64
- computeRandomnessStabilisationWindow ∷ Word64 → ActiveSlotCoeff → Word64
- data ValidationErr
- 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 'Genesis) GenDelegPair)
- sgInitialFunds ∷ ListMap Addr Coin
- sgStaking ∷ ShelleyGenesisStaking
- newtype NominalDiffTimeMicro = NominalDiffTimeMicro Micro
- data ShelleyGenesisStaking = ShelleyGenesisStaking {}
- emptyGenesisStaking ∷ ShelleyGenesisStaking
- fromNominalDiffTimeMicro ∷ NominalDiffTimeMicro → NominalDiffTime
- toNominalDiffTimeMicroWithRounding ∷ NominalDiffTime → NominalDiffTimeMicro
- toNominalDiffTimeMicro ∷ NominalDiffTime → Maybe NominalDiffTimeMicro
- secondsToNominalDiffTimeMicro ∷ Micro → NominalDiffTimeMicro
- nominalDiffTimeMicroToMicroseconds ∷ NominalDiffTimeMicro → Micro
- nominalDiffTimeMicroToSeconds ∷ NominalDiffTimeMicro → Pico
- sgInitialFundsL ∷ Lens' ShelleyGenesis (ListMap Addr Coin)
- sgStakingL ∷ Lens' ShelleyGenesis ShelleyGenesisStaking
- sgActiveSlotCoeff ∷ ShelleyGenesis → ActiveSlotCoeff
- toShelleyGenesisPairs ∷ KeyValue e a ⇒ ShelleyGenesis → [a]
- genesisUTxO ∷ ∀ era. EraTxOut era ⇒ ShelleyGenesis → UTxO era
- initialFundsPseudoTxIn ∷ Addr → TxIn
- describeValidationErr ∷ ValidationErr → Text
- validateGenesis ∷ ShelleyGenesis → Either [ValidationErr] ()
- mkShelleyGlobals ∷ ShelleyGenesis → EpochInfo (Either Text) → Globals
- data ShelleyTxAuxData era where
- pattern ShelleyTxAuxData ∷ ∀ era. Era era ⇒ Map Word64 Metadatum → ShelleyTxAuxData era
- data ShelleyDelegCert
- data MIRCert = MIRCert {
- mirPot ∷ !MIRPot
- mirRewards ∷ !MIRTarget
- data MIRTarget
- data MIRPot
- data GenesisDelegCert = GenesisDelegCert !(KeyHash 'Genesis) !(KeyHash 'GenesisDelegate) !(VRFVerKeyHash 'GenDelegVRF)
- data ShelleyTxOut era where
- TxOutCompact !CompactAddr !(CompactForm (Value era))
- pattern ShelleyTxOut ∷ (HasCallStack, Era era, Val (Value era)) ⇒ Addr → Value era → ShelleyTxOut era
- newtype ShelleyTxBody era where
- TxBodyConstr (MemoBytes (ShelleyTxBodyRaw era))
- pattern ShelleyTxBody ∷ ∀ era. (EraTxOut era, EncCBOR (TxCert era)) ⇒ Set TxIn → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals → Coin → SlotNo → StrictMaybe (Update era) → StrictMaybe TxAuxDataHash → ShelleyTxBody era
- data ShelleyTxWits era
- data ShelleyTx era where
- data LedgerState era = LedgerState {
- lsUTxOState ∷ !(UTxOState era)
- lsCertState ∷ !(CertState era)
- data NewEpochState era = NewEpochState {
- nesEL ∷ !EpochNo
- nesBprev ∷ !BlocksMade
- nesBcur ∷ !BlocksMade
- nesEs ∷ !(EpochState era)
- nesRu ∷ !(StrictMaybe PulsingRewUpdate)
- nesPd ∷ !PoolDistr
- stashedAVVMAddresses ∷ !(StashedAVVMAddresses era)
- data UTxOState era = UTxOState {
- utxosUtxo ∷ !(UTxO era)
- utxosDeposited ∷ !Coin
- utxosFees ∷ !Coin
- utxosGovState ∷ !(GovState era)
- utxosStakeDistr ∷ !IncrementalStake
- utxosDonation ∷ !Coin
- data IncrementalStake = IStake {
- credMap ∷ !(Map (Credential 'Staking) (CompactForm Coin))
- ptrMap ∷ !(Map Ptr (CompactForm Coin))
- data EpochState era = EpochState {
- esAccountState ∷ !AccountState
- esLState ∷ !(LedgerState era)
- esSnapshots ∷ !SnapShots
- esNonMyopic ∷ !NonMyopic
- bbHash ∷ ShelleyTxSeq era → Hash HASH EraIndependentBlockBody
- data UtxoEnv era = UtxoEnv {}
- data SnapEnv era = SnapEnv (LedgerState era) (PParams era)
- data PoolEnv era = PoolEnv EpochNo (PParams era)
- data DelegEnv era = DelegEnv {
- slotNo ∷ SlotNo
- deCurEpochNo ∷ EpochNo
- ptr_ ∷ Ptr
- acnt_ ∷ AccountState
- ppDE ∷ PParams era
- data DelplEnv era = DelplEnv {}
- data DelegsEnv era = DelegsEnv {
- delegsSlotNo ∷ SlotNo
- delegsEpochNo ∷ EpochNo
- delegsIx ∷ TxIx
- delegspp ∷ PParams era
- delegsTx ∷ Tx era
- delegsAccount ∷ AccountState
- data LedgerEnv era = LedgerEnv {}
- data ShelleyLedgersEnv era = LedgersEnv {}
Documentation
data StrictMaybe a Source #
Instances
Constructors
Block' !h !(TxSeq era) ByteString |
Bundled Patterns
pattern UnserialisedBlock ∷ h → TxSeq era → Block h era | Access a block without its serialised bytes. This is often useful when
we're using a |
pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era | Unsafely construct a block without the ability to serialise its bytes. Anyone calling this pattern must ensure that the resulting block is never serialised. Any uses of this pattern outside of testing code should be regarded with suspicion. |
pattern Block ∷ (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era |
Instances
(EraSegWits era, DecCBOR (Annotator h), Typeable h) ⇒ DecCBOR (Annotator (Block h era)) | |
Generic (Block h era) | |
(Era era, Show (TxSeq era), Show h) ⇒ Show (Block h era) | |
(EraTx era, Typeable h) ⇒ ToCBOR (Block h era) | |
(EraSegWits era, DecCBOR h, DecCBOR (TxSeq era)) ⇒ DecCBOR (Block h era) | |
(EraTx era, Typeable h) ⇒ EncCBOR (Block h era) | |
(Era era, Eq (TxSeq era), Eq h) ⇒ Eq (Block h era) | |
(Era era, NoThunks (TxSeq era), NoThunks h) ⇒ NoThunks (Block h era) | |
type Rep (Block h era) | |
Defined in Cardano.Ledger.Block type Rep (Block h era) = D1 ('MetaData "Block" "Cardano.Ledger.Block" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Block'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 h) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxSeq era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))) |
balance ∷ EraTxOut era ⇒ UTxO era → Value era Source #
Determine the total balance contained in the UTxO.
The unspent transaction outputs.
Instances
CanGetUTxO UTxO | |
Defined in Cardano.Ledger.State.UTxO | |
CanSetUTxO UTxO | |
ToJSON (TxOut era) ⇒ ToJSON (UTxO era) | |
Era era ⇒ Monoid (UTxO era) | |
Semigroup (UTxO era) | |
Generic (UTxO era) | |
Show (TxOut era) ⇒ Show (UTxO era) | |
(DecCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) | |
(EncCBOR (TxOut era), Era era) ⇒ ToCBOR (UTxO era) | |
(Era era, DecCBOR (TxOut era)) ⇒ DecCBOR (UTxO era) | |
(DecShareCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking)) ⇒ DecShareCBOR (UTxO era) | |
(Era era, EncCBOR (TxOut era)) ⇒ EncCBOR (UTxO era) | |
Default (UTxO era) | |
Defined in Cardano.Ledger.State.UTxO | |
(Era era, NFData (TxOut era)) ⇒ NFData (UTxO era) | |
Defined in Cardano.Ledger.State.UTxO | |
(Era era, Eq (TxOut era)) ⇒ Eq (UTxO era) | |
NoThunks (TxOut era) ⇒ NoThunks (UTxO era) | |
type Rep (UTxO era) | |
Defined in Cardano.Ledger.State.UTxO | |
type Share (UTxO era) | |
data InstantaneousRewards Source #
InstantaneousRewards captures the pending changes to the ledger state caused by MIR certificates. It consists of two mappings, the rewards which will be paid out from the reserves and the rewards which will be paid out from the treasury. It also consists of two coin values which represent the transfer of coins from one pot to the other pot. NOTE that the following property should always hold: deltaReserves + deltaTreasury = 0
Constructors
InstantaneousRewards | |
Fields
|
Instances
The state used by the DELEG rule, which roughly tracks stake delegation and some governance features.
Constructors
DState | |
Fields
|
Instances
ToJSON (DState era) | |
Generic (DState era) | |
Show (DState era) | |
DecShareCBOR (DState era) | |
Era era ⇒ EncCBOR (DState era) | |
Default (DState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (DState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (DState era) | |
NoThunks (DState era) | |
type Rep (DState era) | |
Defined in Cardano.Ledger.CertState type Rep (DState era) = D1 ('MetaData "DState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "DState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dsUnified") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UMap) :*: S1 ('MetaSel ('Just "dsFutureGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map FutureGenDeleg GenDelegPair))) :*: (S1 ('MetaSel ('Just "dsGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GenDelegs) :*: S1 ('MetaSel ('Just "dsIRewards") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InstantaneousRewards)))) | |
type Share (DState era) | |
The state used by the POOL rule, which tracks stake pool information.
Constructors
PState | |
Fields
|
Instances
ToJSON (PState era) | |
Generic (PState era) | |
Show (PState era) | |
(Era era, DecShareCBOR (PState era)) ⇒ DecCBOR (PState era) | |
DecShareCBOR (PState era) | |
Era era ⇒ EncCBOR (PState era) | |
Default (PState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (PState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (PState era) | |
NoThunks (PState era) | |
type Rep (PState era) | |
Defined in Cardano.Ledger.CertState type Rep (PState era) = D1 ('MetaData "PState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "PState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "psStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) PoolParams)) :*: S1 ('MetaSel ('Just "psFutureStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) PoolParams))) :*: (S1 ('MetaSel ('Just "psRetiring") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) EpochNo)) :*: S1 ('MetaSel ('Just "psDeposits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Coin))))) | |
type Share (PState era) | |
The state that tracks the voting entities (DReps and Constitutional Committee
members). In the formal ledger specification this type is called GState
Constructors
VState | |
Fields
|
Instances
ToJSON (VState era) | |
Generic (VState era) | |
Show (VState era) | |
Era era ⇒ DecCBOR (VState era) | |
Era era ⇒ DecShareCBOR (VState era) | |
Era era ⇒ EncCBOR (VState era) | |
Default (VState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (VState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (VState era) | |
NoThunks (VState era) | |
type Rep (VState era) | |
Defined in Cardano.Ledger.CertState type Rep (VState era) = D1 ('MetaData "VState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "VState" 'PrefixI 'True) (S1 ('MetaSel ('Just "vsDReps") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'DRepRole) DRepState)) :*: (S1 ('MetaSel ('Just "vsCommitteeState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommitteeState era)) :*: S1 ('MetaSel ('Just "vsNumDormantEpochs") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo)))) | |
type Share (VState era) | |
type family CertState era = (r ∷ Type) | r → era Source #
Instances
type CertState ShelleyEra Source # | |
Defined in Cardano.Ledger.Shelley.CertState |
class (Era era, ToJSON (CertState era), EncCBOR (CertState era), DecShareCBOR (CertState era), Share (CertState era) ~ (Interns (Credential 'Staking), Interns (KeyHash 'StakePool), Interns (Credential 'DRepRole), Interns (Credential 'HotCommitteeRole)), Default (CertState era), NoThunks (CertState era), NFData (CertState era), Show (CertState era), Eq (CertState era), Generic (CertState era)) ⇒ EraCertState era where Source #
The state associated with the DELPL rule, which combines the DELEG rule and the POOL rule.
Methods
mkCertState ∷ VState era → PState era → DState era → CertState era Source #
upgradeCertState ∷ CertState (PreviousEra era) → CertState era Source #
certDStateL ∷ Lens' (CertState era) (DState era) Source #
certPStateL ∷ Lens' (CertState era) (PState era) Source #
certVStateL ∷ Lens' (CertState era) (VState era) Source #
obligationCertState ∷ CertState era → Obligations Source #
Calculate total possible refunds in the system that are related to certificates
There is an invariant that the sum of all the fields should be the same as the utxosDeposited field of the UTxOState. Note that this does not depend upon the current values of the Key and Pool deposits of the PParams.
certsTotalDepositsTxBody ∷ PParams era → CertState era → TxBody era → Coin Source #
Compute the total deposits from the Certs of a TxBody.
This is the contribution of a TxBody towards the deposit pot (utxosDeposit field of the UTxOState) of the system
certsTotalRefundsTxBody ∷ PParams era → CertState era → TxBody era → Coin Source #
Compute the total refunds from the Certs of a TxBody.
This is the contribution of a TxBody towards the total Obligations
of the system
See Obligations
and obligationCertState
for more information.
Instances
EraCertState ShelleyEra Source # | |
Defined in Cardano.Ledger.Shelley.CertState Associated Types type CertState ShelleyEra = (r ∷ Type) Source # Methods mkCertState ∷ VState ShelleyEra → PState ShelleyEra → DState ShelleyEra → CertState ShelleyEra Source # upgradeCertState ∷ CertState (PreviousEra ShelleyEra) → CertState ShelleyEra Source # certDStateL ∷ Lens' (CertState ShelleyEra) (DState ShelleyEra) Source # certPStateL ∷ Lens' (CertState ShelleyEra) (PState ShelleyEra) Source # certVStateL ∷ Lens' (CertState ShelleyEra) (VState ShelleyEra) Source # obligationCertState ∷ CertState ShelleyEra → Obligations Source # certsTotalDepositsTxBody ∷ PParams ShelleyEra → CertState ShelleyEra → TxBody ShelleyEra → Coin Source # certsTotalRefundsTxBody ∷ PParams ShelleyEra → CertState ShelleyEra → TxBody ShelleyEra → Coin Source # |
Type of stake as map from hash key to coins associated.
Constructors
Stake | |
Fields
|
Instances
ToJSON Stake | |
Generic Stake | |
Show Stake | |
DecShareCBOR Stake | |
EncCBOR Stake | |
NFData Stake | |
Defined in Cardano.Ledger.State.SnapShots | |
Eq Stake | |
NoThunks Stake | |
type Rep Stake | |
Defined in Cardano.Ledger.State.SnapShots type Rep Stake = D1 ('MetaData "Stake" "Cardano.Ledger.State.SnapShots" "cardano-ledger-core-1.17.0.0-inplace" 'True) (C1 ('MetaCons "Stake" 'PrefixI 'True) (S1 ('MetaSel ('Just "unStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VMap VB VP (Credential 'Staking) (CompactForm Coin))))) | |
type Share Stake | |
Snapshot of the stake distribution.
Constructors
SnapShot | |
Fields
|
Instances
ToJSON SnapShot | |
Generic SnapShot | |
Show SnapShot | |
DecShareCBOR SnapShot | |
EncCBOR SnapShot | |
NFData SnapShot | |
Defined in Cardano.Ledger.State.SnapShots | |
Eq SnapShot | |
NoThunks SnapShot | |
type Rep SnapShot | |
Defined in Cardano.Ledger.State.SnapShots type Rep SnapShot = D1 ('MetaData "SnapShot" "Cardano.Ledger.State.SnapShots" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "SnapShot" 'PrefixI 'True) (S1 ('MetaSel ('Just "ssStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Stake) :*: (S1 ('MetaSel ('Just "ssDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (Credential 'Staking) (KeyHash 'StakePool))) :*: S1 ('MetaSel ('Just "ssPoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (KeyHash 'StakePool) PoolParams))))) | |
type Share SnapShot | |
Snapshots of the stake distribution.
Note that ssStakeMark and ssStakeMarkPoolDistr are lazy on purpose since we only want to force the thunk after one stability window when we know that they are stable (so that we do not compute them if we do not have to). See more info in the Optimize TICKF ADR
Constructors
SnapShots | |
Fields |
Instances
ToJSON SnapShots | |
Generic SnapShots | |
Show SnapShots | |
DecCBOR SnapShots | |
DecShareCBOR SnapShots | |
EncCBOR SnapShots | |
Default SnapShots | |
Defined in Cardano.Ledger.State.SnapShots | |
NFData SnapShots | |
Defined in Cardano.Ledger.State.SnapShots | |
Eq SnapShots | |
NoThunks SnapShots | |
type Rep SnapShots | |
Defined in Cardano.Ledger.State.SnapShots type Rep SnapShots = D1 ('MetaData "SnapShots" "Cardano.Ledger.State.SnapShots" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "SnapShots" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ssStakeMark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapShot) :*: S1 ('MetaSel ('Just "ssStakeMarkPoolDistr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PoolDistr)) :*: (S1 ('MetaSel ('Just "ssStakeSet") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShot) :*: (S1 ('MetaSel ('Just "ssStakeGo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShot) :*: S1 ('MetaSel ('Just "ssFee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))) | |
type Share SnapShots | |
A unique ID of a transaction, which is computable from the transaction.
Constructors
TxId | |
Fields |
The input of a UTxO.
Instances
ToJSON TxIn | |
ToJSONKey TxIn | |
Defined in Cardano.Ledger.TxIn | |
Generic TxIn | |
Show TxIn | |
DecCBOR TxIn | |
DecShareCBOR TxIn | |
EncCBOR TxIn | |
NFData TxIn | |
Defined in Cardano.Ledger.TxIn | |
Eq TxIn | |
Ord TxIn | |
HeapWords TxIn | |
MemPack TxIn | |
NoThunks TxIn | |
type Rep TxIn | |
Defined in Cardano.Ledger.TxIn type Rep TxIn = D1 ('MetaData "TxIn" "Cardano.Ledger.TxIn" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "TxIn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 TxIx))) | |
type Share TxIn | |
individualPoolStake ∷ IndividualPoolStake → Rational Source #
Pool stake distribution. This is a ratio of individualTotalPoolStake
/pdTotalActiveStake
A map of stake pool IDs (the hash of the stake pool operator's
verification key) to IndividualPoolStake
. Also holds absolute values
necessary for the calculations in the computeDRepDistr
.
Constructors
PoolDistr | |
Fields
|
Instances
ToJSON PoolDistr | |
Generic PoolDistr | |
Show PoolDistr | |
DecCBOR PoolDistr | |
EncCBOR PoolDistr | |
NFData PoolDistr | |
Defined in Cardano.Ledger.State.PoolDistr | |
Eq PoolDistr | |
NoThunks PoolDistr | |
type Rep PoolDistr | |
Defined in Cardano.Ledger.State.PoolDistr type Rep PoolDistr = D1 ('MetaData "PoolDistr" "Cardano.Ledger.State.PoolDistr" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "PoolDistr" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPoolDistr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) IndividualPoolStake)) :*: S1 ('MetaSel ('Just "pdTotalActiveStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (CompactForm Coin)))) |
data AccountState Source #
Constructors
AccountState | |
Fields
|
Instances
Arguments
∷ SlotNo | The first slot of the given epoch. |
→ UnitInterval | The decentralization parameter. |
→ SlotNo | The slot to check. |
→ Bool |
Determine if the given slot is reserved for the overlay schedule.
Constructors
RegPool !PoolParams | A stake pool registration certificate. |
RetirePool !(KeyHash 'StakePool) !EpochNo | A stake pool retirement certificate. |
Instances
ToJSON PoolCert | |
Generic PoolCert | |
Show PoolCert | |
EncCBOR PoolCert | |
NFData PoolCert | |
Defined in Cardano.Ledger.Core.TxCert | |
Eq PoolCert | |
Ord PoolCert | |
Defined in Cardano.Ledger.Core.TxCert | |
NoThunks PoolCert | |
type Rep PoolCert | |
Defined in Cardano.Ledger.Core.TxCert type Rep PoolCert = D1 ('MetaData "PoolCert" "Cardano.Ledger.Core.TxCert" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "RegPool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PoolParams)) :+: C1 ('MetaCons "RetirePool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo))) |
data PoolMetadata Source #
Constructors
PoolMetadata | |
Fields
|
Instances
data StakePoolRelay Source #
Constructors
SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6) | One or both of IPv4 & IPv6 |
SingleHostName !(StrictMaybe Port) !DnsName | An |
MultiHostName !DnsName | A |
Instances
data PoolParams Source #
A stake pool.
Constructors
PoolParams | |
Fields
|
Instances
An address for UTxO.
Contents of Addr data type are intentionally left as lazy, otherwise operating on compact form of an address will result in redundant work.
Instances
FromJSON Addr | |
FromJSONKey Addr | |
Defined in Cardano.Ledger.Address | |
ToJSON Addr | |
ToJSONKey Addr | |
Defined in Cardano.Ledger.Address | |
Generic Addr | |
Show Addr | |
DecCBOR Addr | |
EncCBOR Addr | |
NFData Addr | |
Defined in Cardano.Ledger.Address | |
Eq Addr | |
Ord Addr | |
NoThunks Addr | |
type Rep Addr | |
Defined in Cardano.Ledger.Address type Rep Addr = D1 ('MetaData "Addr" "Cardano.Ledger.Address" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Addr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Network) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentCredential) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StakeReference))) :+: C1 ('MetaCons "AddrBootstrap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BootstrapAddress))) |
data RewardAccount Source #
An account based address for rewards
Constructors
RewardAccount | |
Fields
|
Instances
newtype Withdrawals Source #
This is called wdrl
in the spec.
Constructors
Withdrawals | |
Fields |
Instances
Generic Withdrawals | |
Defined in Cardano.Ledger.Address Associated Types type Rep Withdrawals ∷ Type → Type # | |
Show Withdrawals | |
Defined in Cardano.Ledger.Address Methods showsPrec ∷ Int → Withdrawals → ShowS # show ∷ Withdrawals → String # showList ∷ [Withdrawals] → ShowS # | |
DecCBOR Withdrawals | |
Defined in Cardano.Ledger.Address | |
EncCBOR Withdrawals | |
Defined in Cardano.Ledger.Address Methods encCBOR ∷ Withdrawals → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Withdrawals → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Withdrawals] → Size Source # | |
NFData Withdrawals | |
Defined in Cardano.Ledger.Address Methods rnf ∷ Withdrawals → () # | |
Eq Withdrawals | |
Defined in Cardano.Ledger.Address | |
NoThunks Withdrawals | |
Defined in Cardano.Ledger.Address | |
type Rep Withdrawals | |
Defined in Cardano.Ledger.Address |
word64ToCoin ∷ Word64 → Coin Source #
The amount of value held by a transaction output.
Instances
data Credential (kr ∷ KeyRole) Source #
Script hash or key hash for a payment or a staking object.
Note that credentials (unlike raw key hashes) do appear to vary from era to era, since they reference the hash of a script, which can change. This parameter is a phantom, however, so in actuality the instances will remain the same.
Constructors
ScriptHashObj !ScriptHash | |
KeyHashObj !(KeyHash kr) |
Instances
data StakeReference Source #
Constructors
StakeRefBase !StakeCredential | |
StakeRefPtr !Ptr | |
StakeRefNull |
Instances
Pointer to a slot number, transaction index and an index in certificate list.
Instances
ToJSON Ptr | |
ToJSONKey Ptr | |
Defined in Cardano.Ledger.Credential | |
Generic Ptr | |
Show Ptr | |
FromCBOR Ptr | |
ToCBOR Ptr | |
DecCBOR Ptr | |
EncCBOR Ptr | |
DecCBORGroup Ptr | |
Defined in Cardano.Ledger.Credential Methods decCBORGroup ∷ Decoder s Ptr Source # | |
EncCBORGroup Ptr | |
NFData Ptr | |
Defined in Cardano.Ledger.Credential | |
Eq Ptr | |
Ord Ptr | |
NoThunks Ptr | |
type Rep Ptr | |
Defined in Cardano.Ledger.Credential type Rep Ptr = D1 ('MetaData "Ptr" "Cardano.Ledger.Credential" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Ptr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 SlotNo32) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 TxIx) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 CertIx)))) |
certIxToInt ∷ CertIx → Int Source #
Instances
FromJSON ProtVer | |
ToJSON ProtVer | |
Generic ProtVer | |
Show ProtVer | |
FromCBOR ProtVer | |
ToCBOR ProtVer | |
DecCBOR ProtVer | |
EncCBOR ProtVer | |
DecCBORGroup ProtVer | |
Defined in Cardano.Ledger.BaseTypes Methods | |
EncCBORGroup ProtVer | |
ToPlutusData ProtVer | |
Defined in Cardano.Ledger.Plutus.ToPlutusData | |
NFData ProtVer | |
Defined in Cardano.Ledger.BaseTypes | |
Eq ProtVer | |
Ord ProtVer | |
NoThunks ProtVer | |
type Rep ProtVer | |
Defined in Cardano.Ledger.BaseTypes type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Version) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural))) |
Evolving nonce type.
Constructors
Nonce !(Hash Blake2b_256 Nonce) | |
NeutralNonce | Identity element |
Instances
FromJSON Nonce | |
ToJSON Nonce | |
Generic Nonce | |
Show Nonce | |
FromCBOR Nonce | |
ToCBOR Nonce | |
DecCBOR Nonce | |
EncCBOR Nonce | |
NFData Nonce | |
Defined in Cardano.Ledger.BaseTypes | |
Eq Nonce | |
Ord Nonce | |
NoThunks Nonce | |
type Rep Nonce | |
Defined in Cardano.Ledger.BaseTypes type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1 ∷ Type → Type)) |
Constructors
Port | |
Fields |
Constructors
Globals | |
Fields
|
Instances
Generic Globals | |
Show Globals | |
DecCBOR Pulser Source # | |
EncCBOR Pulser Source # | |
NFData Globals | |
Defined in Cardano.Ledger.BaseTypes | |
NFData Pulser Source # | |
Defined in Cardano.Ledger.Shelley.RewardUpdate | |
NoThunks Globals | |
NoThunks Pulser Source # | |
type Rep Globals | |
Defined in Cardano.Ledger.BaseTypes type Rep Globals = D1 ('MetaData "Globals" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Globals" 'PrefixI 'True) (((S1 ('MetaSel ('Just "epochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Either Text))) :*: S1 ('MetaSel ('Just "slotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just "stabilityWindow") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "randomnessStabilisationWindow") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "securityParameter") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (NonZero Word64))))) :*: ((S1 ('MetaSel ('Just "maxKESEvo") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "quorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "maxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64))) :*: (S1 ('MetaSel ('Just "activeSlotCoeff") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ActiveSlotCoeff) :*: (S1 ('MetaSel ('Just "networkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "systemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SystemStart)))))) |
Instances
FromJSON Network | |
ToJSON Network | |
Bounded Network | |
Enum Network | |
Defined in Cardano.Ledger.BaseTypes | |
Generic Network | |
Show Network | |
DecCBOR Network | |
EncCBOR Network | |
Default Network | |
Defined in Cardano.Ledger.BaseTypes | |
NFData Network | |
Defined in Cardano.Ledger.BaseTypes | |
Eq Network | |
Ord Network | |
NoThunks Network | |
type Rep Network | |
Transaction index.
Certificate index. There is mkCertIxPartial
that can be used for testing when constructing
from other integral types that are larger than Word16
hashVerKeyVRF ∷ ∀ c (r ∷ KeyRoleVRF). Crypto c ⇒ VerKeyVRF (VRF c) → VRFVerKeyHash r Source #
type SignedDSIGN = SignedDSIGN DSIGN Source #
type SignKeyDSIGN = SignKeyDSIGN DSIGN Source #
type KESignable c = Signable (KES c) Source #
type SignKeyKES c = SignKeyKES (KES c) Source #
type CertifiedVRF c = CertifiedVRF (VRF c) Source #
type SignKeyVRF c = SignKeyVRF (VRF c) Source #
data BootstrapWitness where Source #
Bundled Patterns
pattern BootstrapWitness ∷ VKey 'Witness → SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody) → ChainCode → ByteString → BootstrapWitness |
Instances
data WitVKey (kr ∷ KeyRole) where Source #
Proof/Witness that a transaction is authorized by the given key holder.
Bundled Patterns
pattern WitVKey ∷ Typeable kr ⇒ VKey kr → SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody) → WitVKey kr |
Instances
Generic (WitVKey kr) | |
Show (WitVKey kr) | |
Typeable kr ⇒ ToCBOR (WitVKey kr) | |
Typeable kr ⇒ DecCBOR (Annotator (WitVKey kr)) | |
Typeable kr ⇒ DecCBOR (WitVKey kr) | |
Typeable kr ⇒ EncCBOR (WitVKey kr) | Encodes memoized bytes created upon construction. |
Typeable kr ⇒ EqRaw (WitVKey kr) | |
NFData (WitVKey kr) | |
Defined in Cardano.Ledger.Keys.WitVKey | |
Eq (WitVKey kr) | |
Typeable kr ⇒ Ord (WitVKey kr) | |
Defined in Cardano.Ledger.Keys.WitVKey | |
Typeable kr ⇒ NoThunks (WitVKey kr) | |
type Rep (WitVKey kr) | |
Defined in Cardano.Ledger.Keys.WitVKey type Rep (WitVKey kr) = D1 ('MetaData "WitVKey" "Cardano.Ledger.Keys.WitVKey" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "WitVKeyInternal" 'PrefixI 'True) ((S1 ('MetaSel ('Just "wvkKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (VKey kr)) :*: S1 ('MetaSel ('Just "wvkSig") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody)))) :*: (S1 ('MetaSel ('Just "wvkKeyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (KeyHash 'Witness)) :*: S1 ('MetaSel ('Just "wvkBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))) |
newtype KeyHash (r ∷ KeyRole) Source #
Discriminated hash of public Key
Instances
HasKeyRole KeyHash | |
Defined in Cardano.Ledger.Hashes | |
FromJSON (KeyHash r) | |
FromJSONKey (KeyHash r) | |
Defined in Cardano.Ledger.Hashes Methods | |
ToJSON (KeyHash r) | |
ToJSONKey (KeyHash r) | |
Defined in Cardano.Ledger.Hashes Methods toJSONKey ∷ ToJSONKeyFunction (KeyHash r) Source # | |
Generic (KeyHash r) | |
Show (KeyHash r) | |
Typeable r ⇒ FromCBOR (KeyHash r) | |
Typeable r ⇒ ToCBOR (KeyHash r) | |
Typeable r ⇒ DecCBOR (KeyHash r) | |
Typeable r ⇒ EncCBOR (KeyHash r) | |
Default (KeyHash r) | |
Defined in Cardano.Ledger.Hashes | |
NFData (KeyHash r) | |
Defined in Cardano.Ledger.Hashes | |
Eq (KeyHash r) | |
Ord (KeyHash r) | |
Defined in Cardano.Ledger.Hashes | |
MemPack (KeyHash r) | |
NoThunks (KeyHash r) | |
type Rep (KeyHash r) | |
Defined in Cardano.Ledger.Hashes |
newtype ScriptHash Source #
Constructors
ScriptHash (Hash ADDRHASH EraIndependentScript) |
Instances
data GenDelegPair Source #
Constructors
GenDelegPair | |
Fields |
Instances
Constructors
GenDelegs | |
Fields |
The role of a key.
All key roles are fixed and unique, except for the Witness
role. In particular,
keys can be cast to a Witness
role with the help of asWitness
, because same witness
can be valid for many roles.
In fact, it is perfectly allowable for a key to be used in many roles by the end user; there is nothing prohibiting somebody using the same underlying key or a script as their payment and staking credential, as well as the key for their stake pool. However, in the ledger code mixing up keys with different roles could be catastrophic, that is why we have this separation.
coerceKeyRole ∷ ∀ (r ∷ KeyRole) (r' ∷ KeyRole). HasKeyRole a ⇒ a r → a r' Source #
General coercion of key roles.
The presence of this function is mostly to help the user realise where they are converting key roles.
newtype VKey (kd ∷ KeyRole) Source #
Discriminated verification key
We wrap the basic VerKeyDSIGN
in order to add the key role.
Constructors
VKey | |
Fields |
Instances
HasKeyRole VKey | |
Defined in Cardano.Ledger.Keys.Internal | |
Generic (VKey kd) | |
Show (VKey kd) | |
Typeable kd ⇒ FromCBOR (VKey kd) | |
Typeable kd ⇒ ToCBOR (VKey kd) | |
Typeable kd ⇒ DecCBOR (VKey kd) | |
Typeable kd ⇒ EncCBOR (VKey kd) | |
NFData (VKey kd) | |
Defined in Cardano.Ledger.Keys.Internal | |
Eq (VKey kd) | |
NoThunks (VKey kd) | |
type Rep (VKey kd) | |
Defined in Cardano.Ledger.Keys.Internal |
A generic metadatum type.
Instances
Generic Metadatum | |
Show Metadatum | |
DecCBOR Metadatum | |
EncCBOR Metadatum | |
NFData Metadatum | |
Defined in Cardano.Ledger.Metadata | |
Eq Metadatum | |
Ord Metadatum | |
Defined in Cardano.Ledger.Metadata | |
NoThunks Metadatum | |
type Rep Metadatum | |
Defined in Cardano.Ledger.Metadata type Rep Metadatum = D1 ('MetaData "Metadatum" "Cardano.Ledger.Metadata" "cardano-ledger-core-1.17.0.0-inplace" 'False) ((C1 ('MetaCons "Map" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Metadatum, Metadatum)])) :+: C1 ('MetaCons "List" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Metadatum]))) :+: (C1 ('MetaCons "I" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: (C1 ('MetaCons "B" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)) :+: C1 ('MetaCons "S" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))) |
data ShelleyUTXOW era Source #
Instances
data ShelleyUTXO era Source #
Instances
data ShelleyTICKF era Source #
Instances
data ShelleyTICK era Source #
Instances
data ShelleyPPUP era Source #
Instances
data ShelleyPOOLREAP era Source #
Instances
data ShelleyPOOL era Source #
Instances
data ShelleyNEWEPOCH era Source #
Instances
data ShelleyLEDGERS era Source #
Instances
data ShelleyLEDGER era Source #
Instances
data ShelleyDELPL era Source #
Instances
data ShelleyDELEGS era Source #
Instances
data ShelleyDELEG era Source #
Instances
newtype ProposedPPUpdates era Source #
Update operation for protocol parameters structure PParams
Constructors
ProposedPPUpdates (Map (KeyHash 'Genesis) (PParamsUpdate era)) |
Instances
Update Proposal
Constructors
Update !(ProposedPPUpdates era) !EpochNo |
Instances
Generic (Update era) Source # | |
Show (PParamsUpdate era) ⇒ Show (Update era) Source # | |
(Era era, DecCBOR (PParamsUpdate era)) ⇒ DecCBOR (Update era) Source # | |
(Era era, EncCBOR (PParamsUpdate era)) ⇒ EncCBOR (Update era) Source # | |
NFData (PParamsUpdate era) ⇒ NFData (Update era) Source # | |
Defined in Cardano.Ledger.Shelley.PParams | |
Eq (PParamsUpdate era) ⇒ Eq (Update era) Source # | |
NoThunks (PParamsUpdate era) ⇒ NoThunks (Update era) Source # | |
type Rep (Update era) Source # | |
Defined in Cardano.Ledger.Shelley.PParams type Rep (Update era) = D1 ('MetaData "Update" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "Update" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))) |
data ShelleyGovState era Source #
Constructors
ShelleyGovState | |
Fields
|
Instances
Instances
ToJSON NonMyopic Source # | |
Generic NonMyopic Source # | |
Show NonMyopic Source # | |
DecShareCBOR NonMyopic Source # | |
EncCBOR NonMyopic Source # | |
Default NonMyopic Source # | |
Defined in Cardano.Ledger.Shelley.PoolRank | |
NFData NonMyopic Source # | |
Defined in Cardano.Ledger.Shelley.PoolRank | |
Eq NonMyopic Source # | |
NoThunks NonMyopic Source # | |
type Rep NonMyopic Source # | |
Defined in Cardano.Ledger.Shelley.PoolRank type Rep NonMyopic = D1 ('MetaData "NonMyopic" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "NonMyopic" 'PrefixI 'True) (S1 ('MetaSel ('Just "likelihoodsNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Likelihood)) :*: S1 ('MetaSel ('Just "rewardPotNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) | |
type Share NonMyopic Source # | |
data RewardUpdate Source #
The ultimate goal of a reward update computation. Aggregating rewards for each staking credential.
Constructors
RewardUpdate | |
Instances
Instances
computeStabilityWindow ∷ Word64 → ActiveSlotCoeff → Word64 Source #
Calculate the stability window (e.g. the number of slots needed for a block to become stable) from the security param and the active slot coefficient.
The value 3k/f is determined to be a suitabe value as per https://docs.google.com/document/d/1B8BNMx8jVWRjYiUBOaI3jfZ7dQNvNTSDODvT5iOuYCU/edit#heading=h.qh2zcajmu6hm
computeRandomnessStabilisationWindow ∷ Word64 → ActiveSlotCoeff → Word64 Source #
Calculate the randomness stabilisation window from the security param and the active slot coefficient.
The value 4k/f is determined to be a suitabe value as per https://docs.google.com/document/d/1B8BNMx8jVWRjYiUBOaI3jfZ7dQNvNTSDODvT5iOuYCU/edit#heading=h.qh2zcajmu6hm
data ValidationErr Source #
Constructors
EpochNotLongEnough EpochSize Word64 Rational EpochSize | |
MaxKESEvolutionsUnsupported Word64 Word | |
QuorumTooSmall Word64 Word64 Word64 |
Instances
Show ValidationErr Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods showsPrec ∷ Int → ValidationErr → ShowS # show ∷ ValidationErr → String # showList ∷ [ValidationErr] → ShowS # | |
Eq ValidationErr Source # | |
Defined in Cardano.Ledger.Shelley.Genesis |
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
FromJSON ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods parseJSON ∷ Value → Parser ShelleyGenesis Source # | |
ToJSON ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods toJSON ∷ ShelleyGenesis → Value Source # toEncoding ∷ ShelleyGenesis → Encoding Source # toJSONList ∷ [ShelleyGenesis] → Value Source # | |
Generic ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Associated Types type Rep ShelleyGenesis ∷ Type → Type # | |
Show ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods showsPrec ∷ Int → ShelleyGenesis → ShowS # show ∷ ShelleyGenesis → String # showList ∷ [ShelleyGenesis] → ShowS # | |
FromCBOR ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis | |
ToCBOR ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods toCBOR ∷ ShelleyGenesis → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ShelleyGenesis → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyGenesis] → Size Source # | |
DecCBOR ShelleyGenesis Source # | Genesis are always encoded with the version of era they are defined in. |
Defined in Cardano.Ledger.Shelley.Genesis | |
EncCBOR ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods encCBOR ∷ ShelleyGenesis → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ShelleyGenesis → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyGenesis] → Size Source # | |
Eq ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis Methods (==) ∷ ShelleyGenesis → ShelleyGenesis → Bool # (/=) ∷ ShelleyGenesis → ShelleyGenesis → Bool # | |
NoThunks ShelleyGenesis Source # | |
Defined in Cardano.Ledger.Shelley.Genesis | |
type Rep ShelleyGenesis Source # | |
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 (NonZero 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
that supports NominalDiffTime
precision, this type
only supports Pico
precision.Micro
Constructors
NominalDiffTimeMicro Micro |
Instances
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
|
Instances
emptyGenesisStaking ∷ ShelleyGenesisStaking Source #
Empty genesis staking
toShelleyGenesisPairs ∷ KeyValue e a ⇒ ShelleyGenesis → [a] Source #
genesisUTxO ∷ ∀ era. EraTxOut era ⇒ ShelleyGenesis → UTxO era Source #
initialFundsPseudoTxIn ∷ Addr → TxIn 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.
validateGenesis ∷ ShelleyGenesis → Either [ValidationErr] () Source #
Do some basic sanity checking on the Shelley genesis file.
data ShelleyTxAuxData era where Source #
Bundled Patterns
pattern ShelleyTxAuxData ∷ ∀ era. Era era ⇒ Map Word64 Metadatum → ShelleyTxAuxData era |
Instances
data ShelleyDelegCert Source #
Constructors
ShelleyRegCert !StakeCredential | A stake credential registration certificate. |
ShelleyUnRegCert !StakeCredential | A stake credential deregistration certificate. |
ShelleyDelegCert !StakeCredential !(KeyHash 'StakePool) | A stake delegation certificate. |
Instances
Move instantaneous rewards certificate
Constructors
MIRCert | |
Fields
|
Instances
ToJSON MIRCert Source # | |
Generic MIRCert Source # | |
Show MIRCert Source # | |
DecCBOR MIRCert Source # | |
EncCBOR MIRCert Source # | |
NFData MIRCert Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
Eq MIRCert Source # | |
Ord MIRCert Source # | |
NoThunks MIRCert Source # | |
type Rep MIRCert Source # | |
Defined in Cardano.Ledger.Shelley.TxCert type Rep MIRCert = D1 ('MetaData "MIRCert" "Cardano.Ledger.Shelley.TxCert" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "MIRCert" 'PrefixI 'True) (S1 ('MetaSel ('Just "mirPot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MIRPot) :*: S1 ('MetaSel ('Just "mirRewards") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MIRTarget))) |
MIRTarget specifies if funds from either the reserves or the treasury are to be handed out to a collection of reward accounts or instead transfered to the opposite pot.
Constructors
StakeAddressesMIR !(Map (Credential 'Staking) DeltaCoin) | |
SendToOppositePotMIR !Coin |
Instances
ToJSON MIRTarget Source # | |
Generic MIRTarget Source # | |
Show MIRTarget Source # | |
DecCBOR MIRTarget Source # | |
EncCBOR MIRTarget Source # | |
NFData MIRTarget Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
Eq MIRTarget Source # | |
Ord MIRTarget Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
NoThunks MIRTarget Source # | |
type Rep MIRTarget Source # | |
Defined in Cardano.Ledger.Shelley.TxCert type Rep MIRTarget = D1 ('MetaData "MIRTarget" "Cardano.Ledger.Shelley.TxCert" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "StakeAddressesMIR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) DeltaCoin))) :+: C1 ('MetaCons "SendToOppositePotMIR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) |
Constructors
ReservesMIR | |
TreasuryMIR |
Instances
ToJSON MIRPot Source # | |
Bounded MIRPot Source # | |
Enum MIRPot Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
Generic MIRPot Source # | |
Show MIRPot Source # | |
DecCBOR MIRPot Source # | |
EncCBOR MIRPot Source # | |
NFData MIRPot Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
Eq MIRPot Source # | |
Ord MIRPot Source # | |
NoThunks MIRPot Source # | |
type Rep MIRPot Source # | |
data GenesisDelegCert Source #
Genesis key delegation certificate
Constructors
GenesisDelegCert !(KeyHash 'Genesis) !(KeyHash 'GenesisDelegate) !(VRFVerKeyHash 'GenDelegVRF) |
Instances
data ShelleyTxOut era Source #
Constructors
TxOutCompact !CompactAddr !(CompactForm (Value era)) |
Bundled Patterns
pattern ShelleyTxOut ∷ (HasCallStack, Era era, Val (Value era)) ⇒ Addr → Value era → ShelleyTxOut era |
Instances
newtype ShelleyTxBody era Source #
Constructors
TxBodyConstr (MemoBytes (ShelleyTxBodyRaw era)) |
Bundled Patterns
pattern ShelleyTxBody ∷ ∀ era. (EraTxOut era, EncCBOR (TxCert era)) ⇒ Set TxIn → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals → Coin → SlotNo → StrictMaybe (Update era) → StrictMaybe TxAuxDataHash → ShelleyTxBody era | Pattern for use by external users |
Instances
data ShelleyTxWits era Source #
Instances
data ShelleyTx era where Source #
Bundled Patterns
pattern ShelleyTx ∷ EraTx era ⇒ TxBody era → TxWits era → StrictMaybe (TxAuxData era) → ShelleyTx era |
Instances
data LedgerState era Source #
The state associated with a Ledger
.
Constructors
LedgerState | |
Fields
|
Instances
data NewEpochState era Source #
New Epoch state and environment
Constructors
NewEpochState | |
Fields
|
Instances
There is a serious invariant that we must maintain in the UTxOState. Given (UTxOState utxo _ _ _ istake) it must be the case that istake == (updateStakeDistribution (UTxO Map.empty) (UTxO Map.empty) utxo) Of course computing the RHS of the above equality can be very expensive, so we only use this route in the testing function smartUTxO. But we are very careful, wherever we update the UTxO, we carefully make INCREMENTAL changes to istake to maintain this invariant. This happens in the UTxO rule.
Constructors
UTxOState | |
Fields
|
Instances
CanGetUTxO UTxOState Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |
CanSetUTxO UTxOState Source # | |
(EraTxOut era, EraGov era) ⇒ ToJSON (UTxOState era) Source # | |
Generic (UTxOState era) Source # | |
(EraTxOut era, Show (GovState era)) ⇒ Show (UTxOState era) Source # | |
(EraTxOut era, EraGov era) ⇒ FromCBOR (UTxOState era) Source # | |
(EraTxOut era, EraGov era) ⇒ ToCBOR (UTxOState era) Source # | |
(EraTxOut era, EraGov era) ⇒ DecShareCBOR (UTxOState era) Source # | |
(EraTxOut era, EncCBOR (GovState era)) ⇒ EncCBOR (UTxOState era) Source # | |
EraGov era ⇒ Default (UTxOState era) Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |
(EraTxOut era, NFData (GovState era)) ⇒ NFData (UTxOState era) Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |
(EraTxOut era, Eq (GovState era)) ⇒ Eq (UTxOState era) Source # | |
(NoThunks (UTxO era), NoThunks (GovState era)) ⇒ NoThunks (UTxOState era) Source # | |
type Rep (UTxOState era) Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types type Rep (UTxOState era) = D1 ('MetaData "UTxOState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "UTxOState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "utxosUtxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxO era)) :*: (S1 ('MetaSel ('Just "utxosDeposited") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "utxosFees") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: (S1 ('MetaSel ('Just "utxosGovState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (GovState era)) :*: (S1 ('MetaSel ('Just "utxosStakeDistr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IncrementalStake) :*: S1 ('MetaSel ('Just "utxosDonation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))) | |
type Share (UTxOState era) Source # | |
data IncrementalStake Source #
Incremental Stake, Stake along with possible missed coins from danging Ptrs.
Transactions can use Ptrs to refer to a stake credential in a TxOut. The Ptr
does not have to point to anything until the epoch boundary, when we compute
rewards and aggregate staking information for ranking. This is unusual but legal.
In a non incremental system, we use whatever legal
Ptrs exist at the epoch
boundary. Here we are computing things incrementally, so we need to remember Ptrs
that might point to something by the time the epoch boundary is reached. When
the epoch boundary is reached we resolve
these pointers, to see if any have
become non-dangling since the time they were first used in the incremental computation.
Constructors
IStake | |
Fields
|
Instances
data EpochState era Source #
Constructors
EpochState | |
Fields
|
Instances
bbHash ∷ ShelleyTxSeq era → Hash HASH EraIndependentBlockBody Source #
Hash a given block body
Instances
Generic (UtxoEnv era) Source # | |
(Show (PParams era), Show (CertState era)) ⇒ Show (UtxoEnv era) Source # | |
(EraPParams era, EraCertState era) ⇒ DecCBOR (UtxoEnv era) Source # | |
(EraPParams era, EraCertState era) ⇒ EncCBOR (UtxoEnv era) Source # | |
(Era era, NFData (PParams era), NFData (CertState era)) ⇒ NFData (UtxoEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Utxo | |
(Eq (PParams era), Eq (CertState era)) ⇒ Eq (UtxoEnv era) Source # | |
type Rep (UtxoEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Utxo type Rep (UtxoEnv era) = D1 ('MetaData "UtxoEnv" "Cardano.Ledger.Shelley.Rules.Utxo" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "UtxoEnv" 'PrefixI 'True) (S1 ('MetaSel ('Just "ueSlot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Just "uePParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParams era)) :*: S1 ('MetaSel ('Just "ueCertState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CertState era))))) |
Instances
Generic (PoolEnv era) Source # | |
Show (PParams era) ⇒ Show (PoolEnv era) Source # | |
EraPParams era ⇒ EncCBOR (PoolEnv era) Source # | |
NFData (PParams era) ⇒ NFData (PoolEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Pool | |
Eq (PParams era) ⇒ Eq (PoolEnv era) Source # | |
type Rep (PoolEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Pool type Rep (PoolEnv era) = D1 ('MetaData "PoolEnv" "Cardano.Ledger.Shelley.Rules.Pool" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "PoolEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochNo) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParams era)))) |
Constructors
DelegEnv | |
Fields
|
Instances
Generic (DelegEnv era) Source # | |
Show (PParams era) ⇒ Show (DelegEnv era) Source # | |
NFData (PParams era) ⇒ NFData (DelegEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Deleg | |
Eq (PParams era) ⇒ Eq (DelegEnv era) Source # | |
type Rep (DelegEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Deleg type Rep (DelegEnv era) = D1 ('MetaData "DelegEnv" "Cardano.Ledger.Shelley.Rules.Deleg" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "DelegEnv" 'PrefixI 'True) ((S1 ('MetaSel ('Just "slotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "deCurEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochNo)) :*: (S1 ('MetaSel ('Just "ptr_") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ptr) :*: (S1 ('MetaSel ('Just "acnt_") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountState) :*: S1 ('MetaSel ('Just "ppDE") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParams era)))))) |
Constructors
DelplEnv | |
Fields
|
Constructors
DelegsEnv | |
Fields
|
Constructors
LedgerEnv | |
Fields
|
Instances
Generic (LedgerEnv era) Source # | |
Show (PParams era) ⇒ Show (LedgerEnv era) Source # | |
EraPParams era ⇒ EncCBOR (LedgerEnv era) Source # | |
NFData (PParams era) ⇒ NFData (LedgerEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Ledger | |
Eq (PParams era) ⇒ Eq (LedgerEnv era) Source # | |
type Rep (LedgerEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Ledger type Rep (LedgerEnv era) = D1 ('MetaData "LedgerEnv" "Cardano.Ledger.Shelley.Rules.Ledger" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "LedgerEnv" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ledgerSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "ledgerEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EpochNo))) :*: (S1 ('MetaSel ('Just "ledgerIx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIx) :*: (S1 ('MetaSel ('Just "ledgerPp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParams era)) :*: S1 ('MetaSel ('Just "ledgerAccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountState))))) |
data ShelleyLedgersEnv era Source #
Constructors
LedgersEnv | |
Fields |