Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Mock.Node.Abstract
Contents
Synopsis
- data family CodecConfig blk
- class (MockProtocolSpecific c ext, EncodeDisk (SimpleBlock c ext) (ChainDepState (BlockProtocol (SimpleBlock c ext))), DecodeDisk (SimpleBlock c ext) (ChainDepState (BlockProtocol (SimpleBlock c ext)))) ⇒ RunMockBlock c ext where
- mockNetworkMagic ∷ BlockConfig (SimpleBlock c ext) → NetworkMagic
- constructMockNetworkMagic ∷ HasCallStack ⇒ NetworkMagic
Documentation
data family CodecConfig blk Source #
Static configuration required for serialisation and deserialisation of types pertaining to this type of block.
Data family instead of type family to get better type inference.
Instances
Generic (CodecConfig (SimpleBlock c ext)) Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types type Rep (CodecConfig (SimpleBlock c ext)) ∷ Type → Type # Methods from ∷ CodecConfig (SimpleBlock c ext) → Rep (CodecConfig (SimpleBlock c ext)) x # to ∷ Rep (CodecConfig (SimpleBlock c ext)) x → CodecConfig (SimpleBlock c ext) # | |
NoThunks (CodecConfig (SimpleBlock c ext)) Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → CodecConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → CodecConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (CodecConfig (SimpleBlock c ext)) → String Source # | |
type Rep (CodecConfig (SimpleBlock c ext)) Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |
data CodecConfig (SimpleBlock c ext) Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block |
class (MockProtocolSpecific c ext, EncodeDisk (SimpleBlock c ext) (ChainDepState (BlockProtocol (SimpleBlock c ext))), DecodeDisk (SimpleBlock c ext) (ChainDepState (BlockProtocol (SimpleBlock c ext)))) ⇒ RunMockBlock c ext where Source #
Protocol specific functionality required to run consensus with mock blocks
Methods
mockNetworkMagic ∷ BlockConfig (SimpleBlock c ext) → NetworkMagic Source #
Instances
SimpleCrypto c ⇒ RunMockBlock c SimplePraosRuleExt Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule Methods mockNetworkMagic ∷ BlockConfig (SimpleBlock c SimplePraosRuleExt) → NetworkMagic Source # | |
(SimpleCrypto c, BftCrypto c') ⇒ RunMockBlock c (SimpleBftExt c c') Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Methods mockNetworkMagic ∷ BlockConfig (SimpleBlock c (SimpleBftExt c c')) → NetworkMagic Source # | |
(SimpleCrypto c, PBftCrypto c', Serialise (PBftVerKeyHash c')) ⇒ RunMockBlock c (SimplePBftExt c c') Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Methods mockNetworkMagic ∷ BlockConfig (SimpleBlock c (SimplePBftExt c c')) → NetworkMagic Source # | |
(SimpleCrypto c, PraosCrypto c') ⇒ RunMockBlock c (SimplePraosExt c c') Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Methods mockNetworkMagic ∷ BlockConfig (SimpleBlock c (SimplePraosExt c c')) → NetworkMagic Source # |
constructMockNetworkMagic ∷ HasCallStack ⇒ NetworkMagic Source #
Construct protocol magic ID depending on where in the code this is called
The sole purpose of this is to make sure that these mock protocols have different IDs from each other and from regular protocols.
Orphan instances
RunMockBlock c ext ⇒ ConfigSupportsNode (SimpleBlock c ext) Source # | |
Methods getSystemStart ∷ BlockConfig (SimpleBlock c ext) → SystemStart Source # getNetworkMagic ∷ BlockConfig (SimpleBlock c ext) → NetworkMagic Source # |