ouroboros-consensus-mock-0.1.0.0: Mock ledger integration in the Ouroboros consensus layer
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Mock.Ledger.Block.Praos

Synopsis

Documentation

data SignedSimplePraos c c' Source #

Part of the block that gets signed

TODO: Right now we sign all of the extra Praos fields. This may or may not be needed. https://github.com/input-output-hk/cardano-ledger-specs/issues/530 Of course, this Praos is merely a proof of concept so it doesn't really matter either way; we include them here primarily to show that we can.

Instances

Instances details
(SimpleCrypto c, PraosCrypto c') ⇒ ToCBOR (SignedSimplePraos c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

toCBORSignedSimplePraos c c' → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (SignedSimplePraos c c') → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SignedSimplePraos c c'] → Size

(SimpleCrypto c, PraosCrypto c') ⇒ SignableRepresentation (SignedSimplePraos c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type SimplePraosBlock c c' = SimpleBlock c (SimplePraosExt c c') Source #

Simple block extended with the fields required for Praos

c is crypto used for the block itself c' is crypto used for the consensus protocol

newtype SimplePraosExt c c' Source #

Block extension required for Praos

Constructors

SimplePraosExt 

Instances

Instances details
(SimpleCrypto c, Typeable c') ⇒ MockProtocolSpecific c (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Associated Types

type MockLedgerConfig c (SimplePraosExt c c') Source #

(SimpleCrypto c, PraosCrypto c') ⇒ RunMockBlock c (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

PraosCrypto c' ⇒ Eq (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

(==)SimplePraosExt c c' → SimplePraosExt c c' → Bool Source #

(/=)SimplePraosExt c c' → SimplePraosExt c c' → Bool Source #

PraosCrypto c' ⇒ Show (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Generic (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Associated Types

type Rep (SimplePraosExt c c') ∷ TypeType Source #

Methods

fromSimplePraosExt c c' → Rep (SimplePraosExt c c') x Source #

toRep (SimplePraosExt c c') x → SimplePraosExt c c' Source #

PraosCrypto c' ⇒ Serialise (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

encodeSimplePraosExt c c' → Encoding #

decode ∷ Decoder s (SimplePraosExt c c') #

encodeList ∷ [SimplePraosExt c c'] → Encoding #

decodeList ∷ Decoder s [SimplePraosExt c c'] #

(SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ LedgerSupportsProtocol (SimplePraosBlock c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

(SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ BlockSupportsProtocol (SimpleBlock c (SimplePraosExt c c')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

PraosCrypto c' ⇒ Condense (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

condenseSimplePraosExt c c' → String Source #

PraosCrypto c' ⇒ SignedHeader (SimplePraosHeader c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

(PraosCrypto c', Typeable c) ⇒ NoThunks (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

noThunks ∷ Context → SimplePraosExt c c' → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SimplePraosExt c c' → IO (Maybe ThunkInfo) #

showTypeOfProxy (SimplePraosExt c c') → String #

PraosCrypto c' ⇒ EncodeDisk (SimplePraosBlock c c') (PraosChainDepState c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

encodeDiskCodecConfig (SimplePraosBlock c c') → PraosChainDepState c' → Encoding Source #

PraosCrypto c' ⇒ DecodeDisk (SimplePraosBlock c c') (PraosChainDepState c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

Methods

decodeDiskCodecConfig (SimplePraosBlock c c') → ∀ s. Decoder s (PraosChainDepState c') Source #

type MockLedgerConfig c (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type Rep (SimplePraosExt c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type Rep (SimplePraosExt c c') = D1 ('MetaData "SimplePraosExt" "Ouroboros.Consensus.Mock.Ledger.Block.Praos" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "SimplePraosExt" 'PrefixI 'True) (S1 ('MetaSel ('Just "simplePraosExt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PraosFields c' (SignedSimplePraos c c')))))
type CannotForge (SimplePraosBlock c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type ForgeStateInfo (SimplePraosBlock c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type ForgeStateUpdateError (SimplePraosBlock c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type BlockProtocol (SimplePraosBlock c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type Signed (SimplePraosHeader c c') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos

type SimplePraosHeader c c' = SimpleHeader c (SimplePraosExt c c') Source #

Header for Proas

forgePraosExt ∷ ∀ c c'. (SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ HotKey c' → ForgeExt c (SimplePraosExt c c') Source #