ouroboros-consensus-cardano-0.16.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Protocol.Praos

Documentation

data PraosEnvelopeError Source #

Constructors

ObsoleteNode Version Version

This is a subtle case.

This node is explicitly rejecting the header, but the header isn't necessarily _directly_ at fault.

This rejection specifically happens when the ticked ledger state being used to validate this header contains a protocol major version (the first Version) that exceeds the maximum major protocol version allowed for this era this specific node's configuration (the second Version). The only thing the header did "wrong" was extend such a ledger state.

Note that the ChainSync client ensures that that ledger state is ticked starting from one of the latest k+1 ledger states on the node's current chain (modulo STM scheduling).

For Cardano and for now at least, this max major prot ver is typically hardcoded in the source code (subject only to whether or not the run-time config files enable "experimental" eras).

Hence, most likely, the appropriate rectifying action is for the node operator to update their node software and/or config; hence the name ObsoleteNode. (Or if they're intentionally testing an experimental era, they forgot to set the appropriate config flag.)

TODO Would it be more intuitive to instead enforce this when validating the block that results in a ledger state with a major prot ver that violates the config's limit? Would the errors the user sees be more or less helpful? Etc.

TODO (cont'd) It's not even obviously that specific ledger state's/block's fault, since the protocol version is the consequence of on-chain governance. Is it the voters' fault? Is the fault of the first block that was after the voting deadline? So "extending the ledger state that resulting from ticking after applying the block after the epoch that extended the ancestor block that was after the voting deadline that ..." is merely one step more removed. And this envelopeChecks approach does avoid the surprise (since the rejection doesn't even depend on the block's non-header content either) where the header could be validated but its underlying block could not. See https://github.com/IntersectMBO/ouroboros-consensus/issues/325.

HeaderSizeTooLarge Int Word16 
BlockSizeTooLarge Word32 Word32 

Instances

Instances details
Generic PraosEnvelopeError Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Praos

Associated Types

type Rep PraosEnvelopeErrorTypeType #

Show PraosEnvelopeError Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Praos

Eq PraosEnvelopeError Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Praos

NoThunks PraosEnvelopeError Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Praos

type Rep PraosEnvelopeError Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Praos

Orphan instances

PraosCrypto c ⇒ SignedHeader (Header c) Source # 
Instance details

Methods

headerSignedHeader c → Signed (Header c) Source #

PraosCrypto c ⇒ ProtocolHeaderSupportsEnvelope (Praos c) Source # 
Instance details

Associated Types

type EnvelopeCheckError (Praos c) Source #

PraosCrypto c ⇒ ProtocolHeaderSupportsKES (Praos c) Source # 
Instance details

PraosCrypto c ⇒ ProtocolHeaderSupportsLedger (Praos c) Source # 
Instance details

PraosCrypto c ⇒ ProtocolHeaderSupportsProtocol (Praos c) Source # 
Instance details

Associated Types

type CannotForgeError (Praos c) Source #

PraosCrypto c ⇒ ShelleyProtocol (Praos c) Source # 
Instance details