Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 c = InstantaneousRewards {
- iRReserves ∷ !(Map (Credential 'Staking c) Coin)
- iRTreasury ∷ !(Map (Credential 'Staking c) Coin)
- deltaReserves ∷ !DeltaCoin
- deltaTreasury ∷ !DeltaCoin
- data DState era = DState {
- dsUnified ∷ !(UMap (EraCrypto era))
- dsFutureGenDelegs ∷ !(Map (FutureGenDeleg (EraCrypto era)) (GenDelegPair (EraCrypto era)))
- dsGenDelegs ∷ !(GenDelegs (EraCrypto era))
- dsIRewards ∷ !(InstantaneousRewards (EraCrypto era))
- data PState era = PState {
- psStakePoolParams ∷ !(Map (KeyHash 'StakePool (EraCrypto era)) (PoolParams (EraCrypto era)))
- psFutureStakePoolParams ∷ !(Map (KeyHash 'StakePool (EraCrypto era)) (PoolParams (EraCrypto era)))
- psRetiring ∷ !(Map (KeyHash 'StakePool (EraCrypto era)) EpochNo)
- psDeposits ∷ !(Map (KeyHash 'StakePool (EraCrypto era)) Coin)
- data VState era = VState {
- vsDReps ∷ !(Map (Credential 'DRepRole (EraCrypto era)) (DRepState (EraCrypto era)))
- vsCommitteeState ∷ !(CommitteeState era)
- vsNumDormantEpochs ∷ !EpochNo
- data CertState era = CertState {
- certVState ∷ !(VState era)
- certPState ∷ !(PState era)
- certDState ∷ !(DState era)
- calculatePoolDistr' ∷ (KeyHash 'StakePool c → Bool) → SnapShot c → PoolDistr c
- calculatePoolDistr ∷ SnapShot c → PoolDistr c
- newtype Stake c = Stake {
- unStake ∷ VMap VB VP (Credential 'Staking c) (CompactForm Coin)
- data SnapShot c = SnapShot {
- ssStake ∷ !(Stake c)
- ssDelegations ∷ !(VMap VB VB (Credential 'Staking c) (KeyHash 'StakePool c))
- ssPoolParams ∷ !(VMap VB VB (KeyHash 'StakePool c) (PoolParams c))
- data SnapShots c = SnapShots {
- ssStakeMark ∷ SnapShot c
- ssStakeMarkPoolDistr ∷ PoolDistr c
- ssStakeSet ∷ !(SnapShot c)
- ssStakeGo ∷ !(SnapShot c)
- ssFee ∷ !Coin
- newtype TxId c = TxId {}
- data TxIn c = TxIn !(TxId c) !TxIx
- isOverlaySlot ∷ SlotNo → UnitInterval → SlotNo → Bool
- data PoolCert c
- = RegPool !(PoolParams c)
- | RetirePool !(KeyHash 'StakePool c) !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 c = PoolParams {
- ppId ∷ !(KeyHash 'StakePool c)
- ppVrf ∷ !(VRFVerKeyHash 'StakePoolVRF c)
- ppPledge ∷ !Coin
- ppCost ∷ !Coin
- ppMargin ∷ !UnitInterval
- ppRewardAccount ∷ !(RewardAccount c)
- ppOwners ∷ !(Set (KeyHash 'Staking c))
- ppRelays ∷ !(StrictSeq StakePoolRelay)
- ppMetadata ∷ !(StrictMaybe PoolMetadata)
- data Addr c
- = Addr Network (PaymentCredential c) (StakeReference c)
- | AddrBootstrap (BootstrapAddress c)
- data RewardAccount c = RewardAccount {
- raNetwork ∷ !Network
- raCredential ∷ !(Credential 'Staking c)
- newtype Withdrawals c = Withdrawals {
- unWithdrawals ∷ Map (RewardAccount c) Coin
- individualPoolStake ∷ IndividualPoolStake c → Rational
- data PoolDistr c = PoolDistr {
- unPoolDistr ∷ !(Map (KeyHash 'StakePool c) (IndividualPoolStake c))
- pdTotalActiveStake ∷ !(CompactForm Coin)
- word64ToCoin ∷ Word64 → Coin
- newtype Coin = Coin {}
- data Credential (kr ∷ KeyRole) c
- = ScriptHashObj !(ScriptHash c)
- | KeyHashObj !(KeyHash kr c)
- data StakeReference c
- = StakeRefBase !(StakeCredential c)
- | StakeRefPtr !Ptr
- | StakeRefNull
- data Ptr = Ptr !SlotNo !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 {}
- data Network
- data TxIx
- data CertIx
- data BootstrapWitness c where
- pattern BootstrapWitness ∷ Crypto c ⇒ VKey 'Witness c → SignedDSIGN c (Hash c EraIndependentTxBody) → ChainCode → ByteString → BootstrapWitness c
- data WitVKey (kr ∷ KeyRole) c where
- pattern WitVKey ∷ (Typeable kr, Crypto c) ⇒ VKey kr c → SignedDSIGN c (Hash c EraIndependentTxBody) → WitVKey kr c
- newtype ScriptHash c = ScriptHash (Hash (ADDRHASH c) EraIndependentScript)
- hashVerKeyVRF ∷ ∀ c (r ∷ KeyRoleVRF). Crypto c ⇒ VerKeyVRF c → VRFVerKeyHash r c
- hashKey ∷ ∀ c (kd ∷ KeyRole). Crypto c ⇒ VKey kd c → KeyHash kd c
- data KeyRole
- coerceKeyRole ∷ ∀ (r ∷ KeyRole) c (r' ∷ KeyRole). HasKeyRole a ⇒ a r c → a r' c
- newtype VKey (kd ∷ KeyRole) c = VKey {
- unVKey ∷ VerKeyDSIGN (DSIGN c)
- newtype KeyHash (r ∷ KeyRole) c = KeyHash {
- unKeyHash ∷ Hash (ADDRHASH c) (VerKeyDSIGN (DSIGN c))
- type KESignable c = Signable (KES c)
- data GenDelegPair c = GenDelegPair {
- genDelegKeyHash ∷ !(KeyHash 'GenesisDelegate c)
- genDelegVrfHash ∷ !(VRFVerKeyHash 'GenDelegVRF c)
- newtype GenDelegs c = GenDelegs {
- unGenDelegs ∷ Map (KeyHash 'Genesis c) (GenDelegPair c)
- type Hash c = Hash (HASH c)
- type SignedDSIGN c = SignedDSIGN (DSIGN c)
- type SignKeyDSIGN c = SignKeyDSIGN (DSIGN 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 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 (EraCrypto era)) (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 c
- data RewardUpdate c = RewardUpdate {}
- data PpupEnv era = PPUPEnv SlotNo (PParams era) (GenDelegs (EraCrypto era))
- data MultiSig era
- computeStabilityWindow ∷ Word64 → ActiveSlotCoeff → Word64
- computeRandomnessStabilisationWindow ∷ Word64 → ActiveSlotCoeff → Word64
- data ValidationErr
- data ShelleyGenesis c = ShelleyGenesis {
- sgSystemStart ∷ !UTCTime
- sgNetworkMagic ∷ !Word32
- sgNetworkId ∷ !Network
- sgActiveSlotsCoeff ∷ !PositiveUnitInterval
- sgSecurityParam ∷ !Word64
- sgEpochLength ∷ !EpochSize
- sgSlotsPerKESPeriod ∷ !Word64
- sgMaxKESEvolutions ∷ !Word64
- sgSlotLength ∷ !NominalDiffTimeMicro
- sgUpdateQuorum ∷ !Word64
- sgMaxLovelaceSupply ∷ !Word64
- sgProtocolParams ∷ !(PParams (ShelleyEra c))
- sgGenDelegs ∷ !(Map (KeyHash 'Genesis c) (GenDelegPair c))
- sgInitialFunds ∷ ListMap (Addr c) Coin
- sgStaking ∷ ShelleyGenesisStaking c
- newtype NominalDiffTimeMicro = NominalDiffTimeMicro Micro
- data ShelleyGenesisStaking c = ShelleyGenesisStaking {}
- emptyGenesisStaking ∷ ShelleyGenesisStaking c
- fromNominalDiffTimeMicro ∷ NominalDiffTimeMicro → NominalDiffTime
- toNominalDiffTimeMicroWithRounding ∷ NominalDiffTime → NominalDiffTimeMicro
- toNominalDiffTimeMicro ∷ NominalDiffTime → Maybe NominalDiffTimeMicro
- secondsToNominalDiffTimeMicro ∷ Micro → NominalDiffTimeMicro
- nominalDiffTimeMicroToMicroseconds ∷ NominalDiffTimeMicro → Micro
- nominalDiffTimeMicroToSeconds ∷ NominalDiffTimeMicro → Pico
- sgInitialFundsL ∷ Lens' (ShelleyGenesis c) (ListMap (Addr c) Coin)
- sgStakingL ∷ Lens' (ShelleyGenesis c) (ShelleyGenesisStaking c)
- sgActiveSlotCoeff ∷ ShelleyGenesis c → ActiveSlotCoeff
- toShelleyGenesisPairs ∷ (KeyValue e a, Crypto c) ⇒ ShelleyGenesis c → [a]
- genesisUTxO ∷ ∀ era. EraTxOut era ⇒ ShelleyGenesis (EraCrypto era) → UTxO era
- initialFundsPseudoTxIn ∷ ∀ c. Crypto c ⇒ Addr c → TxIn c
- describeValidationErr ∷ ValidationErr → Text
- validateGenesis ∷ ∀ c. Crypto c ⇒ ShelleyGenesis c → Either [ValidationErr] ()
- mkShelleyGlobals ∷ ShelleyGenesis c → EpochInfo (Either Text) → Globals
- data ShelleyTxAuxData era where
- pattern ShelleyTxAuxData ∷ ∀ era. Era era ⇒ Map Word64 Metadatum → ShelleyTxAuxData era
- data ShelleyDelegCert c
- = ShelleyRegCert !(StakeCredential c)
- | ShelleyUnRegCert !(StakeCredential c)
- | ShelleyDelegCert !(StakeCredential c) !(KeyHash 'StakePool c)
- data MIRCert c = MIRCert {
- mirPot ∷ !MIRPot
- mirRewards ∷ !(MIRTarget c)
- data MIRTarget c
- = StakeAddressesMIR !(Map (Credential 'Staking c) DeltaCoin)
- | SendToOppositePotMIR !Coin
- data MIRPot
- data GenesisDelegCert c = GenesisDelegCert !(KeyHash 'Genesis c) !(KeyHash 'GenesisDelegate c) !(VRFVerKeyHash 'GenDelegVRF c)
- data ShelleyTxOut era where
- TxOutCompact !(CompactAddr (EraCrypto era)) !(CompactForm (Value era))
- pattern ShelleyTxOut ∷ (HasCallStack, Era era, Val (Value era)) ⇒ Addr (EraCrypto era) → Value era → ShelleyTxOut era
- newtype ShelleyTxBody era where
- TxBodyConstr (MemoBytes ShelleyTxBodyRaw era)
- pattern ShelleyTxBody ∷ (EraTxOut era, EncCBOR (TxCert era)) ⇒ Set (TxIn (EraCrypto era)) → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals (EraCrypto era) → Coin → SlotNo → StrictMaybe (Update era) → StrictMaybe (AuxiliaryDataHash (EraCrypto era)) → 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 (EraCrypto era))
- nesBcur ∷ !(BlocksMade (EraCrypto era))
- nesEs ∷ !(EpochState era)
- nesRu ∷ !(StrictMaybe (PulsingRewUpdate (EraCrypto era)))
- nesPd ∷ !(PoolDistr (EraCrypto era))
- stashedAVVMAddresses ∷ !(StashedAVVMAddresses era)
- data UTxOState era = UTxOState {
- utxosUtxo ∷ !(UTxO era)
- utxosDeposited ∷ Coin
- utxosFees ∷ !Coin
- utxosGovState ∷ !(GovState era)
- utxosStakeDistr ∷ !(IncrementalStake (EraCrypto era))
- utxosDonation ∷ !Coin
- data IncrementalStake c = IStake {
- credMap ∷ !(Map (Credential 'Staking c) (CompactForm Coin))
- ptrMap ∷ !(Map Ptr (CompactForm Coin))
- data EpochState era = EpochState {
- esAccountState ∷ !AccountState
- esLState ∷ !(LedgerState era)
- esSnapshots ∷ !(SnapShots (EraCrypto era))
- esNonMyopic ∷ !(NonMyopic (EraCrypto era))
- data AccountState = AccountState {
- asTreasury ∷ !Coin
- asReserves ∷ !Coin
- bbHash ∷ ∀ era. Era era ⇒ ShelleyTxSeq era → Hash (EraCrypto era) 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
- curEpochNo ∷ !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 {
- ledgerSlotNo ∷ !SlotNo
- ledgerEpochNo ∷ !(Maybe EpochNo)
- ledgerIx ∷ !TxIx
- ledgerPp ∷ !(PParams era)
- ledgerAccount ∷ !AccountState
- ledgerMempool ∷ !Bool
- data ShelleyLedgersEnv era = LedgersEnv {}
Documentation
data StrictMaybe a Source #
Instances
Block' !h !(TxSeq era) ByteString |
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) | |
(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.16.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
(Era era, ToJSON (TxOut era)) ⇒ ToJSON (UTxO era) | |
Era era ⇒ Monoid (UTxO era) | |
Semigroup (UTxO era) | |
Generic (UTxO era) | |
(Show (TxOut era), Crypto (EraCrypto 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) | |
(Crypto (EraCrypto era), DecShareCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking (EraCrypto era))) ⇒ DecShareCBOR (UTxO era) | |
(Era era, EncCBOR (TxOut era)) ⇒ EncCBOR (UTxO era) | |
Default (UTxO era) | |
Defined in Cardano.Ledger.UTxO | |
(Era era, NFData (TxOut era)) ⇒ NFData (UTxO era) | |
Defined in Cardano.Ledger.UTxO | |
(Era era, Eq (TxOut era)) ⇒ Eq (UTxO era) | |
NoThunks (TxOut era) ⇒ NoThunks (UTxO era) | |
type Rep (UTxO era) | |
Defined in Cardano.Ledger.UTxO | |
type Share (UTxO era) | |
data InstantaneousRewards c 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
InstantaneousRewards | |
|
Instances
The state used by the DELEG rule, which roughly tracks stake delegation and some governance features.
DState | |
|
Instances
The state used by the POOL rule, which tracks stake pool information.
PState | |
|
Instances
The state that tracks the voting entities (DReps and Constitutional Committee
members). In the formal ledger specification this type is called GState
VState | |
|
Instances
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 | |
Era era ⇒ NFData (VState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (VState era) | |
Typeable (EraCrypto 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.16.0.0-inplace" 'False) (C1 ('MetaCons "VState" 'PrefixI 'True) (S1 ('MetaSel ('Just "vsDReps") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'DRepRole (EraCrypto era)) (DRepState (EraCrypto era)))) :*: (S1 ('MetaSel ('Just "vsCommitteeState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommitteeState era)) :*: S1 ('MetaSel ('Just "vsNumDormantEpochs") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo)))) | |
type Share (VState era) | |
The state associated with the DELPL rule, which combines the DELEG rule and the POOL rule.
CertState | |
|
Instances
Era era ⇒ ToJSON (CertState era) | |
Generic (CertState era) | |
Show (CertState era) | |
Era era ⇒ DecShareCBOR (CertState era) | |
Era era ⇒ EncCBOR (CertState era) | |
Default (CertState era) | |
Defined in Cardano.Ledger.CertState | |
Era era ⇒ NFData (CertState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (CertState era) | |
Typeable (EraCrypto era) ⇒ NoThunks (CertState era) | |
type Rep (CertState era) | |
Defined in Cardano.Ledger.CertState type Rep (CertState era) = D1 ('MetaData "CertState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.16.0.0-inplace" 'False) (C1 ('MetaCons "CertState" 'PrefixI 'True) (S1 ('MetaSel ('Just "certVState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VState era)) :*: (S1 ('MetaSel ('Just "certPState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState era)) :*: S1 ('MetaSel ('Just "certDState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState era))))) | |
type Share (CertState era) | |
calculatePoolDistr ∷ SnapShot c → PoolDistr c Source #
Type of stake as map from hash key to coins associated.
Stake | |
|
Instances
Crypto c ⇒ ToJSON (Stake c) | |
Generic (Stake c) | |
Show (Stake c) | |
Crypto c ⇒ DecShareCBOR (Stake c) | |
Crypto c ⇒ EncCBOR (Stake c) | |
NFData (Stake c) | |
Defined in Cardano.Ledger.EpochBoundary | |
Eq (Stake c) | |
Typeable c ⇒ NoThunks (Stake c) | |
type Rep (Stake c) | |
Defined in Cardano.Ledger.EpochBoundary type Rep (Stake c) = D1 ('MetaData "Stake" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "Stake" 'PrefixI 'True) (S1 ('MetaSel ('Just "unStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VMap VB VP (Credential 'Staking c) (CompactForm Coin))))) | |
type Share (Stake c) | |
Snapshot of the stake distribution.
SnapShot | |
|
Instances
Crypto c ⇒ ToJSON (SnapShot c) | |
Generic (SnapShot c) | |
Show (SnapShot c) | |
Crypto c ⇒ DecShareCBOR (SnapShot c) | |
Crypto c ⇒ EncCBOR (SnapShot c) | |
NFData (SnapShot c) | |
Defined in Cardano.Ledger.EpochBoundary | |
Eq (SnapShot c) | |
Typeable c ⇒ NoThunks (SnapShot c) | |
type Rep (SnapShot c) | |
Defined in Cardano.Ledger.EpochBoundary type Rep (SnapShot c) = D1 ('MetaData "SnapShot" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.16.0.0-inplace" 'False) (C1 ('MetaCons "SnapShot" 'PrefixI 'True) (S1 ('MetaSel ('Just "ssStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Stake c)) :*: (S1 ('MetaSel ('Just "ssDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (Credential 'Staking c) (KeyHash 'StakePool c))) :*: S1 ('MetaSel ('Just "ssPoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (KeyHash 'StakePool c) (PoolParams c)))))) | |
type Share (SnapShot c) | |
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
SnapShots | |
|
Instances
A unique ID of a transaction, which is computable from the transaction.
Instances
Crypto c ⇒ FromJSON (TxId c) | |
Crypto c ⇒ ToJSON (TxId c) | |
Generic (TxId c) | |
Show (TxId c) | |
Crypto c ⇒ DecCBOR (TxId c) | |
Crypto c ⇒ EncCBOR (TxId c) | |
Crypto c ⇒ NFData (TxId c) | |
Defined in Cardano.Ledger.TxIn | |
Eq (TxId c) | |
Ord (TxId c) | |
Defined in Cardano.Ledger.TxIn | |
Crypto c ⇒ HeapWords (TxId c) | |
NoThunks (TxId c) | |
type Rep (TxId c) | |
Defined in Cardano.Ledger.TxIn type Rep (TxId c) = D1 ('MetaData "TxId" "Cardano.Ledger.TxIn" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SafeHash c EraIndependentTxBody)))) |
The input of a UTxO.
Instances
Crypto c ⇒ ToJSON (TxIn c) | |
Crypto c ⇒ ToJSONKey (TxIn c) | |
Defined in Cardano.Ledger.TxIn toJSONKey ∷ ToJSONKeyFunction (TxIn c) Source # | |
Generic (TxIn c) | |
Show (TxIn c) | |
Crypto c ⇒ DecCBOR (TxIn c) | |
Crypto c ⇒ EncCBOR (TxIn c) | |
Crypto c ⇒ NFData (TxIn c) | |
Defined in Cardano.Ledger.TxIn | |
Eq (TxIn c) | |
Ord (TxIn c) | |
Defined in Cardano.Ledger.TxIn | |
Crypto c ⇒ HeapWords (TxIn c) | |
NoThunks (TxIn c) | |
type Rep (TxIn c) | |
Defined in Cardano.Ledger.TxIn type Rep (TxIn c) = D1 ('MetaData "TxIn" "Cardano.Ledger.TxIn" "cardano-ledger-core-1.16.0.0-inplace" 'False) (C1 ('MetaCons "TxIn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxId c)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 TxIx))) |
∷ 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.
RegPool !(PoolParams c) | A stake pool registration certificate. |
RetirePool !(KeyHash 'StakePool c) !EpochNo | A stake pool retirement certificate. |
Instances
Crypto c ⇒ ToJSON (PoolCert c) | |
Generic (PoolCert c) | |
Show (PoolCert c) | |
Crypto c ⇒ EncCBOR (PoolCert c) | |
NFData (PoolCert c) | |
Defined in Cardano.Ledger.Core.TxCert | |
Eq (PoolCert c) | |
Ord (PoolCert c) | |
Defined in Cardano.Ledger.Core.TxCert | |
NoThunks (PoolCert c) | |
type Rep (PoolCert c) | |
Defined in Cardano.Ledger.Core.TxCert type Rep (PoolCert c) = D1 ('MetaData "PoolCert" "Cardano.Ledger.Core.TxCert" "cardano-ledger-core-1.16.0.0-inplace" 'False) (C1 ('MetaCons "RegPool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PoolParams c))) :+: C1 ('MetaCons "RetirePool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool c)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo))) |
data PoolMetadata Source #
PoolMetadata | |
|
Instances
data StakePoolRelay Source #
SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6) | One or both of IPv4 & IPv6 |
SingleHostName !(StrictMaybe Port) !DnsName | An |
MultiHostName !DnsName | A |
Instances
data PoolParams c Source #
A stake pool.
PoolParams | |
|
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
data RewardAccount c Source #
An account based address for rewards
RewardAccount | |
|
Instances
newtype Withdrawals c Source #
This is called wdrl
in the spec.
Instances
individualPoolStake ∷ IndividualPoolStake c → 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
.
PoolDistr | |
|
Instances
Crypto c ⇒ ToJSON (PoolDistr c) | |
Generic (PoolDistr c) | |
Show (PoolDistr c) | |
Crypto c ⇒ DecCBOR (PoolDistr c) | |
Crypto c ⇒ EncCBOR (PoolDistr c) | |
NFData (PoolDistr c) | |
Defined in Cardano.Ledger.PoolDistr | |
Eq (PoolDistr c) | |
NoThunks (PoolDistr c) | |
type Rep (PoolDistr c) | |
Defined in Cardano.Ledger.PoolDistr type Rep (PoolDistr c) = D1 ('MetaData "PoolDistr" "Cardano.Ledger.PoolDistr" "cardano-ledger-core-1.16.0.0-inplace" 'False) (C1 ('MetaCons "PoolDistr" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPoolDistr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool c) (IndividualPoolStake c))) :*: S1 ('MetaSel ('Just "pdTotalActiveStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (CompactForm Coin)))) |
word64ToCoin ∷ Word64 → Coin Source #
The amount of value held by a transaction output.
Instances
data Credential (kr ∷ KeyRole) c 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.
ScriptHashObj !(ScriptHash c) | |
KeyHashObj !(KeyHash kr c) |
Instances
data StakeReference c Source #
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 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.16.0.0-inplace" 'False) (C1 ('MetaCons "Ptr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 TxIx) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness '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 | |
EncCBORGroup ProtVer | |
ToPlutusData ProtVer | |
Defined in Cardano.Ledger.Plutus.ToPlutusData | |
NFData ProtVer | |
Defined in Cardano.Ledger.BaseTypes | |
Eq ProtVer | |
Ord ProtVer | |
Defined in Cardano.Ledger.BaseTypes | |
NoThunks ProtVer | |
type Rep ProtVer | |
Defined in Cardano.Ledger.BaseTypes type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.16.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.
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.16.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)) |
Globals | |
|
Instances
Instances
FromJSON Network | |
ToJSON Network | |
Bounded Network | |
Enum Network | |
Defined in Cardano.Ledger.BaseTypes succ ∷ Network → Network Source # pred ∷ Network → Network Source # toEnum ∷ Int → Network Source # fromEnum ∷ Network → Int Source # enumFrom ∷ Network → [Network] Source # enumFromThen ∷ Network → Network → [Network] Source # enumFromTo ∷ Network → Network → [Network] Source # enumFromThenTo ∷ Network → Network → Network → [Network] Source # | |
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 | |
Defined in Cardano.Ledger.BaseTypes | |
NoThunks Network | |
type Rep Network | |
Transaction index.
Certificate index. Use certIxFromIntegral
in order to construct this
index safely from anything other than Word16
. There is also
mkCertIxPartial
that can be used for testing.
Instances
ToJSON CertIx | |
Bounded CertIx | |
Enum CertIx | |
Defined in Cardano.Ledger.BaseTypes succ ∷ CertIx → CertIx Source # pred ∷ CertIx → CertIx Source # toEnum ∷ Int → CertIx Source # fromEnum ∷ CertIx → Int Source # enumFrom ∷ CertIx → [CertIx] Source # enumFromThen ∷ CertIx → CertIx → [CertIx] Source # enumFromTo ∷ CertIx → CertIx → [CertIx] Source # enumFromThenTo ∷ CertIx → CertIx → CertIx → [CertIx] Source # | |
Show CertIx | |
FromCBOR CertIx | |
ToCBOR CertIx | |
DecCBOR CertIx | |
EncCBOR CertIx | |
NFData CertIx | |
Defined in Cardano.Ledger.BaseTypes | |
Eq CertIx | |
Ord CertIx | |
Defined in Cardano.Ledger.BaseTypes | |
NoThunks CertIx | |
data BootstrapWitness c where Source #
pattern BootstrapWitness ∷ Crypto c ⇒ VKey 'Witness c → SignedDSIGN c (Hash c EraIndependentTxBody) → ChainCode → ByteString → BootstrapWitness c |
Instances
data WitVKey (kr ∷ KeyRole) c where Source #
Proof/Witness that a transaction is authorized by the given key holder.
pattern WitVKey ∷ (Typeable kr, Crypto c) ⇒ VKey kr c → SignedDSIGN c (Hash c EraIndependentTxBody) → WitVKey kr c |
Instances
newtype ScriptHash c Source #
Instances
hashVerKeyVRF ∷ ∀ c (r ∷ KeyRoleVRF). Crypto c ⇒ VerKeyVRF c → VRFVerKeyHash r c Source #
The role of a key.
Note that a role is not _fixed_, nor is it unique. In particular, keys may
variously be used as witnesses, and so in many case we will change the role
of a key to the Witness
role.
It is also perfectly allowable for a key to be used in many roles; there is nothing prohibiting somebody using the same underlying key as their payment and staking key, as well as the key for their stake pool. So these roles are more intended for two purposes:
- To make explicit how we are using a key in the specifications
- To provide a guide to downstream implementors, for whom the profusion of keys may be confusing.
coerceKeyRole ∷ ∀ (r ∷ KeyRole) c (r' ∷ KeyRole). HasKeyRole a ⇒ a r c → a r' c 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) c Source #
Discriminated verification key
We wrap the basic VerKeyDSIGN
in order to add the key role.
VKey | |
|
Instances
HasKeyRole VKey | |
Defined in Cardano.Ledger.Keys.Internal | |
Generic (VKey kd c) | |
Crypto c ⇒ Show (VKey kd c) | |
(Crypto c, Typeable kd) ⇒ FromCBOR (VKey kd c) | |
(Crypto c, Typeable kd) ⇒ ToCBOR (VKey kd c) | |
(Crypto c, Typeable kd) ⇒ DecCBOR (VKey kd c) | |
(Crypto c, Typeable kd) ⇒ EncCBOR (VKey kd c) | |
(Crypto c, NFData (VerKeyDSIGN (DSIGN c))) ⇒ NFData (VKey kd c) | |
Defined in Cardano.Ledger.Keys.Internal | |
Crypto c ⇒ Eq (VKey kd c) | |
Crypto c ⇒ NoThunks (VKey kd c) | |
type Rep (VKey kd c) | |
Defined in Cardano.Ledger.Keys.Internal type Rep (VKey kd c) = D1 ('MetaData "VKey" "Cardano.Ledger.Keys.Internal" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "VKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unVKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerKeyDSIGN (DSIGN c))))) |
newtype KeyHash (r ∷ KeyRole) c Source #
Discriminated hash of public Key
Instances
type KESignable c = Signable (KES c) Source #
data GenDelegPair c Source #
GenDelegPair | |
|
Instances
GenDelegs | |
|
Instances
Crypto c ⇒ FromJSON (GenDelegs c) | |
Crypto c ⇒ ToJSON (GenDelegs c) | |
Generic (GenDelegs c) | |
Show (GenDelegs c) | |
Crypto c ⇒ DecCBOR (GenDelegs c) | |
Crypto c ⇒ EncCBOR (GenDelegs c) | |
NFData (GenDelegs c) | |
Defined in Cardano.Ledger.Keys.Internal | |
Eq (GenDelegs c) | |
NoThunks (GenDelegs c) | |
type Rep (GenDelegs c) | |
Defined in Cardano.Ledger.Keys.Internal type Rep (GenDelegs c) = D1 ('MetaData "GenDelegs" "Cardano.Ledger.Keys.Internal" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "GenDelegs" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGenDelegs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'Genesis c) (GenDelegPair c))))) |
type SignedDSIGN c = SignedDSIGN (DSIGN c) Source #
type SignKeyDSIGN c = SignKeyDSIGN (DSIGN c) Source #
type SignKeyKES c = SignKeyKES (KES c) Source #
type CertifiedVRF c = CertifiedVRF (VRF c) Source #
type SignKeyVRF c = SignKeyVRF (VRF c) Source #
A generic metadatum type.
Instances
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
ProposedPPUpdates (Map (KeyHash 'Genesis (EraCrypto era)) (PParamsUpdate era)) |
Instances
Update Proposal
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.15.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 #
ShelleyGovState | |
|
Instances
Instances
Crypto crypto ⇒ ToJSON (NonMyopic crypto) Source # | |
Generic (NonMyopic c) Source # | |
Show (NonMyopic c) Source # | |
Crypto c ⇒ DecShareCBOR (NonMyopic c) Source # | |
Crypto c ⇒ EncCBOR (NonMyopic c) Source # | |
Default (NonMyopic c) Source # | |
Defined in Cardano.Ledger.Shelley.PoolRank | |
NFData (NonMyopic c) Source # | |
Defined in Cardano.Ledger.Shelley.PoolRank | |
Eq (NonMyopic c) Source # | |
NoThunks (NonMyopic c) Source # | |
type Rep (NonMyopic c) Source # | |
Defined in Cardano.Ledger.Shelley.PoolRank type Rep (NonMyopic c) = D1 ('MetaData "NonMyopic" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.15.0.0-inplace" 'False) (C1 ('MetaCons "NonMyopic" 'PrefixI 'True) (S1 ('MetaSel ('Just "likelihoodsNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool c) Likelihood)) :*: S1 ('MetaSel ('Just "rewardPotNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) | |
type Share (NonMyopic c) Source # | |
data RewardUpdate c Source #
The ultimate goal of a reward update computation. Aggregating rewards for each staking credential.
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 #
EpochNotLongEnough EpochSize Word64 Rational EpochSize | |
MaxKESEvolutionsUnsupported Word64 Word | |
QuorumTooSmall Word64 Word64 Word64 |
Instances
Show ValidationErr Source # | |
Defined in Cardano.Ledger.Shelley.Genesis | |
Eq ValidationErr Source # | |
Defined in Cardano.Ledger.Shelley.Genesis (==) ∷ ValidationErr → ValidationErr → Bool Source # (/=) ∷ ValidationErr → ValidationErr → Bool Source # |
data ShelleyGenesis c 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.
ShelleyGenesis | |
|
Instances
newtype NominalDiffTimeMicro Source #
Unlike
that supports NominalDiffTime
precision, this type
only supports Pico
precision.Micro
Instances
data ShelleyGenesisStaking c 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.
ShelleyGenesisStaking | |
|
Instances
emptyGenesisStaking ∷ ShelleyGenesisStaking c Source #
Empty genesis staking
sgInitialFundsL ∷ Lens' (ShelleyGenesis c) (ListMap (Addr c) Coin) Source #
sgStakingL ∷ Lens' (ShelleyGenesis c) (ShelleyGenesisStaking c) Source #
toShelleyGenesisPairs ∷ (KeyValue e a, Crypto c) ⇒ ShelleyGenesis c → [a] Source #
genesisUTxO ∷ ∀ era. EraTxOut era ⇒ ShelleyGenesis (EraCrypto era) → UTxO era Source #
initialFundsPseudoTxIn ∷ ∀ c. Crypto c ⇒ Addr c → TxIn c 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 ∷ ∀ c. Crypto c ⇒ ShelleyGenesis c → Either [ValidationErr] () Source #
Do some basic sanity checking on the Shelley genesis file.
mkShelleyGlobals ∷ ShelleyGenesis c → EpochInfo (Either Text) → Globals Source #
data ShelleyTxAuxData era where Source #
pattern ShelleyTxAuxData ∷ ∀ era. Era era ⇒ Map Word64 Metadatum → ShelleyTxAuxData era |
Instances
data ShelleyDelegCert c Source #
ShelleyRegCert !(StakeCredential c) | A stake credential registration certificate. |
ShelleyUnRegCert !(StakeCredential c) | A stake credential deregistration certificate. |
ShelleyDelegCert !(StakeCredential c) !(KeyHash 'StakePool c) | A stake delegation certificate. |
Instances
Move instantaneous rewards certificate
MIRCert | |
|
Instances
Crypto c ⇒ ToJSON (MIRCert c) Source # | |
Generic (MIRCert c) Source # | |
Show (MIRCert c) Source # | |
Crypto c ⇒ DecCBOR (MIRCert c) Source # | |
Crypto c ⇒ EncCBOR (MIRCert c) Source # | |
NFData (MIRCert c) Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
Eq (MIRCert c) Source # | |
Ord (MIRCert c) Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
NoThunks (MIRCert c) Source # | |
type Rep (MIRCert c) Source # | |
Defined in Cardano.Ledger.Shelley.TxCert type Rep (MIRCert c) = D1 ('MetaData "MIRCert" "Cardano.Ledger.Shelley.TxCert" "cardano-ledger-shelley-1.15.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 c)))) |
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.
Instances
Crypto c ⇒ ToJSON (MIRTarget c) Source # | |
Generic (MIRTarget c) Source # | |
Show (MIRTarget c) Source # | |
Crypto c ⇒ DecCBOR (MIRTarget c) Source # | |
Crypto c ⇒ EncCBOR (MIRTarget c) Source # | |
NFData (MIRTarget c) Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
Eq (MIRTarget c) Source # | |
Ord (MIRTarget c) Source # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
NoThunks (MIRTarget c) Source # | |
type Rep (MIRTarget c) Source # | |
Defined in Cardano.Ledger.Shelley.TxCert type Rep (MIRTarget c) = D1 ('MetaData "MIRTarget" "Cardano.Ledger.Shelley.TxCert" "cardano-ledger-shelley-1.15.0.0-inplace" 'False) (C1 ('MetaCons "StakeAddressesMIR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking c) DeltaCoin))) :+: C1 ('MetaCons "SendToOppositePotMIR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) |
Instances
ToJSON MIRPot Source # | |
Bounded MIRPot Source # | |
Enum MIRPot Source # | |
Defined in Cardano.Ledger.Shelley.TxCert succ ∷ MIRPot → MIRPot Source # pred ∷ MIRPot → MIRPot Source # toEnum ∷ Int → MIRPot Source # fromEnum ∷ MIRPot → Int Source # enumFrom ∷ MIRPot → [MIRPot] Source # enumFromThen ∷ MIRPot → MIRPot → [MIRPot] Source # enumFromTo ∷ MIRPot → MIRPot → [MIRPot] Source # enumFromThenTo ∷ MIRPot → MIRPot → MIRPot → [MIRPot] Source # | |
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 # | |
Defined in Cardano.Ledger.Shelley.TxCert | |
NoThunks MIRPot Source # | |
type Rep MIRPot Source # | |
data GenesisDelegCert c Source #
Genesis key delegation certificate
GenesisDelegCert !(KeyHash 'Genesis c) !(KeyHash 'GenesisDelegate c) !(VRFVerKeyHash 'GenDelegVRF c) |
Instances
data ShelleyTxOut era Source #
TxOutCompact !(CompactAddr (EraCrypto era)) !(CompactForm (Value era)) |
pattern ShelleyTxOut ∷ (HasCallStack, Era era, Val (Value era)) ⇒ Addr (EraCrypto era) → Value era → ShelleyTxOut era |
Instances
newtype ShelleyTxBody era Source #
pattern ShelleyTxBody ∷ (EraTxOut era, EncCBOR (TxCert era)) ⇒ Set (TxIn (EraCrypto era)) → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals (EraCrypto era) → Coin → SlotNo → StrictMaybe (Update era) → StrictMaybe (AuxiliaryDataHash (EraCrypto era)) → ShelleyTxBody era | Pattern for use by external users |
Instances
data ShelleyTxWits era Source #
Instances
data ShelleyTx era where Source #
pattern ShelleyTx ∷ EraTx era ⇒ TxBody era → TxWits era → StrictMaybe (TxAuxData era) → ShelleyTx era |
Instances
data LedgerState era Source #
The state associated with a Ledger
.
LedgerState | |
|
Instances
data NewEpochState era Source #
New Epoch state and environment
NewEpochState | |
|
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.
UTxOState | |
|
Instances
data IncrementalStake c 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.
IStake | |
|
Instances
data EpochState era Source #
EpochState | |
|
Instances
data AccountState Source #
AccountState | |
|
Instances
bbHash ∷ ∀ era. Era era ⇒ ShelleyTxSeq era → Hash (EraCrypto era) EraIndependentBlockBody Source #
Hash a given block body
Instances
Generic (UtxoEnv era) Source # | |
Show (PParams era) ⇒ Show (UtxoEnv era) Source # | |
EraPParams era ⇒ DecCBOR (UtxoEnv era) Source # | |
EraPParams era ⇒ EncCBOR (UtxoEnv era) Source # | |
(Era era, NFData (PParams era)) ⇒ NFData (UtxoEnv era) Source # | |
Defined in Cardano.Ledger.Shelley.Rules.Utxo | |
Eq (PParams 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.15.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.15.0.0-inplace" 'False) (C1 ('MetaCons "PoolEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams era)))) |
DelegEnv | |
|
Instances
DelplEnv | |
|
DelegsEnv | |
|
LedgerEnv | |
|
Instances
data ShelleyLedgersEnv era Source #