Safe Haskell | None |
---|---|
Language | Haskell2010 |
Various things common to iterations of the Praos protocol.
Synopsis
- newtype MaxMajorProtVer = MaxMajorProtVer { }
-
data
PraosCanBeLeader
c =
PraosCanBeLeader
{
- praosCanBeLeaderOpCert :: !( OCert c)
- praosCanBeLeaderColdVerKey :: !( VKey ' BlockIssuer c)
- praosCanBeLeaderSignKeyVRF :: !( SignKeyVRF c)
-
data
PraosChainSelectView
c =
PraosChainSelectView
{
- csvChainLength :: BlockNo
- csvSlotNo :: SlotNo
- csvIssuer :: VKey ' BlockIssuer c
- csvIssueNo :: Word64
- csvLeaderVRF :: OutputVRF ( VRF c)
-
data
PraosNonces
=
PraosNonces
{
- candidateNonce :: ! Nonce
- epochNonce :: ! Nonce
- evolvingNonce :: ! Nonce
- labNonce :: ! Nonce
- previousLabNonce :: ! Nonce
-
class
ConsensusProtocol
p =>
PraosProtocolSupportsNode
p
where
- type PraosProtocolSupportsNodeCrypto p
- getPraosNonces :: proxy p -> ChainDepState p -> PraosNonces
- getOpCertCounters :: proxy p -> ChainDepState p -> Map ( KeyHash ' BlockIssuer ( PraosProtocolSupportsNodeCrypto p)) Word64
Documentation
newtype MaxMajorProtVer Source #
The maximum major protocol version.
Must be at least the current major protocol version. For Cardano mainnet, the Shelley era has major protocol verison 2 .
Instances
data PraosCanBeLeader c Source #
PraosCanBeLeader | |
|
Instances
data PraosChainSelectView c Source #
View of the ledger tip for chain selection.
We order between chains as follows:
- By chain length, with longer chains always preferred.
- If the tip of each chain was issued by the same agent, then we prefer the chain whose tip has the highest ocert issue number.
- By the leader value of the chain tip, with lower values preferred.
PraosChainSelectView | |
|
Instances
node support
data PraosNonces Source #
PraosNonces | |
|
class ConsensusProtocol p => PraosProtocolSupportsNode p where 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/input-output-hk/cardano-node/issues/3864
getPraosNonces :: proxy p -> ChainDepState p -> PraosNonces Source #
getOpCertCounters :: proxy p -> ChainDepState p -> Map ( KeyHash ' BlockIssuer ( PraosProtocolSupportsNodeCrypto p)) Word64 Source #
Instances
PraosCrypto c => PraosProtocolSupportsNode ( TPraos c) Source # | |
Defined in Ouroboros.Consensus.Protocol.TPraos type PraosProtocolSupportsNodeCrypto ( TPraos c) Source # getPraosNonces :: proxy ( TPraos c) -> ChainDepState ( TPraos c) -> PraosNonces Source # getOpCertCounters :: proxy ( TPraos c) -> ChainDepState ( TPraos c) -> Map ( KeyHash ' BlockIssuer ( PraosProtocolSupportsNodeCrypto ( TPraos c))) Word64 Source # |
|
PraosCrypto c => PraosProtocolSupportsNode ( Praos c) Source # | |
Defined in Ouroboros.Consensus.Protocol.Praos type PraosProtocolSupportsNodeCrypto ( Praos c) Source # getPraosNonces :: proxy ( Praos c) -> ChainDepState ( Praos c) -> PraosNonces Source # getOpCertCounters :: proxy ( Praos c) -> ChainDepState ( Praos c) -> Map ( KeyHash ' BlockIssuer ( PraosProtocolSupportsNodeCrypto ( Praos c))) Word64 Source # |