Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Api.Consensus
Synopsis
- type family ConsensusProtocol era where ...
- type family ChainDepStateProtocol era where ...
- data ConsensusModeParams where
- newtype EpochSlots = EpochSlots {}
- type family ConsensusCryptoForBlock block where ...
- type family ConsensusBlockForEra era where ...
- toConsensusEraIndex :: forall (xs :: [Type]) era. CardanoBlock StandardCrypto ~ HardForkBlock xs => CardanoEra era -> EraIndex xs
- fromConsensusEraIndex :: EraIndex (CardanoEras StandardCrypto) -> AnyCardanoEra
- data TxInMode where
- TxInMode :: forall era. ShelleyBasedEra era -> Tx era -> TxInMode
- TxInByronSpecial :: GenTx ByronBlock -> TxInMode
- fromConsensusGenTx :: CardanoBlock StandardCrypto ~ block => GenTx block -> TxInMode
- toConsensusGenTx :: CardanoBlock StandardCrypto ~ block => TxInMode -> GenTx block
- data TxIdInMode where
- TxIdInMode :: forall era. CardanoEra era -> TxId -> TxIdInMode
- toConsensusTxId :: CardanoBlock StandardCrypto ~ block => TxIdInMode -> TxId (GenTx block)
- data TxValidationError era where
- ByronTxValidationError :: forall era. ApplyTxErr ByronBlock -> TxValidationError era
- ShelleyTxValidationError :: forall era. ShelleyBasedEra era -> ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) -> TxValidationError era
- data TxValidationErrorInCardanoMode where
- fromConsensusApplyTxErr :: CardanoBlock StandardCrypto ~ block => ApplyTxErr block -> TxValidationErrorInCardanoMode
- data BlockType blk where
- data SomeBlockType where
- SomeBlockType :: forall blk. BlockType blk -> SomeBlockType
- reflBlockType :: BlockType blk -> BlockType blk' -> Maybe (blk :~: blk')
- class (RunNode blk, IOLike m) => Protocol (m :: Type -> Type) blk where
- data ProtocolInfoArgs blk
- protocolInfo :: ProtocolInfoArgs blk -> (ProtocolInfo blk, m [BlockForging m blk])
- data family ProtocolInfoArgs blk
- class RunNode blk => ProtocolClient blk where
- data ProtocolClientInfoArgs blk
- protocolClientInfo :: ProtocolClientInfoArgs blk -> ProtocolClientInfo blk
- data family ProtocolClientInfoArgs blk
- data ByronBlock
- type family ChainDepState p
- data family GenTx blk
- data EraMismatch = EraMismatch {
- ledgerEraName :: !Text
- otherEraName :: !Text
- data PastHorizonException
- class ConsensusProtocol p => PraosProtocolSupportsNode p
- type family PraosProtocolSupportsNodeCrypto p
- data ShelleyGenesisStaking = ShelleyGenesisStaking {}
- byronIdTx :: ATxAux ByteString -> TxId
- condense :: Condense a => a -> String
- getOpCertCounters :: PraosProtocolSupportsNode p => proxy p -> ChainDepState p -> Map (KeyHash 'BlockIssuer) Word64
- interpreterToEpochInfo :: forall (xs :: [Type]). Interpreter xs -> EpochInfo (Except PastHorizonException)
- unsafeExtendSafeZone :: forall (xs :: [Type]). Interpreter xs -> Interpreter xs
- txId :: HasTxId tx => tx -> TxId tx
Consensus modes
Consensus modes. The node supports several different modes with different combinations of consensus protocols and ledger eras.
The protocols supported in each era
type family ConsensusProtocol era where ... Source #
Equations
type family ChainDepStateProtocol era where ... Source #
Connection parameters for each mode
data ConsensusModeParams where Source #
The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.
It is in fact only the Byron era that requires extra parameters, but this is
of course inherited by the CardanoMode
that uses the Byron era. The reason
this parameter is needed stems from unfortunate design decisions from the
legacy Byron era. The slots per epoch are needed to be able to decode
epoch boundary blocks from the Byron era.
It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.
Constructors
CardanoModeParams :: EpochSlots -> ConsensusModeParams |
Instances
newtype EpochSlots Source #
The number of slots per epoch.
Constructors
EpochSlots | |
Fields |
Instances
Conversions to and from types in the consensus library
type family ConsensusCryptoForBlock block where ... Source #
type family ConsensusBlockForEra era where ... Source #
A closed type family that maps between the consensus mode (from this API) and the block type used by the consensus libraries.
Equations
ConsensusBlockForEra ByronEra = ByronBlock | |
ConsensusBlockForEra ShelleyEra = StandardShelleyBlock | |
ConsensusBlockForEra AllegraEra = StandardAllegraBlock | |
ConsensusBlockForEra MaryEra = StandardMaryBlock | |
ConsensusBlockForEra AlonzoEra = StandardAlonzoBlock | |
ConsensusBlockForEra BabbageEra = StandardBabbageBlock | |
ConsensusBlockForEra ConwayEra = StandardConwayBlock |
toConsensusEraIndex :: forall (xs :: [Type]) era. CardanoBlock StandardCrypto ~ HardForkBlock xs => CardanoEra era -> EraIndex xs Source #
Transactions in the consensus mode
Transactions in the context of a consensus mode, and other types used in the transaction submission protocol.
Transaction in a consensus mode
A Tx
in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode
this type is a sum of the
different transaction types for all the eras. It is used in the
LocalTxSubmission protocol.
Constructors
TxInMode :: forall era. ShelleyBasedEra era -> Tx era -> TxInMode | Shelley based transactions. |
TxInByronSpecial :: GenTx ByronBlock -> TxInMode | Legacy Byron transactions and things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs. |
fromConsensusGenTx :: CardanoBlock StandardCrypto ~ block => GenTx block -> TxInMode Source #
toConsensusGenTx :: CardanoBlock StandardCrypto ~ block => TxInMode -> GenTx block Source #
Transaction id in a consensus mode
data TxIdInMode where Source #
A TxId
in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode
this type is a sum of the
different transaction types for all the eras. It is used in the
LocalTxMonitoring protocol.
TODO Rename to TxIdInEra
Constructors
TxIdInMode :: forall era. CardanoEra era -> TxId -> TxIdInMode |
toConsensusTxId :: CardanoBlock StandardCrypto ~ block => TxIdInMode -> TxId (GenTx block) Source #
Transaction validation errors
data TxValidationError era where Source #
The transaction validations errors that can occur from trying to submit a transaction to a local node. The errors are specific to an era.
Constructors
ByronTxValidationError :: forall era. ApplyTxErr ByronBlock -> TxValidationError era | |
ShelleyTxValidationError :: forall era. ShelleyBasedEra era -> ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) -> TxValidationError era |
Instances
ToJSON (TxValidationError era) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.InMode Methods toJSON :: TxValidationError era -> Value # toEncoding :: TxValidationError era -> Encoding # toJSONList :: [TxValidationError era] -> Value # toEncodingList :: [TxValidationError era] -> Encoding # omitField :: TxValidationError era -> Bool # | |||||
Generic (TxValidationError era) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.InMode Associated Types
Methods from :: TxValidationError era -> Rep (TxValidationError era) x Source # to :: Rep (TxValidationError era) x -> TxValidationError era Source # | |||||
Show (TxValidationError era) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.InMode | |||||
type Rep (TxValidationError era) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.InMode type Rep (TxValidationError era) = D1 ('MetaData "TxValidationError" "Cardano.Api.Consensus.Internal.InMode" "cardano-api-10.17.0.0-inplace" 'False) (C1 ('MetaCons "ByronTxValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ApplyTxErr ByronBlock))) :+: C1 ('MetaCons "ShelleyTxValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ShelleyBasedEra era)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)))))) |
data TxValidationErrorInCardanoMode where Source #
A TxValidationError
in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
Constructors
TxValidationErrorInCardanoMode :: forall era. TxValidationError era -> TxValidationErrorInCardanoMode | |
TxValidationEraMismatch :: EraMismatch -> TxValidationErrorInCardanoMode |
Instances
ToJSON TxValidationErrorInCardanoMode Source # | |
Defined in Cardano.Api.Consensus.Internal.InMode Methods toJSON :: TxValidationErrorInCardanoMode -> Value # toEncoding :: TxValidationErrorInCardanoMode -> Encoding # toJSONList :: [TxValidationErrorInCardanoMode] -> Value # toEncodingList :: [TxValidationErrorInCardanoMode] -> Encoding # | |
Show TxValidationErrorInCardanoMode Source # | |
Defined in Cardano.Api.Consensus.Internal.InMode |
fromConsensusApplyTxErr :: CardanoBlock StandardCrypto ~ block => ApplyTxErr block -> TxValidationErrorInCardanoMode Source #
Consensus protocol
data BlockType blk where Source #
Constructors
ByronBlockType :: BlockType (HardForkBlock '[ByronBlock]) | |
ShelleyBlockType :: BlockType (HardForkBlock '[ShelleyBlock (TPraos StandardCrypto) ShelleyEra]) | |
CardanoBlockType :: BlockType (HardForkBlock (CardanoEras StandardCrypto)) |
data SomeBlockType where Source #
Constructors
SomeBlockType :: forall blk. BlockType blk -> SomeBlockType |
Instances
class (RunNode blk, IOLike m) => Protocol (m :: Type -> Type) blk where Source #
Associated Types
data ProtocolInfoArgs blk Source #
Methods
protocolInfo :: ProtocolInfoArgs blk -> (ProtocolInfo blk, m [BlockForging m blk]) Source #
Instances
IOLike m => Protocol m ByronBlockHFC Source # | Run PBFT against the Byron ledger | ||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
Methods protocolInfo :: ProtocolInfoArgs ByronBlockHFC -> (ProtocolInfo ByronBlockHFC, m [BlockForging m ByronBlockHFC]) Source # | |||||
(CardanoHardForkConstraints StandardCrypto, IOLike m) => Protocol m (CardanoBlock StandardCrypto) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
Methods protocolInfo :: ProtocolInfoArgs (CardanoBlock StandardCrypto) -> (ProtocolInfo (CardanoBlock StandardCrypto), m [BlockForging m (CardanoBlock StandardCrypto)]) Source # | |||||
(IOLike m, LedgerSupportsProtocol (ShelleyBlock (TPraos StandardCrypto) ShelleyEra)) => Protocol m (ShelleyBlockHFC (TPraos StandardCrypto) ShelleyEra) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
Methods protocolInfo :: ProtocolInfoArgs (ShelleyBlockHFC (TPraos StandardCrypto) ShelleyEra) -> (ProtocolInfo (ShelleyBlockHFC (TPraos StandardCrypto) ShelleyEra), m [BlockForging m (ShelleyBlockHFC (TPraos StandardCrypto) ShelleyEra)]) Source # |
data family ProtocolInfoArgs blk Source #
Instances
class RunNode blk => ProtocolClient blk where Source #
Node client support for each consensus protocol.
This is like Protocol
but for clients of the node, so with less onerous
requirements than to run a node.
Associated Types
data ProtocolClientInfoArgs blk Source #
Methods
protocolClientInfo :: ProtocolClientInfoArgs blk -> ProtocolClientInfo blk Source #
Instances
ProtocolClient ByronBlockHFC Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
| |||||
CardanoHardForkConstraints StandardCrypto => ProtocolClient (CardanoBlock StandardCrypto) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
| |||||
LedgerSupportsProtocol (ShelleyBlock (TPraos StandardCrypto) ShelleyEra) => ProtocolClient (ShelleyBlockHFC (TPraos StandardCrypto) ShelleyEra) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
|
data family ProtocolClientInfoArgs blk Source #
Instances
Reexports from ouroboros-consensus
data ByronBlock Source #
Byron block
We cache two bits of information:
- We cache the slot number as this is not readily available for EBBs.
Having it cached allows us to e.g. give a
HasHeader
instance. - We cache the hash as this is expensive to compute and we need it often.
Instances
Show ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
ProtocolClient ByronBlockHFC Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
| |||||
Eq ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods (==) :: ByronBlock -> ByronBlock -> Bool Source # (/=) :: ByronBlock -> ByronBlock -> Bool Source # | |||||
ConvertRawHash ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods toRawHash :: proxy ByronBlock -> HeaderHash ByronBlock -> ByteString Source # fromRawHash :: proxy ByronBlock -> ByteString -> HeaderHash ByronBlock Source # toShortRawHash :: proxy ByronBlock -> HeaderHash ByronBlock -> ShortByteString Source # fromShortRawHash :: proxy ByronBlock -> ShortByteString -> HeaderHash ByronBlock Source # hashSize :: proxy ByronBlock -> Word32 Source # | |||||
GetHeader ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods getHeader :: ByronBlock -> Header ByronBlock Source # blockMatchesHeader :: Header ByronBlock -> ByronBlock -> Bool Source # headerIsEBB :: Header ByronBlock -> Maybe EpochNo Source # | |||||
GetPrevHash ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods headerPrevHash :: Header ByronBlock -> ChainHash ByronBlock Source # | |||||
Condense ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods condense :: ByronBlock -> String Source # | |||||
HasHeader ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods getHeaderFields :: ByronBlock -> HeaderFields ByronBlock Source # | |||||
IOLike m => Protocol m ByronBlockHFC Source # | Run PBFT against the Byron ledger | ||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
Methods protocolInfo :: ProtocolInfoArgs ByronBlockHFC -> (ProtocolInfo ByronBlockHFC, m [BlockForging m ByronBlockHFC]) Source # | |||||
SerialiseNodeToClient ByronBlock ByronPartialLedgerConfig | |||||
Defined in Ouroboros.Consensus.Byron.ByronHFC Methods encodeNodeToClient :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> ByronPartialLedgerConfig -> Encoding Source # decodeNodeToClient :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> forall s. Decoder s ByronPartialLedgerConfig Source # | |||||
StandardHash ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
ShowProxy ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
(CardanoHardForkConstraints StandardCrypto, IOLike m) => Protocol m (CardanoBlock StandardCrypto) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
Methods protocolInfo :: ProtocolInfoArgs (CardanoBlock StandardCrypto) -> (ProtocolInfo (CardanoBlock StandardCrypto), m [BlockForging m (CardanoBlock StandardCrypto)]) Source # | |||||
ShowProxy (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
Generic (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Associated Types
Methods from :: Header ByronBlock -> Rep (Header ByronBlock) x Source # to :: Rep (Header ByronBlock) x -> Header ByronBlock Source # | |||||
Show (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
CardanoHardForkConstraints StandardCrypto => ProtocolClient (CardanoBlock StandardCrypto) Source # | |||||
Defined in Cardano.Api.Consensus.Internal.Protocol Associated Types
| |||||
Eq (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods (==) :: Header ByronBlock -> Header ByronBlock -> Bool Source # (/=) :: Header ByronBlock -> Header ByronBlock -> Bool Source # | |||||
NoThunks (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods noThunks :: Context -> Header ByronBlock -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> Header ByronBlock -> IO (Maybe ThunkInfo) # showTypeOf :: Proxy (Header ByronBlock) -> String # | |||||
Condense (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
HasHeader (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block Methods getHeaderFields :: Header ByronBlock -> HeaderFields (Header ByronBlock) Source # | |||||
CardanoHardForkConstraints c => IndexedMemPack (LedgerState (HardForkBlock (CardanoEras c)) EmptyMK) (CardanoTxOut c) | |||||
Defined in Ouroboros.Consensus.Cardano.Ledger Methods indexedPackedByteCount :: LedgerState (HardForkBlock (CardanoEras c)) EmptyMK -> CardanoTxOut c -> Int Source # indexedPackM :: LedgerState (HardForkBlock (CardanoEras c)) EmptyMK -> CardanoTxOut c -> Pack s () Source # indexedUnpackM :: Buffer b => LedgerState (HardForkBlock (CardanoEras c)) EmptyMK -> Unpack b (CardanoTxOut c) Source # indexedTypeName :: LedgerState (HardForkBlock (CardanoEras c)) EmptyMK -> String Source # | |||||
data ProtocolClientInfoArgs ByronBlockHFC Source # | |||||
data ProtocolInfoArgs ByronBlockHFC Source # | |||||
data BlockConfig ByronBlock | Extended configuration we need for Byron | ||||
type BlockProtocol ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.PBFT | |||||
newtype CodecConfig ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config | |||||
data Header ByronBlock | Byron header See | ||||
newtype StorageConfig ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config | |||||
type CannotForge ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Node | |||||
type ForgeStateInfo ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Node | |||||
type ForgeStateUpdateError ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Node | |||||
data NestedCtxt_ ByronBlock f a | Since the Byron header does not contain the size, we include it in the nested type instead. | ||||
type TentativeHeaderState ByronBlock | |||||
type TentativeHeaderView ByronBlock | |||||
type HardForkIndices ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type PartialLedgerConfig ByronBlock | |||||
type OtherHeaderEnvelopeError ByronBlock | |||||
type TipInfo ByronBlock | |||||
data LedgerState ByronBlock mk | |||||
type LedgerUpdate ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Inspect | |||||
type LedgerWarning ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Inspect | |||||
data BlockQuery ByronBlock fp result | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type ApplyTxErr ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
data GenTx ByronBlock | Generalized transactions in Byron This is effectively the same as | ||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
type TxMeasure ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
type BlockNodeToClientVersion ByronBlock | |||||
type BlockNodeToNodeVersion ByronBlock | |||||
type HeaderHash ByronBlock | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block | |||||
type Rep (BlockConfig ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config type Rep (BlockConfig ByronBlock) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) (C1 ('MetaCons "ByronConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronGenesisConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Config) :*: (S1 ('MetaSel ('Just "byronProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ProtocolVersion) :*: S1 ('MetaSel ('Just "byronSoftwareVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SoftwareVersion)))) | |||||
type Rep (CodecConfig ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config type Rep (CodecConfig ByronBlock) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'True) (C1 ('MetaCons "ByronCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochSlots))) | |||||
type Rep (Header ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Block type Rep (Header ByronBlock) = D1 ('MetaData "Header" "Ouroboros.Consensus.Byron.Ledger.Block" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) (C1 ('MetaCons "ByronHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "byronHeaderRaw") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ABlockOrBoundaryHdr ByteString)) :*: S1 ('MetaSel ('Just "byronHeaderSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "byronHeaderHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ByronHash) :*: S1 ('MetaSel ('Just "byronHeaderBlockSizeHint") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SizeInBytes)))) | |||||
type Rep (StorageConfig ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config type Rep (StorageConfig ByronBlock) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'True) (C1 ('MetaCons "ByronStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronBlockConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BlockConfig ByronBlock)))) | |||||
type Rep (Validated (GenTx ByronBlock)) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (Validated (GenTx ByronBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'True) (C1 ('MetaCons "ValidatedByronTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronBlock)))) | |||||
type Rep (GenTx ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (GenTx ByronBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) ((C1 ('MetaCons "ByronTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ATxAux ByteString))) :+: C1 ('MetaCons "ByronDlg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 CertificateId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ACertificate ByteString)))) :+: (C1 ('MetaCons "ByronUpdateProposal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 UpId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (AProposal ByteString))) :+: C1 ('MetaCons "ByronUpdateVote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 VoteId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (AVote ByteString))))) | |||||
data ProtocolClientInfoArgs (CardanoBlock StandardCrypto) Source # | |||||
data ProtocolInfoArgs (CardanoBlock StandardCrypto) Source # | |||||
type HardForkTxMeasure (CardanoEras c) | |||||
Defined in Ouroboros.Consensus.Cardano.CanHardFork | |||||
newtype CanonicalTxIn (CardanoEras c) | |||||
Defined in Ouroboros.Consensus.Cardano.Ledger | |||||
type HardForkTxOut (CardanoEras c) | |||||
Defined in Ouroboros.Consensus.Cardano.Ledger | |||||
newtype Validated (GenTx ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
type AuxLedgerEvent (LedgerState ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type LedgerCfg (LedgerState ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type LedgerErr (LedgerState ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
data TxId (GenTx ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
type TxIn (LedgerState ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type TxOut (LedgerState ByronBlock) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type Rep (LedgerState ByronBlock mk) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger type Rep (LedgerState ByronBlock mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) (C1 ('MetaCons "ByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronLedgerTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin BlockNo)) :*: (S1 ('MetaSel ('Just "byronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "byronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ByronTransition)))) | |||||
data Ticked (LedgerState ByronBlock) (mk :: MapKind) | The ticked Byron ledger state | ||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||
type Rep (Ticked (LedgerState ByronBlock) mk) | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger type Rep (Ticked (LedgerState ByronBlock) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ByronTransition))) | |||||
newtype CanonicalTxIn '[ByronBlock] | |||||
Defined in Ouroboros.Consensus.Byron.ByronHFC | |||||
type HardForkTxOut '[ByronBlock] | |||||
Defined in Ouroboros.Consensus.Byron.ByronHFC |
type family ChainDepState p Source #
Protocol-specific state
NOTE: This chain is blockchain dependent, i.e., updated when new blocks come in (more precisely, new headers), and subject to rollback.
Instances
type ChainDepState (HardForkProtocol xs) | |
type ChainDepState (Bft c) | |
Defined in Ouroboros.Consensus.Protocol.BFT | |
type ChainDepState (PBft c) | |
Defined in Ouroboros.Consensus.Protocol.PBFT | |
type ChainDepState (Praos c) | |
Defined in Ouroboros.Consensus.Protocol.Praos | |
type ChainDepState (TPraos c) | |
Defined in Ouroboros.Consensus.Protocol.TPraos | |
type ChainDepState (ModChainSel p s) | |
Defined in Ouroboros.Consensus.Protocol.ModChainSel |
data family GenTx blk Source #
Generalized transaction
The mempool (and, accordingly, blocks) consist of "generalized transactions"; this could be "proper" transactions (transferring funds) but also other kinds of things such as update proposals, delegations, etc.
Instances
Inject GenTx | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject :: forall x (xs :: [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) => InjectionIndex xs x -> GenTx x -> GenTx (HardForkBlock xs) Source # | |
Isomorphic GenTx | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project :: NoHardForks blk => GenTx (HardForkBlock '[blk]) -> GenTx blk Source # inject :: NoHardForks blk => GenTx blk -> GenTx (HardForkBlock '[blk]) Source # | |
(Typeable m, Typeable a) => ShowProxy (GenTx (DualBlock m a) :: Type) | |
(Typeable m, Typeable a) => ShowProxy (TxId (GenTx (DualBlock m a)) :: Type) | |
Bridge m a => Show (Validated (GenTx (DualBlock m a))) | |
Bridge m a => Show (GenTx (DualBlock m a)) | |
Show (GenTxId m) => Show (TxId (GenTx (DualBlock m a))) | |
Eq (GenTxId m) => Eq (TxId (GenTx (DualBlock m a))) | |
Ord (GenTxId m) => Ord (TxId (GenTx (DualBlock m a))) | |
Defined in Ouroboros.Consensus.Ledger.Dual Methods compare :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> Ordering Source # (<) :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> Bool Source # (<=) :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> Bool Source # (>) :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> Bool Source # (>=) :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> Bool Source # max :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) Source # min :: TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) -> TxId (GenTx (DualBlock m a)) Source # | |
NoThunks (Validated (GenTx (DualBlock m a))) | |
NoThunks (GenTx (DualBlock m a)) | |
NoThunks (TxId (GenTx (DualBlock m a))) | |
Bridge m a => HasTxId (GenTx (DualBlock m a)) | |
data GenTx ByronBlock | Generalized transactions in Byron This is effectively the same as |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
type TranslationError era (GenTx :.: ShelleyBlock proto) | |
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC | |
type Rep (Validated (GenTx (HardForkBlock xs))) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (Validated (GenTx (HardForkBlock xs))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.27.0.0-98d4bbbb4794985db6f0fbc4f516e4cbc877408de54ac32fbd1eed03abfeb508" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs)))) | |
type Rep (Validated (GenTx ByronBlock)) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (Validated (GenTx ByronBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'True) (C1 ('MetaCons "ValidatedByronTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronBlock)))) | |
type Rep (Validated (GenTx (ShelleyBlock proto era))) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep (Validated (GenTx (ShelleyBlock proto era))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) (C1 ('MetaCons "ShelleyValidatedTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Validated (Tx era))))) | |
type Rep (GenTx (HardForkBlock xs)) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (GenTx (HardForkBlock xs)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.27.0.0-98d4bbbb4794985db6f0fbc4f516e4cbc877408de54ac32fbd1eed03abfeb508" 'True) (C1 ('MetaCons "HardForkGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTx xs)))) | |
type Rep (GenTx ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (GenTx ByronBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) ((C1 ('MetaCons "ByronTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ATxAux ByteString))) :+: C1 ('MetaCons "ByronDlg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 CertificateId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ACertificate ByteString)))) :+: (C1 ('MetaCons "ByronUpdateProposal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 UpId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (AProposal ByteString))) :+: C1 ('MetaCons "ByronUpdateVote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 VoteId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (AVote ByteString))))) | |
type Rep (GenTx (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep (GenTx (ShelleyBlock proto era)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.1.0-582e32434684e3551683d7670b1accb15b237e2048628eacef46fe86e338c4c7" 'False) (C1 ('MetaCons "ShelleyTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Tx era)))) | |
type Rep (TxId (GenTx (HardForkBlock xs))) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.27.0.0-98d4bbbb4794985db6f0fbc4f516e4cbc877408de54ac32fbd1eed03abfeb508" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs)))) | |
newtype Validated (GenTx (HardForkBlock xs)) | |
data Validated (GenTx (DualBlock m a)) | |
Defined in Ouroboros.Consensus.Ledger.Dual data Validated (GenTx (DualBlock m a)) = ValidatedDualGenTx {
| |
newtype Validated (GenTx ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
data Validated (GenTx (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
newtype GenTx (HardForkBlock xs) | |
newtype TxId (GenTx (HardForkBlock xs)) | |
newtype TxId (GenTx (DualBlock m a)) | |
Defined in Ouroboros.Consensus.Ledger.Dual | |
data TxId (GenTx ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
newtype TxId (GenTx (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
data GenTx (DualBlock m a) | |
Defined in Ouroboros.Consensus.Ledger.Dual data GenTx (DualBlock m a) = DualGenTx {
| |
data GenTx (ShelleyBlock proto era) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool |
data EraMismatch Source #
Extra info for errors caused by applying a block, header, transaction, or query from one era to a ledger from a different era.
Constructors
EraMismatch | |
Fields
|
Instances
Generic EraMismatch | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Associated Types
Methods from :: EraMismatch -> Rep EraMismatch x Source # to :: Rep EraMismatch x -> EraMismatch Source # | |||||
Show EraMismatch | |||||
Eq EraMismatch | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Methods (==) :: EraMismatch -> EraMismatch -> Bool Source # (/=) :: EraMismatch -> EraMismatch -> Bool Source # | |||||
type Rep EraMismatch | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras type Rep EraMismatch = D1 ('MetaData "EraMismatch" "Ouroboros.Consensus.HardFork.Combinator.AcrossEras" "ouroboros-consensus-0.27.0.0-98d4bbbb4794985db6f0fbc4f516e4cbc877408de54ac32fbd1eed03abfeb508" 'False) (C1 ('MetaCons "EraMismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "ledgerEraName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "otherEraName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) |
data PastHorizonException Source #
We tried to convert something that is past the horizon
That is, we tried to convert something that is past the point in time beyond which we lack information due to uncertainty about the next hard fork.
Instances
class ConsensusProtocol p => PraosProtocolSupportsNode p Source #
The node has Praos-aware code that inspects nonces in order to support some Cardano API queries that are crucial to the user exprience
The interface being used for that has grown and needs review, but we're adding to it here under time pressure. See https://github.com/IntersectMBO/cardano-node/issues/3864
Minimal complete definition
Instances
PraosCrypto c => PraosProtocolSupportsNode (Praos c) | |||||
Defined in Ouroboros.Consensus.Protocol.Praos Associated Types
Methods getPraosNonces :: proxy (Praos c) -> ChainDepState (Praos c) -> PraosNonces Source # getOpCertCounters :: proxy (Praos c) -> ChainDepState (Praos c) -> Map (KeyHash 'BlockIssuer) Word64 Source # | |||||
PraosCrypto c => PraosProtocolSupportsNode (TPraos c) | |||||
Defined in Ouroboros.Consensus.Protocol.TPraos Associated Types
Methods getPraosNonces :: proxy (TPraos c) -> ChainDepState (TPraos c) -> PraosNonces Source # getOpCertCounters :: proxy (TPraos c) -> ChainDepState (TPraos c) -> Map (KeyHash 'BlockIssuer) Word64 Source # |
type family PraosProtocolSupportsNodeCrypto p Source #
Instances
type PraosProtocolSupportsNodeCrypto (Praos c) | |
Defined in Ouroboros.Consensus.Protocol.Praos | |
type PraosProtocolSupportsNodeCrypto (TPraos c) | |
Defined in Ouroboros.Consensus.Protocol.TPraos |
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
FromJSON ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods parseJSON :: Value -> Parser ShelleyGenesisStaking # parseJSONList :: Value -> Parser [ShelleyGenesisStaking] # | |||||
ToJSON ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods toJSON :: ShelleyGenesisStaking -> Value # toEncoding :: ShelleyGenesisStaking -> Encoding # toJSONList :: [ShelleyGenesisStaking] -> Value # toEncodingList :: [ShelleyGenesisStaking] -> Encoding # omitField :: ShelleyGenesisStaking -> Bool # | |||||
Monoid ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
Semigroup ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods (<>) :: ShelleyGenesisStaking -> ShelleyGenesisStaking -> ShelleyGenesisStaking Source # sconcat :: NonEmpty ShelleyGenesisStaking -> ShelleyGenesisStaking Source # stimes :: Integral b => b -> ShelleyGenesisStaking -> ShelleyGenesisStaking Source # | |||||
Generic ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Associated Types
Methods from :: ShelleyGenesisStaking -> Rep ShelleyGenesisStaking x Source # to :: Rep ShelleyGenesisStaking x -> ShelleyGenesisStaking Source # | |||||
Show ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
DecCBOR ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
EncCBOR ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods encCBOR :: ShelleyGenesisStaking -> Encoding Source # encodedSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy ShelleyGenesisStaking -> Size Source # encodedListSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy [ShelleyGenesisStaking] -> Size Source # | |||||
Eq ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods (==) :: ShelleyGenesisStaking -> ShelleyGenesisStaking -> Bool Source # (/=) :: ShelleyGenesisStaking -> ShelleyGenesisStaking -> Bool Source # | |||||
NoThunks ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods noThunks :: Context -> ShelleyGenesisStaking -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> ShelleyGenesisStaking -> IO (Maybe ThunkInfo) # | |||||
type Rep ShelleyGenesisStaking | |||||
Defined in Cardano.Ledger.Shelley.Genesis type Rep ShelleyGenesisStaking = D1 ('MetaData "ShelleyGenesisStaking" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.16.0.0-c94e4acbae2c451b736d7fa131482fce1d6ffd0e83dcc66450421e4714554169" 'False) (C1 ('MetaCons "ShelleyGenesisStaking" 'PrefixI 'True) (S1 ('MetaSel ('Just "sgsPools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'StakePool) PoolParams)) :*: S1 ('MetaSel ('Just "sgsStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'Staking) (KeyHash 'StakePool))))) |
getOpCertCounters :: PraosProtocolSupportsNode p => proxy p -> ChainDepState p -> Map (KeyHash 'BlockIssuer) Word64 Source #
interpreterToEpochInfo :: forall (xs :: [Type]). Interpreter xs -> EpochInfo (Except PastHorizonException) Source #
Construct an EpochInfo
for a snapshot of the ledger state
unsafeExtendSafeZone :: forall (xs :: [Type]). Interpreter xs -> Interpreter xs Source #
UNSAFE: extend the safe zone of the current era of the given Interpreter
to be unbounded, ignoring any future hard forks.
This only has effect when the Interpreter
was obtained in an era that was
not the final one (in the final era, this is a no-op). The Interpreter
will be made to believe that the current era is the final era, making its
horizon unbounded, and thus never returning a PastHorizonException
.
Use of this function is strongly discouraged, as it will ignore any future
hard forks, and the results produced by the Interpreter
can thus be
incorrect.
txId :: HasTxId tx => tx -> TxId tx Source #
NOTE: a TxId
must be unique up to ledger rules, i.e., two GenTx
s with
the same TxId
must be the same transaction according to the ledger.
However, we do not assume that a TxId
uniquely determines a GenTx
:
two GenTx
s with the same TxId
can differ in, e.g., witnesses.
Should be cheap as this will be called often.