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

Ouroboros.Consensus.Mock.Ledger.Block.PBFT

Synopsis

Documentation

data SignedSimplePBft c c' Source #

Part of the block that gets signed

We just sign the standard header, i.e., without the PBFT extensions. In particular, the signature does not cover the issuer.

The signature does not cover the body explicitly, but since the standard header includes a hash of the body, the signature covers the body implicitly.

Instances

Instances details
Generic (SignedSimplePBft c c') Source # 
Instance details

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

Associated Types

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

Methods

fromSignedSimplePBft c c' → Rep (SignedSimplePBft c c') x Source #

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

SimpleCrypto c ⇒ Serialise (SignedSimplePBft c c') Source # 
Instance details

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

Methods

encodeSignedSimplePBft c c' → Encoding #

decode ∷ Decoder s (SignedSimplePBft c c') #

encodeList ∷ [SignedSimplePBft c c'] → Encoding #

decodeList ∷ Decoder s [SignedSimplePBft c c'] #

(Typeable c', SimpleCrypto c) ⇒ ToCBOR (SignedSimplePBft c c') Source # 
Instance details

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

Methods

toCBORSignedSimplePBft c c' → Encoding

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

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

SimpleCrypto c ⇒ SignableRepresentation (SignedSimplePBft c c') Source # 
Instance details

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

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

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

type Rep (SignedSimplePBft c c') = D1 ('MetaData "SignedSimplePBft" "Ouroboros.Consensus.Mock.Ledger.Block.PBFT" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SignedSimplePBft" 'PrefixI 'True) (S1 ('MetaSel ('Just "signedSimplePBft") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleStdHeader c (SimplePBftExt c c')))))

type SimplePBftBlock c c' = SimpleBlock c (SimplePBftExt c c') Source #

Simple block extended with the fields required for PBFT

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

newtype SimplePBftExt c c' Source #

Block extension required for PBFT

Constructors

SimplePBftExt 

Instances

Instances details
(SimpleCrypto c, PBftCrypto c') ⇒ MockProtocolSpecific c (SimplePBftExt c c') Source # 
Instance details

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

Associated Types

type MockLedgerConfig c (SimplePBftExt c c') Source #

(SimpleCrypto c, PBftCrypto c', Serialise (PBftVerKeyHash c')) ⇒ RunMockBlock c (SimplePBftExt c c') Source # 
Instance details

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

PBftCrypto c' ⇒ Eq (SimplePBftExt c c') Source # 
Instance details

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

Methods

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

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

PBftCrypto c' ⇒ Show (SimplePBftExt c c') Source # 
Instance details

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

Generic (SimplePBftExt c c') Source # 
Instance details

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

Associated Types

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

Methods

fromSimplePBftExt c c' → Rep (SimplePBftExt c c') x Source #

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

PBftCrypto c' ⇒ Serialise (SimplePBftExt c c') Source # 
Instance details

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

Methods

encodeSimplePBftExt c c' → Encoding #

decode ∷ Decoder s (SimplePBftExt c c') #

encodeList ∷ [SimplePBftExt c c'] → Encoding #

decodeList ∷ Decoder s [SimplePBftExt c c'] #

(SimpleCrypto c, Signable MockDSIGN (SignedSimplePBft c PBftMockCrypto)) ⇒ LedgerSupportsProtocol (SimplePBftBlock c PBftMockCrypto) Source #

The ledger view is constant for the mock instantiation of PBFT (mock blocks cannot change delegation)

Instance details

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

(SimpleCrypto c, Signable MockDSIGN (SignedSimplePBft c PBftMockCrypto)) ⇒ BlockSupportsProtocol (SimplePBftBlock c PBftMockCrypto) Source # 
Instance details

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

PBftCrypto c' ⇒ Condense (SimplePBftExt c c') Source # 
Instance details

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

Methods

condenseSimplePBftExt c c' → String Source #

SignedHeader (SimplePBftHeader c c') Source # 
Instance details

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

(PBftCrypto c', Typeable c) ⇒ NoThunks (SimplePBftExt c c') Source # 
Instance details

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

Methods

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

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

showTypeOfProxy (SimplePBftExt c c') → String #

(Serialise (PBftVerKeyHash c'), PBftCrypto c') ⇒ EncodeDisk (SimplePBftBlock c c') (PBftState c') Source # 
Instance details

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

Methods

encodeDiskCodecConfig (SimplePBftBlock c c') → PBftState c' → Encoding Source #

(Serialise (PBftVerKeyHash c'), PBftCrypto c') ⇒ DecodeDisk (SimplePBftBlock c c') (PBftState c') Source # 
Instance details

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

Methods

decodeDiskCodecConfig (SimplePBftBlock c c') → ∀ s. Decoder s (PBftState c') Source #

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

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

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

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

type Rep (SimplePBftExt c c') = D1 ('MetaData "SimplePBftExt" "Ouroboros.Consensus.Mock.Ledger.Block.PBFT" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "SimplePBftExt" 'PrefixI 'True) (S1 ('MetaSel ('Just "simplePBftExt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PBftFields c' (SignedSimplePBft c c')))))
type CannotForge (SimplePBftBlock c c') Source # 
Instance details

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

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

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

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

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

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

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

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

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

type SimplePBftHeader c c' = SimpleHeader c (SimplePBftExt c c') Source #

Header for PBFT

forgePBftExt ∷ ∀ c c'. (SimpleCrypto c, PBftCrypto c', Signable (PBftDSIGN c') (SignedSimplePBft c c'), ContextDSIGN (PBftDSIGN c') ~ ()) ⇒ ForgeExt c (SimplePBftExt c c') Source #