| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Mock.Ledger.Block
Description
Simple block to go with the mock ledger
None of the definitions in this module depend on, or even refer to, any specific consensus protocols.
Synopsis
- data family BlockQuery ∷ Type → QueryFootprint → Type → Type
- data family Header blk
- type SimpleBlock c ext = SimpleBlock' c ext ext
- data SimpleBlock' c ext ext' = SimpleBlock {
- simpleHeader ∷ Header (SimpleBlock' c ext ext')
- simpleBody ∷ SimpleBody
- data SimpleBody = SimpleBody {}
- type family SimpleHash c
- type SimpleHeader c ext = Header (SimpleBlock c ext)
- data SimpleStdHeader c ext = SimpleStdHeader {}
- countSimpleGenTxs ∷ SimpleBlock c ext → Word64
- matchesSimpleHeader ∷ SimpleCrypto c ⇒ Header (SimpleBlock' c ext ext') → SimpleBlock' c ext ext'' → Bool
- mkSimpleHeader ∷ (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ (ext' → Encoding) → SimpleStdHeader c ext → ext' → Header (SimpleBlock' c ext ext')
- data family BlockConfig blk
- data family CodecConfig blk
- data SimpleLedgerConfig c ext = SimpleLedgerConfig {}
- data family StorageConfig blk
- class (SimpleCrypto c, Typeable ext, Show (MockLedgerConfig c ext), NoThunks (MockLedgerConfig c ext), Serialise (MockLedgerConfig c ext)) ⇒ MockProtocolSpecific c ext where
- type MockLedgerConfig c ext
- data family LedgerState blk (mk ∷ MapKind)
- newtype LedgerTables blk (mk ∷ MapKind) = LedgerTables {
- getLedgerTables ∷ mk (TxIn blk) (TxOut blk)
- data family Ticked (st ∷ k) ∷ k
- genesisSimpleLedgerState ∷ AddrDist → LedgerState (SimpleBlock c ext) ValuesMK
- updateSimpleLedgerState ∷ ∀ c ext (mk1 ∷ MapKind). (SimpleCrypto c, Typeable ext) ⇒ LedgerConfig (SimpleBlock c ext) → SimpleBlock c ext → TickedLedgerState (SimpleBlock c ext) mk1 → Except (MockError (SimpleBlock c ext)) (LedgerState (SimpleBlock c ext) mk1)
- data family GenTx blk
- data family TxId blk
- data family Validated x
- genTxSize ∷ GenTx (SimpleBlock c ext) → ByteSize32
- mkSimpleGenTx ∷ Tx → GenTx (SimpleBlock c ext)
- class (HashAlgorithm (SimpleHash c), Typeable c) ⇒ SimpleCrypto c
- data SimpleMockCrypto
- data SimpleStandardCrypto
- decodeSimpleHeader ∷ (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ (ext' → Encoding) → (∀ s. Decoder s ext') → ∀ s. Decoder s (Header (SimpleBlock' c ext ext'))
- encodeSimpleHeader ∷ (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ (ext' → Encoding) → Header (SimpleBlock' c ext ext') → Encoding
- simpleBlockBinaryBlockInfo ∷ (SimpleCrypto c, Serialise ext', Typeable ext, Typeable ext') ⇒ SimpleBlock' c ext ext' → BinaryBlockInfo
- simpleBlockCapacity ∷ ByteSize32
Documentation
data family BlockQuery ∷ Type → QueryFootprint → Type → Type Source #
Different queries supported by the ledger, indexed by the result type.
Instances
data family Header blk Source #
Instances
type SimpleBlock c ext = SimpleBlock' c ext ext Source #
data SimpleBlock' c ext ext' Source #
Constructors
| SimpleBlock | |
Fields
| |
Instances
| SameDepIndex2 (BlockQuery (SimpleBlock c ext) ∷ QueryFootprint → Type → Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (SimpleBlock c ext) x a → BlockQuery (SimpleBlock c ext) y b → Maybe ('(x, a) :~: '(y, b)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ ReconstructNestedCtxt Header (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods reconstructPrefixLen ∷ proxy (Header (MockBlock ext)) → PrefixLen Source # reconstructNestedCtxt ∷ proxy (Header (MockBlock ext)) → ShortByteString → SizeInBytes → SomeSecond (NestedCtxt Header) (MockBlock ext) Source # | |||||||||||||||||||||
| (Typeable c, Typeable ext, Typeable ext') ⇒ ShowProxy (Header (SimpleBlock' c ext ext') ∷ Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| (Typeable c, Typeable ext) ⇒ ShowProxy (GenTx (SimpleBlock c ext) ∷ Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| (Typeable c, Typeable ext) ⇒ ShowProxy (TxId (GenTx (SimpleBlock c ext)) ∷ Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| Typeable ext ⇒ SerialiseBlockQueryResult (MockBlock ext) BlockQuery Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) fp result → result → Encoding Source # decodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) fp result → ∀ s. Decoder s result Source # | |||||||||||||||||||||
| Typeable ext ⇒ HasNestedContent f (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods unnest ∷ f (SimpleBlock c ext) → DepPair (NestedCtxt f (SimpleBlock c ext)) Source # nest ∷ DepPair (NestedCtxt f (SimpleBlock c ext)) → f (SimpleBlock c ext) Source # | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ ApplyBlock LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SimpleBlock c ext → Ticked LedgerState (SimpleBlock c ext) ValuesMK → Except (LedgerErr LedgerState (SimpleBlock c ext)) (LedgerResult (SimpleBlock c ext) (LedgerState (SimpleBlock c ext) DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SimpleBlock c ext → Ticked LedgerState (SimpleBlock c ext) ValuesMK → Except (LedgerErr LedgerState (SimpleBlock c ext)) (LedgerResult (SimpleBlock c ext) (LedgerState (SimpleBlock c ext) DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SimpleBlock c ext → Ticked LedgerState (SimpleBlock c ext) ValuesMK → LedgerResult (SimpleBlock c ext) (LedgerState (SimpleBlock c ext) DiffMK) Source # | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ IsLedger LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SlotNo → LedgerState (SimpleBlock c ext) EmptyMK → LedgerResult (SimpleBlock c ext) (Ticked LedgerState (SimpleBlock c ext) DiffMK) Source # | |||||||||||||||||||||
| CanUpgradeLedgerTables LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (SimpleBlock c ext) mk1 → LedgerState (SimpleBlock c ext) mk2 → LedgerTables (SimpleBlock c ext) ValuesMK → LedgerTables (SimpleBlock c ext) ValuesMK Source # | |||||||||||||||||||||
| HasLedgerTables LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (SimpleBlock c ext) mk → LedgerTables (SimpleBlock c ext) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (SimpleBlock c ext) any → LedgerTables (SimpleBlock c ext) mk → LedgerState (SimpleBlock c ext) mk Source # | |||||||||||||||||||||
| SerializeTablesWithHint LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encodeTablesWithHint ∷ LedgerState (SimpleBlock c ext) EmptyMK → LedgerTables (SimpleBlock c ext) ValuesMK → Encoding Source # decodeTablesWithHint ∷ LedgerState (SimpleBlock c ext) EmptyMK → Decoder s (LedgerTables (SimpleBlock c ext) ValuesMK) Source # | |||||||||||||||||||||
| Typeable ext ⇒ SameDepIndex (NestedCtxt_ (SimpleBlock c ext) f ∷ Type → Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods sameDepIndex ∷ NestedCtxt_ (SimpleBlock c ext) f a → NestedCtxt_ (SimpleBlock c ext) f b → Maybe (a :~: b) Source # | |||||||||||||||||||||
| TrivialDependency (NestedCtxt_ (SimpleBlock c ext) f ∷ Type → Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods hasSingleIndex ∷ NestedCtxt_ (SimpleBlock c ext) f a → NestedCtxt_ (SimpleBlock c ext) f b → a :~: b Source # indexIsTrivial ∷ NestedCtxt_ (SimpleBlock c ext) f (TrivialIndex (NestedCtxt_ (SimpleBlock c ext) f) ∷ Type) Source # | |||||||||||||||||||||
| IndexedMemPack LedgerState (SimpleBlock c ext) TxOut Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods indexedPackedByteCount ∷ LedgerState (SimpleBlock c ext) EmptyMK → TxOut → Int Source # indexedPackM ∷ LedgerState (SimpleBlock c ext) EmptyMK → TxOut → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState (SimpleBlock c ext) EmptyMK → Unpack s b TxOut Source # indexedTypeName ∷ Proxy TxOut → LedgerState (SimpleBlock c ext) EmptyMK → String Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Typeable ext') ⇒ StandardHash (SimpleBlock' c ext ext' ∷ Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| (Typeable c, Typeable ext, Typeable ext') ⇒ ShowProxy (SimpleBlock' c ext ext' ∷ Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showProxy ∷ Proxy (SimpleBlock' c ext ext') → String # | |||||||||||||||||||||
| (SimpleCrypto c, Eq ext', Typeable ext) ⇒ Eq (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ Header (SimpleBlock' c ext ext') → Header (SimpleBlock' c ext ext') → Bool # (/=) ∷ Header (SimpleBlock' c ext ext') → Header (SimpleBlock' c ext ext') → Bool # | |||||||||||||||||||||
| Eq (Validated (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (/=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # | |||||||||||||||||||||
| Eq (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (/=) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # | |||||||||||||||||||||
| Eq (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (/=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # | |||||||||||||||||||||
| Ord (Validated (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Ordering # (<) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (<=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (>) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (>=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # max ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) # min ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) # | |||||||||||||||||||||
| Ord (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Ordering # (<) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (<=) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (>) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (>=) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # max ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) # min ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) # | |||||||||||||||||||||
| Ord (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Ordering # (<) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (<=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (>) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (>=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # max ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) # min ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) # | |||||||||||||||||||||
| Generic (BlockConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ BlockConfig (SimpleBlock c ext) → Rep (BlockConfig (SimpleBlock c ext)) x # to ∷ Rep (BlockConfig (SimpleBlock c ext)) x → BlockConfig (SimpleBlock c ext) # | |||||||||||||||||||||
| Generic (CodecConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ CodecConfig (SimpleBlock c ext) → Rep (CodecConfig (SimpleBlock c ext)) x # to ∷ Rep (CodecConfig (SimpleBlock c ext)) x → CodecConfig (SimpleBlock c ext) # | |||||||||||||||||||||
| Generic (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Header (SimpleBlock' c ext ext') → Rep (Header (SimpleBlock' c ext ext')) x # to ∷ Rep (Header (SimpleBlock' c ext ext')) x → Header (SimpleBlock' c ext ext') # | |||||||||||||||||||||
| Generic (StorageConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ StorageConfig (SimpleBlock c ext) → Rep (StorageConfig (SimpleBlock c ext)) x # to ∷ Rep (StorageConfig (SimpleBlock c ext)) x → StorageConfig (SimpleBlock c ext) # | |||||||||||||||||||||
| Generic (Validated (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Validated (GenTx (SimpleBlock c ext)) → Rep (Validated (GenTx (SimpleBlock c ext))) x # to ∷ Rep (Validated (GenTx (SimpleBlock c ext))) x → Validated (GenTx (SimpleBlock c ext)) # | |||||||||||||||||||||
| Generic (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ GenTx (SimpleBlock c ext) → Rep (GenTx (SimpleBlock c ext)) x # to ∷ Rep (GenTx (SimpleBlock c ext)) x → GenTx (SimpleBlock c ext) # | |||||||||||||||||||||
| Generic (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ TxId (GenTx (SimpleBlock c ext)) → Rep (TxId (GenTx (SimpleBlock c ext))) x # to ∷ Rep (TxId (GenTx (SimpleBlock c ext))) x → TxId (GenTx (SimpleBlock c ext)) # | |||||||||||||||||||||
| (SimpleCrypto c, Show ext', Typeable ext) ⇒ Show (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| Show (Validated (GenTx (SimpleBlock p c))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| Show (GenTx (SimpleBlock p c)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| Show (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| NoThunks (BlockConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (BlockConfig (SimpleBlock c ext)) → String Source # | |||||||||||||||||||||
| 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 # | |||||||||||||||||||||
| (SimpleCrypto c, NoThunks ext', Typeable ext) ⇒ NoThunks (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
| NoThunks (StorageConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (StorageConfig (SimpleBlock c ext)) → String Source # | |||||||||||||||||||||
| (Typeable p, Typeable c) ⇒ NoThunks (Validated (GenTx (SimpleBlock p c))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| (Typeable p, Typeable c) ⇒ NoThunks (GenTx (SimpleBlock p c)) Source # | |||||||||||||||||||||
| NoThunks (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
| GetTip (LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState (SimpleBlock c ext) mk → Point (LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| HasTxId (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods txId ∷ GenTx (SimpleBlock c ext) → TxId (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| LedgerStateSupportsPeras (LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getPoolDistr ∷ LedgerState (SimpleBlock c ext) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → LedgerState (SimpleBlock c ext) EmptyMK → PerasParams blk Source # | |||||||||||||||||||||
| SimpleCrypto c ⇒ LedgerSupportsProtocol (SimplePraosRuleBlock c) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule Methods protocolLedgerView ∷ ∀ (mk ∷ MapKind). LedgerConfig (SimplePraosRuleBlock c) → Ticked LedgerState (SimplePraosRuleBlock c) mk → LedgerView (BlockProtocol (SimplePraosRuleBlock c)) Source # ledgerViewForecastAt ∷ ∀ (mk ∷ MapKind). HasCallStack ⇒ LedgerConfig (SimplePraosRuleBlock c) → LedgerState (SimplePraosRuleBlock c) mk → Forecast (LedgerView (BlockProtocol (SimplePraosRuleBlock c))) Source # | |||||||||||||||||||||
| CanStowLedgerTables (LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods stowLedgerTables ∷ LedgerState (SimpleBlock c ext) ValuesMK → LedgerState (SimpleBlock c ext) EmptyMK Source # unstowLedgerTables ∷ LedgerState (SimpleBlock c ext) EmptyMK → LedgerState (SimpleBlock c ext) ValuesMK Source # | |||||||||||||||||||||
| HasNetworkProtocolVersion (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Associated Types
| |||||||||||||||||||||
| (Serialise ext, Typeable ext, Serialise (MockLedgerConfig SimpleMockCrypto ext), MockProtocolSpecific SimpleMockCrypto ext) ⇒ SerialiseNodeToClientConstraints (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNodeConstraints (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods estimateBlockSize ∷ Header (MockBlock ext) → SizeInBytes Source # | |||||||||||||||||||||
| (Serialise ext, RunMockBlock SimpleMockCrypto ext) ⇒ SerialiseDiskConstraints (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ HasBinaryBlockInfo (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods getBinaryBlockInfo ∷ MockBlock ext → BinaryBlockInfo Source # | |||||||||||||||||||||
| Condense ext' ⇒ Condense (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| Condense (GenTx (SimpleBlock p c)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| Condense (GenTxId (SimpleBlock p c)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| HasMockTxs (GenTx (SimpleBlock p c)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getMockTxs ∷ GenTx (SimpleBlock p c) → [Tx] Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Typeable ext') ⇒ HasHeader (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getHeaderFields ∷ Header (SimpleBlock' c ext ext') → HeaderFields (Header (SimpleBlock' c ext ext')) # | |||||||||||||||||||||
| HasRawTxId (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods getRawTxId ∷ TxId (GenTx (SimpleBlock c ext)) → RawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||||||||||||||||||
| (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext, Serialise ext') ⇒ Serialise (Header (SimpleBlock' c ext ext')) Source # | Custom | ||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ Header (SimpleBlock' c ext ext') → Encoding Source # decode ∷ Decoder s (Header (SimpleBlock' c ext ext')) Source # encodeList ∷ [Header (SimpleBlock' c ext ext')] → Encoding Source # decodeList ∷ Decoder s [Header (SimpleBlock' c ext ext')] Source # | |||||||||||||||||||||
| Serialise (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ GenTx (SimpleBlock c ext) → Encoding Source # decode ∷ Decoder s (GenTx (SimpleBlock c ext)) Source # encodeList ∷ [GenTx (SimpleBlock c ext)] → Encoding Source # decodeList ∷ Decoder s [GenTx (SimpleBlock c ext)] Source # | |||||||||||||||||||||
| Serialise (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ TxId (GenTx (SimpleBlock c ext)) → Encoding Source # decode ∷ Decoder s (TxId (GenTx (SimpleBlock c ext))) Source # encodeList ∷ [TxId (GenTx (SimpleBlock c ext))] → Encoding Source # decodeList ∷ Decoder s [TxId (GenTx (SimpleBlock c ext))] Source # | |||||||||||||||||||||
| SerialiseNodeToClient (MockBlock ext) SlotNo Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → SlotNo → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s SlotNo Source # | |||||||||||||||||||||
| DecodeDisk (SimplePraosRuleBlock c) () Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule Methods decodeDisk ∷ CodecConfig (SimplePraosRuleBlock c) → ∀ s. Decoder s () Source # | |||||||||||||||||||||
| EncodeDisk (SimplePraosRuleBlock c) () Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule Methods encodeDisk ∷ CodecConfig (SimplePraosRuleBlock c) → () → Encoding Source # | |||||||||||||||||||||
| SerialiseNodeToClient (MockBlock ext) (SomeBlockQuery (BlockQuery (MockBlock ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → SomeBlockQuery (BlockQuery (MockBlock ext)) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (SomeBlockQuery (BlockQuery (MockBlock ext))) Source # | |||||||||||||||||||||
| SerialiseNodeToClient (MockBlock ext) (GenTx (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTx (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTx (MockBlock ext)) Source # | |||||||||||||||||||||
| SerialiseNodeToClient (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||||||||||||||||||
| Typeable ext ⇒ SerialiseNodeToClient (MockBlock ext) (MockError (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → MockError (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (MockError (MockBlock ext)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToClient (MockBlock ext) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → MockBlock ext → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (MockBlock ext) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNode (MockBlock ext) (Header (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → Header (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (Header (MockBlock ext)) Source # | |||||||||||||||||||||
| SerialiseNodeToNode (MockBlock ext) (GenTx (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTx (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTx (MockBlock ext)) Source # | |||||||||||||||||||||
| SerialiseNodeToNode (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNode (MockBlock ext) (SerialisedHeader (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → SerialisedHeader (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (SerialisedHeader (MockBlock ext)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNode (MockBlock ext) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → MockBlock ext → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (MockBlock ext) Source # | |||||||||||||||||||||
| Typeable ext ⇒ DecodeDisk (MockBlock ext) (AnnTip (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (AnnTip (MockBlock ext)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDiskDep ∷ CodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → ∀ s. Decoder s (ByteString → a) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDiskDepIx ∷ CodecConfig (MockBlock ext) → Decoder s (SomeSecond (NestedCtxt Header) (MockBlock ext)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDisk (MockBlock ext) (Header (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → Header (MockBlock ext) → Encoding Source # | |||||||||||||||||||||
| Typeable ext ⇒ EncodeDisk (MockBlock ext) (AnnTip (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → AnnTip (MockBlock ext) → Encoding Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDisk (MockBlock ext) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → MockBlock ext → Encoding Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDiskDep ∷ CodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → a → Encoding Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDiskDepIx ∷ CodecConfig (MockBlock ext) → SomeSecond (NestedCtxt Header) (MockBlock ext) → Encoding Source # | |||||||||||||||||||||
| SerialiseNodeToClient (MockBlock ext) (Serialised (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → Serialised (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (Serialised (MockBlock ext)) Source # | |||||||||||||||||||||
| SerialiseNodeToNode (MockBlock ext) (Serialised (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → Serialised (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (Serialised (MockBlock ext)) Source # | |||||||||||||||||||||
| Typeable ext ⇒ DecodeDisk (MockBlock ext) (LedgerState (MockBlock ext) EmptyMK) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (LedgerState (MockBlock ext) EmptyMK) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDisk (MockBlock ext) (ByteString → Either DecoderError (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteString → Either DecoderError (MockBlock ext)) Source # | |||||||||||||||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDisk (MockBlock ext) (ByteString → Header (MockBlock ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteString → Header (MockBlock ext)) Source # | |||||||||||||||||||||
| Typeable ext ⇒ EncodeDisk (MockBlock ext) (LedgerState (MockBlock ext) EmptyMK) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → LedgerState (MockBlock ext) EmptyMK → Encoding Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Eq (mk TxIn TxOut)) ⇒ Eq (LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ LedgerState (SimpleBlock c ext) mk → LedgerState (SimpleBlock c ext) mk → Bool # (/=) ∷ LedgerState (SimpleBlock c ext) mk → LedgerState (SimpleBlock c ext) mk → Bool # | |||||||||||||||||||||
| Generic (LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ LedgerState (SimpleBlock c ext) mk → Rep (LedgerState (SimpleBlock c ext) mk) x # to ∷ Rep (LedgerState (SimpleBlock c ext) mk) x → LedgerState (SimpleBlock c ext) mk # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Show (mk TxIn TxOut)) ⇒ Show (LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → LedgerState (SimpleBlock c ext) mk → ShowS # show ∷ LedgerState (SimpleBlock c ext) mk → String # showList ∷ [LedgerState (SimpleBlock c ext) mk] → ShowS # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, NoThunks (mk TxIn TxOut)) ⇒ NoThunks (LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → LedgerState (SimpleBlock c ext) mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → LedgerState (SimpleBlock c ext) mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (LedgerState (SimpleBlock c ext) mk) → String Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ GetPrevHash (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods headerPrevHash ∷ Header (SimpleBlock c ext) → ChainHash (SimpleBlock c ext) Source # | |||||||||||||||||||||
| (BlockSupportsProtocol (SimpleBlock c ext), Show (TiebreakerView (BlockProtocol (SimpleBlock c ext)))) ⇒ BlockSupportsDiffusionPipelining (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node Associated Types
Methods initialTentativeHeaderState ∷ Proxy (SimpleBlock c ext) → TentativeHeaderState (SimpleBlock c ext) Source # tentativeHeaderView ∷ BlockConfig (SimpleBlock c ext) → Header (SimpleBlock c ext) → TentativeHeaderView (SimpleBlock c ext) Source # applyTentativeHeaderView ∷ Proxy (SimpleBlock c ext) → TentativeHeaderView (SimpleBlock c ext) → TentativeHeaderState (SimpleBlock c ext) → Maybe (TentativeHeaderState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| BlockSupportsMetrics (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node Methods isSelfIssued ∷ BlockConfig (SimpleBlock c ext) → Header (SimpleBlock c ext) → WhetherSelfIssued Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ BlockSupportsPeras (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras Associated Types
Methods forgePerasVoteIfEligible ∷ PerasEpochContext (SimpleBlock c ext) → PoolId → PrivateKey (PerasCrypto (SimpleBlock c ext)) → PerasRoundNo → Point (SimpleBlock c ext) → Either (PerasError (SimpleBlock c ext)) (Maybe (ValidatedPerasVote (SimpleBlock c ext))) Source # verifyPerasVote ∷ PerasEpochContext (SimpleBlock c ext) → PerasVote (SimpleBlock c ext) → Either (PerasError (SimpleBlock c ext)) (ValidatedPerasVote (SimpleBlock c ext)) Source # forgePerasCert ∷ PerasEpochContext (SimpleBlock c ext) → PerasVoteCollectionWithQuorum (SimpleBlock c ext) → Either (PerasError (SimpleBlock c ext)) (ValidatedPerasCert (SimpleBlock c ext)) Source # verifyPerasCert ∷ PerasEpochContext (SimpleBlock c ext) → PerasCert (SimpleBlock c ext) → Either (PerasError (SimpleBlock c ext)) (ValidatedPerasCert (SimpleBlock c ext)) Source # getPerasCertInBlock ∷ SimpleBlock c ext → Either (PerasError (SimpleBlock c ext)) (Maybe (PerasCert (SimpleBlock c ext))) Source # | |||||||||||||||||||||
| (SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ BlockSupportsProtocol (SimpleBlock c (SimplePraosExt c c')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Methods validateView ∷ BlockConfig (SimpleBlock c (SimplePraosExt c c')) → Header (SimpleBlock c (SimplePraosExt c c')) → ValidateView (BlockProtocol (SimpleBlock c (SimplePraosExt c c'))) Source # tiebreakerView ∷ BlockConfig (SimpleBlock c (SimplePraosExt c c')) → Header (SimpleBlock c (SimplePraosExt c c')) → TiebreakerView (BlockProtocol (SimpleBlock c (SimplePraosExt c c'))) Source # projectChainOrderConfig ∷ BlockConfig (SimpleBlock c (SimplePraosExt c c')) → ChainOrderConfig (SelectView (BlockProtocol (SimpleBlock c (SimplePraosExt c c')))) Source # | |||||||||||||||||||||
| SimpleCrypto c ⇒ BlockSupportsProtocol (SimpleBlock c SimplePraosRuleExt) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule Methods validateView ∷ BlockConfig (SimpleBlock c SimplePraosRuleExt) → Header (SimpleBlock c SimplePraosRuleExt) → ValidateView (BlockProtocol (SimpleBlock c SimplePraosRuleExt)) Source # tiebreakerView ∷ BlockConfig (SimpleBlock c SimplePraosRuleExt) → Header (SimpleBlock c SimplePraosRuleExt) → TiebreakerView (BlockProtocol (SimpleBlock c SimplePraosRuleExt)) Source # projectChainOrderConfig ∷ BlockConfig (SimpleBlock c SimplePraosRuleExt) → ChainOrderConfig (SelectView (BlockProtocol (SimpleBlock c SimplePraosRuleExt))) Source # | |||||||||||||||||||||
| (SimpleCrypto c, BftCrypto c', Signable (BftDSIGN c') (SignedSimpleBft c c')) ⇒ BlockSupportsProtocol (SimpleBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Methods validateView ∷ BlockConfig (SimpleBftBlock c c') → Header (SimpleBftBlock c c') → ValidateView (BlockProtocol (SimpleBftBlock c c')) Source # tiebreakerView ∷ BlockConfig (SimpleBftBlock c c') → Header (SimpleBftBlock c c') → TiebreakerView (BlockProtocol (SimpleBftBlock c c')) Source # projectChainOrderConfig ∷ BlockConfig (SimpleBftBlock c c') → ChainOrderConfig (SelectView (BlockProtocol (SimpleBftBlock c c'))) Source # | |||||||||||||||||||||
| (SimpleCrypto c, Signable MockDSIGN (SignedSimplePBft c PBftMockCrypto)) ⇒ BlockSupportsProtocol (SimplePBftBlock c PBftMockCrypto) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Methods validateView ∷ BlockConfig (SimplePBftBlock c PBftMockCrypto) → Header (SimplePBftBlock c PBftMockCrypto) → ValidateView (BlockProtocol (SimplePBftBlock c PBftMockCrypto)) Source # tiebreakerView ∷ BlockConfig (SimplePBftBlock c PBftMockCrypto) → Header (SimplePBftBlock c PBftMockCrypto) → TiebreakerView (BlockProtocol (SimplePBftBlock c PBftMockCrypto)) Source # projectChainOrderConfig ∷ BlockConfig (SimplePBftBlock c PBftMockCrypto) → ChainOrderConfig (SelectView (BlockProtocol (SimplePBftBlock c PBftMockCrypto))) Source # | |||||||||||||||||||||
| ConsensusProtocol (BlockProtocol (SimpleBlock c ext)) ⇒ BlockSupportsSanityCheck (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node Methods configAllSecurityParams ∷ TopLevelConfig (SimpleBlock c ext) → NonEmpty SecurityParam Source # | |||||||||||||||||||||
| RunMockBlock c ext ⇒ ConfigSupportsNode (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Abstract Methods getSystemStart ∷ BlockConfig (SimpleBlock c ext) → SystemStart Source # getNetworkMagic ∷ BlockConfig (SimpleBlock c ext) → NetworkMagic Source # | |||||||||||||||||||||
| HasHardForkHistory (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods hardForkSummary ∷ ∀ (mk ∷ MapKind). LedgerConfig (SimpleBlock c ext) → LedgerState (SimpleBlock c ext) mk → Summary (HardForkIndices (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ HasPartialLedgerConfig (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods completeLedgerConfig ∷ proxy (SimpleBlock c ext) → EpochInfo (Except PastHorizonException) → PartialLedgerConfig (SimpleBlock c ext) → LedgerConfig (SimpleBlock c ext) Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ BasicEnvelopeValidation (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods expectedFirstBlockNo ∷ proxy (SimpleBlock c ext) → BlockNo Source # expectedNextBlockNo ∷ proxy (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) → BlockNo → BlockNo Source # minimumPossibleSlotNo ∷ Proxy (SimpleBlock c ext) → SlotNo Source # minimumNextSlotNo ∷ proxy (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) → SlotNo → SlotNo Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ HasAnnTip (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods getTipInfo ∷ Header (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) Source # tipInfoHash ∷ proxy (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) → HeaderHash (SimpleBlock c ext) Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ ValidateEnvelope (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods additionalEnvelopeChecks ∷ TopLevelConfig (SimpleBlock c ext) → LedgerView (BlockProtocol (SimpleBlock c ext)) → Header (SimpleBlock c ext) → Except (OtherHeaderEnvelopeError (SimpleBlock c ext)) () Source # | |||||||||||||||||||||
| GetBlockKeySets (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getBlockKeySets ∷ SimpleBlock c ext → LedgerTables (SimpleBlock c ext) KeysMK Source # | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ UpdateLedger (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ CommonProtocolParams (SimpleBlock c ext) Source # | Dummy values | ||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods maxHeaderSize ∷ ∀ (mk ∷ MapKind). LedgerState (SimpleBlock c ext) mk → Word32 Source # maxTxSize ∷ ∀ (mk ∷ MapKind). LedgerState (SimpleBlock c ext) mk → Word32 Source # | |||||||||||||||||||||
| InspectLedger (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods inspectLedger ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). TopLevelConfig (SimpleBlock c ext) → LedgerState (SimpleBlock c ext) mk1 → LedgerState (SimpleBlock c ext) mk2 → [LedgerEvent (SimpleBlock c ext)] Source # | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ BlockSupportsLedgerQuery (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods answerPureBlockQuery ∷ ExtLedgerCfg (SimpleBlock c ext) → BlockQuery (SimpleBlock c ext) 'QFNoTables result → ExtLedgerState (SimpleBlock c ext) EmptyMK → result Source # answerBlockQueryLookup ∷ MonadSTM m ⇒ ExtLedgerCfg (SimpleBlock c ext) → BlockQuery (SimpleBlock c ext) 'QFLookupTables result → ReadOnlyForker' m (SimpleBlock c ext) → m result Source # answerBlockQueryTraverse ∷ MonadSTM m ⇒ ExtLedgerCfg (SimpleBlock c ext) → BlockQuery (SimpleBlock c ext) 'QFTraverseTables result → ReadOnlyForker' m (SimpleBlock c ext) → m result Source # blockQueryIsSupportedOnVersion ∷ ∀ (fp ∷ QueryFootprint) result. BlockQuery (SimpleBlock c ext) fp result → BlockNodeToClientVersion (SimpleBlock c ext) → Bool Source # | |||||||||||||||||||||
| HasTxs (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods extractTxs ∷ SimpleBlock c ext → [GenTx (SimpleBlock c ext)] Source # | |||||||||||||||||||||
| MockProtocolSpecific c ext ⇒ LedgerSupportsMempool (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods txInvariant ∷ GenTx (SimpleBlock c ext) → Bool Source # applyTx ∷ LedgerConfig (SimpleBlock c ext) → WhetherToIntervene → SlotNo → GenTx (SimpleBlock c ext) → TickedLedgerState (SimpleBlock c ext) ValuesMK → Except (ApplyTxErr (SimpleBlock c ext)) (TickedLedgerState (SimpleBlock c ext) DiffMK, Validated (GenTx (SimpleBlock c ext))) Source # reapplyTx ∷ LedgerConfig (SimpleBlock c ext) → SlotNo → Validated (GenTx (SimpleBlock c ext)) → TickedLedgerState (SimpleBlock c ext) ValuesMK → Except (ApplyTxErr (SimpleBlock c ext)) (TickedLedgerState (SimpleBlock c ext) ValuesMK) Source # reapplyTxs ∷ ∀ (wtd ∷ WhatToDoWithTxDiffs) extra. LedgerConfig (SimpleBlock c ext) → SlotNo → [(Validated (GenTx (SimpleBlock c ext)), InputTxDiffs (SimpleBlock c ext) wtd, extra)] → TickedLedgerState (SimpleBlock c ext) ValuesMK → ReapplyTxsResult extra (SimpleBlock c ext) wtd Source # txForgetValidated ∷ Validated (GenTx (SimpleBlock c ext)) → GenTx (SimpleBlock c ext) Source # getTransactionKeySets ∷ GenTx (SimpleBlock c ext) → LedgerTables (SimpleBlock c ext) KeysMK Source # prependMempoolDiffs ∷ TickedLedgerState (SimpleBlock c ext) DiffMK → TickedLedgerState (SimpleBlock c ext) DiffMK → TickedLedgerState (SimpleBlock c ext) DiffMK Source # applyMempoolDiffs ∷ LedgerTables (SimpleBlock c ext) ValuesMK → LedgerTables (SimpleBlock c ext) KeysMK → TickedLedgerState (SimpleBlock c ext) DiffMK → TickedLedgerState (SimpleBlock c ext) ValuesMK Source # mkMempoolApplyTxError ∷ ∀ (mk ∷ MapKind). TickedLedgerState (SimpleBlock c ext) mk → Text → Maybe (ApplyTxErr (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| TxLimits (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods txWireSize ∷ GenTx (SimpleBlock c ext) → SizeInBytes Source # txMeasurePhase1 ∷ LedgerConfig (SimpleBlock c ext) → TickedLedgerState (SimpleBlock c ext) EmptyMK → GenTx (SimpleBlock c ext) → Except (ApplyTxErr (SimpleBlock c ext)) (TxMeasurePhase1 (SimpleBlock c ext)) Source # txMeasurePhase2 ∷ LedgerConfig (SimpleBlock c ext) → TickedLedgerState (SimpleBlock c ext) ValuesMK → GenTx (SimpleBlock c ext) → Except (ApplyTxErr (SimpleBlock c ext)) (TxMeasurePhase2 (SimpleBlock c ext)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (SimpleBlock c ext) → TickedLedgerState (SimpleBlock c ext) mk → TxMeasure (SimpleBlock c ext) Source # | |||||||||||||||||||||
| LedgerSupportsPeerSelection (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getPeers ∷ ∀ (mk ∷ MapKind). LedgerState (SimpleBlock c ext) mk → [(PoolStake, NonEmpty StakePoolRelay)] Source # | |||||||||||||||||||||
| (SimpleCrypto c, BftCrypto c', Signable (BftDSIGN c') (SignedSimpleBft c c')) ⇒ LedgerSupportsProtocol (SimpleBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Methods protocolLedgerView ∷ ∀ (mk ∷ MapKind). LedgerConfig (SimpleBftBlock c c') → Ticked LedgerState (SimpleBftBlock c c') mk → LedgerView (BlockProtocol (SimpleBftBlock c c')) Source # ledgerViewForecastAt ∷ ∀ (mk ∷ MapKind). HasCallStack ⇒ LedgerConfig (SimpleBftBlock c c') → LedgerState (SimpleBftBlock c c') mk → Forecast (LedgerView (BlockProtocol (SimpleBftBlock c c'))) Source # | |||||||||||||||||||||
| (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) | ||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Methods protocolLedgerView ∷ ∀ (mk ∷ MapKind). LedgerConfig (SimplePBftBlock c PBftMockCrypto) → Ticked LedgerState (SimplePBftBlock c PBftMockCrypto) mk → LedgerView (BlockProtocol (SimplePBftBlock c PBftMockCrypto)) Source # ledgerViewForecastAt ∷ ∀ (mk ∷ MapKind). HasCallStack ⇒ LedgerConfig (SimplePBftBlock c PBftMockCrypto) → LedgerState (SimplePBftBlock c PBftMockCrypto) mk → Forecast (LedgerView (BlockProtocol (SimplePBftBlock c PBftMockCrypto))) Source # | |||||||||||||||||||||
| (SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ LedgerSupportsProtocol (SimplePraosBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Methods protocolLedgerView ∷ ∀ (mk ∷ MapKind). LedgerConfig (SimplePraosBlock c c') → Ticked LedgerState (SimplePraosBlock c c') mk → LedgerView (BlockProtocol (SimplePraosBlock c c')) Source # ledgerViewForecastAt ∷ ∀ (mk ∷ MapKind). HasCallStack ⇒ LedgerConfig (SimplePraosBlock c c') → LedgerState (SimplePraosBlock c c') mk → Forecast (LedgerView (BlockProtocol (SimplePraosBlock c c'))) Source # | |||||||||||||||||||||
| NodeInitStorage (SimpleBlock SimpleMockCrypto ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node Methods nodeImmutableDbChunkInfo ∷ StorageConfig (SimpleBlock SimpleMockCrypto ext) → ChunkInfo Source # nodeCheckIntegrity ∷ StorageConfig (SimpleBlock SimpleMockCrypto ext) → SimpleBlock SimpleMockCrypto ext → Bool Source # nodeInitChainDB ∷ IOLike m ⇒ StorageConfig (SimpleBlock SimpleMockCrypto ext) → InitChainDB m (SimpleBlock SimpleMockCrypto ext) → m () Source # | |||||||||||||||||||||
| SupportedNetworkProtocolVersion (SimpleBlock SimpleMockCrypto ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node Methods supportedNodeToNodeVersions ∷ Proxy (SimpleBlock SimpleMockCrypto ext) → Map NodeToNodeVersion (BlockNodeToNodeVersion (SimpleBlock SimpleMockCrypto ext)) Source # supportedNodeToClientVersions ∷ Proxy (SimpleBlock SimpleMockCrypto ext) → Map NodeToClientVersion (BlockNodeToClientVersion (SimpleBlock SimpleMockCrypto ext)) Source # latestReleasedNodeVersion ∷ Proxy (SimpleBlock SimpleMockCrypto ext) → (Maybe NodeToNodeVersion, Maybe NodeToClientVersion) Source # | |||||||||||||||||||||
| (LedgerSupportsProtocol (SimpleBlock SimpleMockCrypto ext), Show (CannotForge (SimpleBlock SimpleMockCrypto ext)), Show (ForgeStateInfo (SimpleBlock SimpleMockCrypto ext)), Show (ForgeStateUpdateError (SimpleBlock SimpleMockCrypto ext)), Serialise ext, RunMockBlock SimpleMockCrypto ext, ChainDepStateSupportsPeras (ChainDepState (BlockProtocol (SimpleBlock SimpleMockCrypto ext))), ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol (SimpleBlock SimpleMockCrypto ext))))) ⇒ RunNode (SimpleBlock SimpleMockCrypto ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, ChainDepStateSupportsPeras (ChainDepState (BlockProtocol (SimpleBlock c ext))), ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol (SimpleBlock c ext))))) ⇒ StateSupportsPerasEpochContext (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras Associated Types
Methods fromMaybeEraIndexedEpochToPerasRoundInfo ∷ proxy (SimpleBlock c ext) → MaybeEraIndexedEpochToPerasRoundInfo (SimpleBlock c ext) → EpochToPerasRoundInfo Source # toMaybeEraIndexedEpochToPerasRoundInfo ∷ All (Top ∷ Type → Constraint) (HardForkIndices (SimpleBlock c ext)) ⇒ proxy (SimpleBlock c ext) → EraIndexed (HardForkIndices (SimpleBlock c ext)) EpochToPerasRoundInfo → MaybeEraIndexedEpochToPerasRoundInfo (SimpleBlock c ext) Source # mkBoundedPerasEpochContext ∷ (LedgerStateSupportsPeras ledgerState, ChainDepStateSupportsPeras chainDepState) ⇒ MaybeEraIndexedEpochToPerasRoundInfo (SimpleBlock c ext) → ledgerState EmptyMK → chainDepState → Either (PerasError (SimpleBlock c ext)) (BoundedPerasEpochContext (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| SignedHeader (SimpleBftHeader c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Methods headerSigned ∷ SimpleBftHeader c c' → Signed (SimpleBftHeader c c') Source # | |||||||||||||||||||||
| SignedHeader (SimplePBftHeader c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Methods headerSigned ∷ SimplePBftHeader c c' → Signed (SimplePBftHeader c c') Source # | |||||||||||||||||||||
| PraosCrypto c' ⇒ SignedHeader (SimplePraosHeader c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Methods headerSigned ∷ SimplePraosHeader c c' → Signed (SimplePraosHeader c c') Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ ShowQuery (BlockQuery (SimpleBlock c ext) fp) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showResult ∷ BlockQuery (SimpleBlock c ext) fp result → result → String # | |||||||||||||||||||||
| DecodeDisk (SimpleBftBlock c c') () Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Methods decodeDisk ∷ CodecConfig (SimpleBftBlock c c') → ∀ s. Decoder s () Source # | |||||||||||||||||||||
| EncodeDisk (SimpleBftBlock c c') () Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Methods encodeDisk ∷ CodecConfig (SimpleBftBlock c c') → () → Encoding Source # | |||||||||||||||||||||
| PBftCrypto c' ⇒ DecodeDisk (SimplePBftBlock c c') (PBftState c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Methods decodeDisk ∷ CodecConfig (SimplePBftBlock c c') → ∀ s. Decoder s (PBftState c') Source # | |||||||||||||||||||||
| PraosCrypto c' ⇒ DecodeDisk (SimplePraosBlock c c') (PraosChainDepState c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Methods decodeDisk ∷ CodecConfig (SimplePraosBlock c c') → ∀ s. Decoder s (PraosChainDepState c') Source # | |||||||||||||||||||||
| PBftCrypto c' ⇒ EncodeDisk (SimplePBftBlock c c') (PBftState c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Methods encodeDisk ∷ CodecConfig (SimplePBftBlock c c') → PBftState c' → Encoding Source # | |||||||||||||||||||||
| PraosCrypto c' ⇒ EncodeDisk (SimplePraosBlock c c') (PraosChainDepState c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Methods encodeDisk ∷ CodecConfig (SimplePraosBlock c c') → PraosChainDepState c' → Encoding Source # | |||||||||||||||||||||
| (Typeable c, Typeable ext) ⇒ ShowProxy (BlockQuery (SimpleBlock c ext) ∷ QueryFootprint → Type → Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showProxy ∷ Proxy (BlockQuery (SimpleBlock c ext)) → String # | |||||||||||||||||||||
| HasLedgerTables (Ticked LedgerState) (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (SimpleBlock c ext) mk → LedgerTables (SimpleBlock c ext) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (SimpleBlock c ext) any → LedgerTables (SimpleBlock c ext) mk → Ticked LedgerState (SimpleBlock c ext) mk Source # | |||||||||||||||||||||
| Serialise (MockLedgerConfig c ext) ⇒ SerialiseNodeToClient (SimpleBlock c ext) (SimpleLedgerConfig c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encodeNodeToClient ∷ CodecConfig (SimpleBlock c ext) → BlockNodeToClientVersion (SimpleBlock c ext) → SimpleLedgerConfig c ext → Encoding Source # decodeNodeToClient ∷ CodecConfig (SimpleBlock c ext) → BlockNodeToClientVersion (SimpleBlock c ext) → ∀ s. Decoder s (SimpleLedgerConfig c ext) Source # | |||||||||||||||||||||
| (SimpleCrypto c, Eq ext', Typeable ext) ⇒ Eq (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ SimpleBlock' c ext ext' → SimpleBlock' c ext ext' → Bool # (/=) ∷ SimpleBlock' c ext ext' → SimpleBlock' c ext ext' → Bool # | |||||||||||||||||||||
| Generic (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ SimpleBlock' c ext ext' → Rep (SimpleBlock' c ext ext') x # to ∷ Rep (SimpleBlock' c ext ext') x → SimpleBlock' c ext ext' # | |||||||||||||||||||||
| Show (NestedCtxt_ (SimpleBlock c ext) f a) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods showsPrec ∷ Int → NestedCtxt_ (SimpleBlock c ext) f a → ShowS # show ∷ NestedCtxt_ (SimpleBlock c ext) f a → String # showList ∷ [NestedCtxt_ (SimpleBlock c ext) f a] → ShowS # | |||||||||||||||||||||
| Show (BlockQuery (SimpleBlock c ext) fp result) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → BlockQuery (SimpleBlock c ext) fp result → ShowS # show ∷ BlockQuery (SimpleBlock c ext) fp result → String # showList ∷ [BlockQuery (SimpleBlock c ext) fp result] → ShowS # | |||||||||||||||||||||
| (SimpleCrypto c, Show ext', Typeable ext) ⇒ Show (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → SimpleBlock' c ext ext' → ShowS # show ∷ SimpleBlock' c ext ext' → String # showList ∷ [SimpleBlock' c ext ext'] → ShowS # | |||||||||||||||||||||
| (KnownNat (HashSize (SimpleHash c)), SimpleCrypto c) ⇒ ConvertRawHash (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods toRawHash ∷ proxy (SimpleBlock' c ext ext') → HeaderHash (SimpleBlock' c ext ext') → ByteString Source # toShortRawHash ∷ proxy (SimpleBlock' c ext ext') → HeaderHash (SimpleBlock' c ext ext') → ShortByteString Source # fromRawHash ∷ proxy (SimpleBlock' c ext ext') → ByteString → Maybe (HeaderHash (SimpleBlock' c ext ext')) Source # fromShortRawHash ∷ proxy (SimpleBlock' c ext ext') → ShortByteString → Maybe (HeaderHash (SimpleBlock' c ext ext')) Source # unsafeFromRawHash ∷ proxy (SimpleBlock' c ext ext') → ByteString → HeaderHash (SimpleBlock' c ext ext') Source # unsafeFromShortRawHash ∷ proxy (SimpleBlock' c ext ext') → ShortByteString → HeaderHash (SimpleBlock' c ext ext') Source # hashSize ∷ proxy (SimpleBlock' c ext ext') → Word32 Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Typeable ext') ⇒ GetHeader (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getHeader ∷ SimpleBlock' c ext ext' → Header (SimpleBlock' c ext ext') Source # blockMatchesHeader ∷ Header (SimpleBlock' c ext ext') → SimpleBlock' c ext ext' → Bool Source # headerIsEBB ∷ Header (SimpleBlock' c ext ext') → Maybe EpochNo Source # | |||||||||||||||||||||
| GetTip (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (SimpleBlock c ext) mk → Point (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
| LedgerStateSupportsPeras (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getPoolDistr ∷ Ticked LedgerState (SimpleBlock c ext) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (SimpleBlock c ext) EmptyMK → PerasParams blk Source # | |||||||||||||||||||||
| CanStowLedgerTables (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods stowLedgerTables ∷ Ticked LedgerState (SimpleBlock c ext) ValuesMK → Ticked LedgerState (SimpleBlock c ext) EmptyMK Source # unstowLedgerTables ∷ Ticked LedgerState (SimpleBlock c ext) EmptyMK → Ticked LedgerState (SimpleBlock c ext) ValuesMK Source # | |||||||||||||||||||||
| Condense ext' ⇒ Condense (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods condense ∷ SimpleBlock' c ext ext' → String Source # | |||||||||||||||||||||
| HasMockTxs (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getMockTxs ∷ SimpleBlock' c ext ext' → [Tx] Source # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Typeable ext') ⇒ HasHeader (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getHeaderFields ∷ SimpleBlock' c ext ext' → HeaderFields (SimpleBlock' c ext ext') # | |||||||||||||||||||||
| (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext, Serialise ext') ⇒ Serialise (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ SimpleBlock' c ext ext' → Encoding Source # decode ∷ Decoder s (SimpleBlock' c ext ext') Source # encodeList ∷ [SimpleBlock' c ext ext'] → Encoding Source # decodeList ∷ Decoder s [SimpleBlock' c ext ext'] Source # | |||||||||||||||||||||
| Generic (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Ticked LedgerState (SimpleBlock c ext) mk → Rep (Ticked LedgerState (SimpleBlock c ext) mk) x # to ∷ Rep (Ticked LedgerState (SimpleBlock c ext) mk) x → Ticked LedgerState (SimpleBlock c ext) mk # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext, Show (LedgerState (SimpleBlock c ext) mk)) ⇒ Show (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → Ticked LedgerState (SimpleBlock c ext) mk → ShowS # show ∷ Ticked LedgerState (SimpleBlock c ext) mk → String # showList ∷ [Ticked LedgerState (SimpleBlock c ext) mk] → ShowS # | |||||||||||||||||||||
| (SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked LedgerState (SimpleBlock c ext) TrackingMK) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → Ticked LedgerState (SimpleBlock c ext) TrackingMK → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → Ticked LedgerState (SimpleBlock c ext) TrackingMK → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (Ticked LedgerState (SimpleBlock c ext) TrackingMK) → String Source # | |||||||||||||||||||||
| type TrivialIndex (NestedCtxt_ (SimpleBlock c ext) f ∷ Type → Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||||||||||||||
| type LedgerCfg LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type LedgerErr LedgerState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type HeaderHash (SimpleBlock' c ext ext' ∷ Type) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type HeaderHash (SimpleBlock' c ext ext' ∷ Type) = Hash (SimpleHash c) (Header (SimpleBlock' c ext ext')) | |||||||||||||||||||||
| type Rep (BlockConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type Rep (CodecConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type Rep (Header (SimpleBlock' c ext ext')) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (Header (SimpleBlock' c ext ext')) = D1 ('MetaData "Header" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleHeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HeaderHash (SimpleBlock' c ext ext'))) :*: (S1 ('MetaSel ('Just "simpleHeaderStd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleStdHeader c ext)) :*: S1 ('MetaSel ('Just "simpleHeaderExt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ext')))) | |||||||||||||||||||||
| type Rep (StorageConfig (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (StorageConfig (SimpleBlock c ext)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleStorageConfig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SecurityParam))) | |||||||||||||||||||||
| type Rep (Validated (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type Rep (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (GenTx (SimpleBlock c ext)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleGenTx") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Tx) :*: S1 ('MetaSel ('Just "simpleGenTxId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId))) | |||||||||||||||||||||
| type Rep (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (TxId (GenTx (SimpleBlock c ext))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId))) | |||||||||||||||||||||
| type BlockProtocol (SimplePraosRuleBlock c) Source # | |||||||||||||||||||||
| type CannotForge (SimplePraosRuleBlock c) Source # | |||||||||||||||||||||
| type ForgeStateInfo (SimplePraosRuleBlock c) Source # | |||||||||||||||||||||
| type ForgeStateUpdateError (SimplePraosRuleBlock c) Source # | |||||||||||||||||||||
| newtype Validated (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block newtype Validated (GenTx (SimpleBlock c ext)) = ValidatedSimpleGenTx {
| |||||||||||||||||||||
| newtype TxId (GenTx (SimpleBlock c ext)) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type BlockNodeToClientVersion (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||||||||||||||
| type BlockNodeToNodeVersion (MockBlock ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||||||||||||||
| type RawTxId (TxId (GenTx (SimpleBlock c ext))) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type Rep (LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (LedgerState (SimpleBlock c ext) mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MockState (SimpleBlock c ext))) :*: S1 ('MetaSel ('Just "simpleLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerTables (SimpleBlock c ext) mk)))) | |||||||||||||||||||||
| data BlockConfig (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type BlockProtocol (SimpleBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT | |||||||||||||||||||||
| type BlockProtocol (SimplePBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT | |||||||||||||||||||||
| type BlockProtocol (SimplePraosBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos | |||||||||||||||||||||
| data CodecConfig (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| data StorageConfig (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type CannotForge (SimpleBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT | |||||||||||||||||||||
| type CannotForge (SimplePBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT | |||||||||||||||||||||
| type CannotForge (SimplePraosBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos | |||||||||||||||||||||
| type ForgeStateInfo (SimpleBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT | |||||||||||||||||||||
| type ForgeStateInfo (SimplePBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT | |||||||||||||||||||||
| type ForgeStateInfo (SimplePraosBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos | |||||||||||||||||||||
| type ForgeStateUpdateError (SimpleBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT | |||||||||||||||||||||
| type ForgeStateUpdateError (SimplePBftBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT | |||||||||||||||||||||
| type ForgeStateUpdateError (SimplePraosBlock c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos | |||||||||||||||||||||
| data NestedCtxt_ (SimpleBlock c ext) f a Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation data NestedCtxt_ (SimpleBlock c ext) f a where
| |||||||||||||||||||||
| type TentativeHeaderState (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node type TentativeHeaderState (SimpleBlock c ext) = TentativeHeaderState (SelectViewDiffusionPipelining (SimpleBlock c ext)) | |||||||||||||||||||||
| type TentativeHeaderView (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node type TentativeHeaderView (SimpleBlock c ext) = TentativeHeaderView (SelectViewDiffusionPipelining (SimpleBlock c ext)) | |||||||||||||||||||||
| type PerasCert (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras | |||||||||||||||||||||
| type PerasCrypto (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras | |||||||||||||||||||||
| type PerasError (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras | |||||||||||||||||||||
| type PerasVote (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras | |||||||||||||||||||||
| type PerasVotingCommitteeScheme (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras | |||||||||||||||||||||
| type HardForkIndices (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type PartialLedgerConfig (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type OtherHeaderEnvelopeError (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type TipInfo (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type AuxLedgerEvent (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| data LedgerState (SimpleBlock c ext) mk Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block data LedgerState (SimpleBlock c ext) mk = SimpleLedgerState {
| |||||||||||||||||||||
| type LedgerUpdate (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type LedgerWarning (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| data BlockQuery (SimpleBlock c ext) fp result Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block data BlockQuery (SimpleBlock c ext) fp result where
| |||||||||||||||||||||
| type ApplyTxErr (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| data GenTx (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type TxMeasurePhase1 (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type TxMeasurePhase2 (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type TxIn (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type TxOut (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| type MaybeEraIndexedEpochToPerasRoundInfo (SimpleBlock c ext) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Node.Peras | |||||||||||||||||||||
| type Signed (SimpleBftHeader c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT | |||||||||||||||||||||
| type Signed (SimplePBftHeader c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT | |||||||||||||||||||||
| type Signed (SimplePraosHeader c c') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos | |||||||||||||||||||||
| newtype Ticked LedgerState (SimpleBlock c ext ∷ Type) (mk ∷ MapKind) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block newtype Ticked LedgerState (SimpleBlock c ext ∷ Type) (mk ∷ MapKind) = TickedSimpleLedgerState {
| |||||||||||||||||||||
| type Rep (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (SimpleBlock' c ext ext') = D1 ('MetaData "SimpleBlock'" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleBlock" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleHeader") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Header (SimpleBlock' c ext ext'))) :*: S1 ('MetaSel ('Just "simpleBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SimpleBody))) | |||||||||||||||||||||
| type HashSize (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||||||||||||||
| data Header (SimpleBlock' c ext ext') Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block data Header (SimpleBlock' c ext ext') = SimpleHeader {
| |||||||||||||||||||||
| type Rep (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||||||||||||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (Ticked LedgerState (SimpleBlock c ext) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext) mk)))) | |||||||||||||||||||||
data SimpleBody Source #
Constructors
| SimpleBody | |
Instances
| ToCBOR SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods toCBOR ∷ SimpleBody → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SimpleBody → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SimpleBody] → Size Source # | |||||
| Eq SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Generic SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
| |||||
| Show SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → SimpleBody → ShowS # show ∷ SimpleBody → String # showList ∷ [SimpleBody] → ShowS # | |||||
| HasMockTxs SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getMockTxs ∷ SimpleBody → [Tx] Source # | |||||
| Serialise SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ SimpleBody → Encoding Source # decode ∷ Decoder s SimpleBody Source # encodeList ∷ [SimpleBody] → Encoding Source # decodeList ∷ Decoder s [SimpleBody] Source # | |||||
| type Rep SimpleBody Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep SimpleBody = D1 ('MetaData "SimpleBody" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleBody" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleTxs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tx]))) | |||||
type family SimpleHash c Source #
Instances
| type SimpleHash SimpleMockCrypto Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |
| type SimpleHash SimpleStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |
type SimpleHeader c ext = Header (SimpleBlock c ext) Source #
data SimpleStdHeader c ext Source #
Constructors
| SimpleStdHeader | |
Fields
| |
Instances
| (SimpleCrypto c, Typeable ext) ⇒ Eq (SimpleStdHeader c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ SimpleStdHeader c ext → SimpleStdHeader c ext → Bool # (/=) ∷ SimpleStdHeader c ext → SimpleStdHeader c ext → Bool # | |||||
| Generic (SimpleStdHeader c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ SimpleStdHeader c ext → Rep (SimpleStdHeader c ext) x # to ∷ Rep (SimpleStdHeader c ext) x → SimpleStdHeader c ext # | |||||
| (SimpleCrypto c, Typeable ext) ⇒ Show (SimpleStdHeader c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → SimpleStdHeader c ext → ShowS # show ∷ SimpleStdHeader c ext → String # showList ∷ [SimpleStdHeader c ext] → ShowS # | |||||
| (SimpleCrypto c, Typeable ext) ⇒ NoThunks (SimpleStdHeader c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ Serialise (SimpleStdHeader c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ SimpleStdHeader c ext → Encoding Source # decode ∷ Decoder s (SimpleStdHeader c ext) Source # encodeList ∷ [SimpleStdHeader c ext] → Encoding Source # decodeList ∷ Decoder s [SimpleStdHeader c ext] Source # | |||||
| type Rep (SimpleStdHeader c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (SimpleStdHeader c ext) = D1 ('MetaData "SimpleStdHeader" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleStdHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "simplePrev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainHash (SimpleBlock c ext))) :*: S1 ('MetaSel ('Just "simpleSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "simpleBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: (S1 ('MetaSel ('Just "simpleBodyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash (SimpleHash c) SimpleBody)) :*: S1 ('MetaSel ('Just "simpleBodySize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SizeInBytes))))) | |||||
Working with SimpleBlock
countSimpleGenTxs ∷ SimpleBlock c ext → Word64 Source #
matchesSimpleHeader ∷ SimpleCrypto c ⇒ Header (SimpleBlock' c ext ext') → SimpleBlock' c ext ext'' → Bool Source #
Check whether the block matches the header
mkSimpleHeader ∷ (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ (ext' → Encoding) → SimpleStdHeader c ext → ext' → Header (SimpleBlock' c ext ext') Source #
Create a header by hashing the header without hash and adding to the resulting value.
Configuration
data family BlockConfig blk Source #
Static configuration required to work with this type of blocks
Instances
| Isomorphic BlockConfig Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ BlockConfig (HardForkBlock '[blk]) → BlockConfig blk Source # inject ∷ NoHardForks blk ⇒ BlockConfig blk → BlockConfig (HardForkBlock '[blk]) Source # | |||||
| Generic (BlockConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Associated Types
Methods from ∷ BlockConfig TestBlock → Rep (BlockConfig TestBlock) x # to ∷ Rep (BlockConfig TestBlock) x → BlockConfig TestBlock # | |||||
| Generic (BlockConfig (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods from ∷ BlockConfig (TestBlockWith ptype) → Rep (BlockConfig (TestBlockWith ptype)) x # to ∷ Rep (BlockConfig (TestBlockWith ptype)) x → BlockConfig (TestBlockWith ptype) # | |||||
| Generic (BlockConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ BlockConfig (SimpleBlock c ext) → Rep (BlockConfig (SimpleBlock c ext)) x # to ∷ Rep (BlockConfig (SimpleBlock c ext)) x → BlockConfig (SimpleBlock c ext) # | |||||
| Show (BlockConfig (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods showsPrec ∷ Int → BlockConfig (TestBlockWith ptype) → ShowS # show ∷ BlockConfig (TestBlockWith ptype) → String # showList ∷ [BlockConfig (TestBlockWith ptype)] → ShowS # | |||||
| CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (BlockConfig (HardForkBlock xs)) → String Source # | |||||
| NoThunks (BlockConfig (DualBlock m a)) Source # | |||||
| NoThunks (BlockConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| NoThunks (BlockConfig (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock | |||||
| NoThunks (BlockConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (BlockConfig (SimpleBlock c ext)) → String Source # | |||||
| data BlockConfig TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| type Rep (BlockConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock type Rep (BlockConfig TestBlock) = D1 ('MetaData "BlockConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockEBBsAllowed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes))) | |||||
| type Rep (BlockConfig (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock type Rep (BlockConfig (TestBlockWith ptype)) = D1 ('MetaData "BlockConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes))) | |||||
| type Rep (BlockConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| newtype BlockConfig (DisableDiffusionPipelining blk) Source # | |||||
Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining newtype BlockConfig (DisableDiffusionPipelining blk) = DisableDiffusionPipeliningBlockConfig (BlockConfig blk) | |||||
| newtype BlockConfig (SelectViewDiffusionPipelining blk) Source # | |||||
Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining newtype BlockConfig (SelectViewDiffusionPipelining blk) = SelectViewDiffusionPipeliningBlockConfig (BlockConfig blk) | |||||
| newtype BlockConfig (HardForkBlock xs) Source # | |||||
| data BlockConfig (TestBlockWith ptype) # | |||||
Defined in Test.Util.TestBlock | |||||
| data BlockConfig (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| data BlockConfig (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
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
| Isomorphic CodecConfig Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ CodecConfig (HardForkBlock '[blk]) → CodecConfig blk Source # inject ∷ NoHardForks blk ⇒ CodecConfig blk → CodecConfig (HardForkBlock '[blk]) Source # | |||||
| Generic (CodecConfig (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
Methods from ∷ CodecConfig (DualBlock m a) → Rep (CodecConfig (DualBlock m a)) x # to ∷ Rep (CodecConfig (DualBlock m a)) x → CodecConfig (DualBlock m a) # | |||||
| Generic (CodecConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Associated Types
Methods from ∷ CodecConfig TestBlock → Rep (CodecConfig TestBlock) x # to ∷ Rep (CodecConfig TestBlock) x → CodecConfig TestBlock # | |||||
| Generic (CodecConfig TestBlock) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods from ∷ CodecConfig TestBlock → Rep (CodecConfig TestBlock) x # to ∷ Rep (CodecConfig TestBlock) x → CodecConfig TestBlock # | |||||
| Generic (CodecConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ CodecConfig (SimpleBlock c ext) → Rep (CodecConfig (SimpleBlock c ext)) x # to ∷ Rep (CodecConfig (SimpleBlock c ext)) x → CodecConfig (SimpleBlock c ext) # | |||||
| Show (CodecConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods showsPrec ∷ Int → CodecConfig TestBlock → ShowS # show ∷ CodecConfig TestBlock → String # showList ∷ [CodecConfig TestBlock] → ShowS # | |||||
| Show (CodecConfig TestBlock) # | |||||
Defined in Test.Util.TestBlock Methods showsPrec ∷ Int → CodecConfig TestBlock → ShowS # show ∷ CodecConfig TestBlock → String # showList ∷ [CodecConfig TestBlock] → ShowS # | |||||
| CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (CodecConfig (HardForkBlock xs)) → String Source # | |||||
| (NoThunks (CodecConfig m), NoThunks (CodecConfig a)) ⇒ NoThunks (CodecConfig (DualBlock m a)) Source # | |||||
| NoThunks (CodecConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| NoThunks (CodecConfig TestBlock) # | |||||
Defined in Test.Util.TestBlock | |||||
| 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 # | |||||
| ToExpr (CodecConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods toExpr ∷ CodecConfig TestBlock → Expr Source # listToExpr ∷ [CodecConfig TestBlock] → Expr Source # | |||||
| data CodecConfig TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| data CodecConfig TestBlock # | |||||
Defined in Test.Util.TestBlock | |||||
| type Rep (CodecConfig (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "DualCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualCodecConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig m)) :*: S1 ('MetaSel ('Just "dualCodecConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig a)))) | |||||
| type Rep (CodecConfig TestBlock) # | |||||
| type Rep (CodecConfig TestBlock) # | |||||
| type Rep (CodecConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| newtype CodecConfig (HardForkBlock xs) Source # | |||||
| data CodecConfig (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data CodecConfig (DualBlock m a) = DualCodecConfig {
| |||||
| data CodecConfig (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
data SimpleLedgerConfig c ext Source #
Constructors
| SimpleLedgerConfig | |
Fields
| |
Instances
| Eq (MockLedgerConfig c ext) ⇒ Eq (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ SimpleLedgerConfig c ext → SimpleLedgerConfig c ext → Bool # (/=) ∷ SimpleLedgerConfig c ext → SimpleLedgerConfig c ext → Bool # | |||||
| Generic (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ SimpleLedgerConfig c ext → Rep (SimpleLedgerConfig c ext) x # to ∷ Rep (SimpleLedgerConfig c ext) x → SimpleLedgerConfig c ext # | |||||
| Show (MockLedgerConfig c ext) ⇒ Show (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → SimpleLedgerConfig c ext → ShowS # show ∷ SimpleLedgerConfig c ext → String # showList ∷ [SimpleLedgerConfig c ext] → ShowS # | |||||
| NoThunks (MockLedgerConfig c ext) ⇒ NoThunks (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Serialise (MockLedgerConfig c ext) ⇒ Serialise (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ SimpleLedgerConfig c ext → Encoding Source # decode ∷ Decoder s (SimpleLedgerConfig c ext) Source # encodeList ∷ [SimpleLedgerConfig c ext] → Encoding Source # decodeList ∷ Decoder s [SimpleLedgerConfig c ext] Source # | |||||
| Serialise (MockLedgerConfig c ext) ⇒ SerialiseNodeToClient (SimpleBlock c ext) (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encodeNodeToClient ∷ CodecConfig (SimpleBlock c ext) → BlockNodeToClientVersion (SimpleBlock c ext) → SimpleLedgerConfig c ext → Encoding Source # decodeNodeToClient ∷ CodecConfig (SimpleBlock c ext) → BlockNodeToClientVersion (SimpleBlock c ext) → ∀ s. Decoder s (SimpleLedgerConfig c ext) Source # | |||||
| type Rep (SimpleLedgerConfig c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (SimpleLedgerConfig c ext) = D1 ('MetaData "SimpleLedgerConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleMockLedgerConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (MockLedgerConfig c ext)) :*: (S1 ('MetaSel ('Just "simpleLedgerEraParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EraParams) :*: S1 ('MetaSel ('Just "simpleLedgerMockConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MockConfig)))) | |||||
data family StorageConfig blk Source #
Config needed for the
NodeInitStorage class. Defined here to
avoid circular dependencies.
Instances
| Isomorphic StorageConfig Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ StorageConfig (HardForkBlock '[blk]) → StorageConfig blk Source # inject ∷ NoHardForks blk ⇒ StorageConfig blk → StorageConfig (HardForkBlock '[blk]) Source # | |||||
| Generic (StorageConfig (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
Methods from ∷ StorageConfig (DualBlock m a) → Rep (StorageConfig (DualBlock m a)) x # to ∷ Rep (StorageConfig (DualBlock m a)) x → StorageConfig (DualBlock m a) # | |||||
| Generic (StorageConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Associated Types
Methods from ∷ StorageConfig TestBlock → Rep (StorageConfig TestBlock) x # to ∷ Rep (StorageConfig TestBlock) x → StorageConfig TestBlock # | |||||
| Generic (StorageConfig TestBlock) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods from ∷ StorageConfig TestBlock → Rep (StorageConfig TestBlock) x # to ∷ Rep (StorageConfig TestBlock) x → StorageConfig TestBlock # | |||||
| Generic (StorageConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ StorageConfig (SimpleBlock c ext) → Rep (StorageConfig (SimpleBlock c ext)) x # to ∷ Rep (StorageConfig (SimpleBlock c ext)) x → StorageConfig (SimpleBlock c ext) # | |||||
| Show (StorageConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods showsPrec ∷ Int → StorageConfig TestBlock → ShowS # show ∷ StorageConfig TestBlock → String # showList ∷ [StorageConfig TestBlock] → ShowS # | |||||
| Show (StorageConfig TestBlock) # | |||||
Defined in Test.Util.TestBlock Methods showsPrec ∷ Int → StorageConfig TestBlock → ShowS # show ∷ StorageConfig TestBlock → String # showList ∷ [StorageConfig TestBlock] → ShowS # | |||||
| CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (StorageConfig (HardForkBlock xs)) → String Source # | |||||
| (NoThunks (StorageConfig m), NoThunks (StorageConfig a)) ⇒ NoThunks (StorageConfig (DualBlock m a)) Source # | |||||
| NoThunks (StorageConfig TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| NoThunks (StorageConfig TestBlock) # | |||||
Defined in Test.Util.TestBlock | |||||
| NoThunks (StorageConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (StorageConfig (SimpleBlock c ext)) → String Source # | |||||
| data StorageConfig TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| data StorageConfig TestBlock # | |||||
Defined in Test.Util.TestBlock | |||||
| type Rep (StorageConfig (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "DualStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualStorageConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig m)) :*: S1 ('MetaSel ('Just "dualStorageConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig a)))) | |||||
| type Rep (StorageConfig TestBlock) # | |||||
| type Rep (StorageConfig TestBlock) # | |||||
| type Rep (StorageConfig (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (StorageConfig (SimpleBlock c ext)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleStorageConfig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SecurityParam))) | |||||
| newtype StorageConfig (HardForkBlock xs) Source # | |||||
| data StorageConfig (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| data StorageConfig (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
Protocol-specific part
class (SimpleCrypto c, Typeable ext, Show (MockLedgerConfig c ext), NoThunks (MockLedgerConfig c ext), Serialise (MockLedgerConfig c ext)) ⇒ MockProtocolSpecific c ext Source #
Associated Types
type MockLedgerConfig c ext Source #
Instances
| SimpleCrypto c ⇒ MockProtocolSpecific c SimplePraosRuleExt Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule Associated Types
| |||||
| (SimpleCrypto c, Typeable c') ⇒ MockProtocolSpecific c (SimpleBftExt c c') Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.BFT Associated Types
| |||||
| (SimpleCrypto c, PBftCrypto c', Serialise (PBftVerKeyHash c')) ⇒ MockProtocolSpecific c (SimplePBftExt c c') Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.PBFT Associated Types
| |||||
| (SimpleCrypto c, Typeable c') ⇒ MockProtocolSpecific c (SimplePraosExt c c') Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block.Praos Associated Types
| |||||
UpdateLedger
data family LedgerState blk (mk ∷ MapKind) Source #
Ledger state associated with a block
This is the Consensus notion of a Ledger ledger state. Each block type is
associated with one of the Ledger types for the ledger state. Virtually
every concept in this codebase revolves around this type, or the referenced
blk. Whenever we use the type variable l we intend to signal that the
expected instantiation is either a LedgerState or some wrapper over it
(like the ExtLedgerState).
This type is parametrized over mk :: to express the
MapKindLedgerTables contained in such a LedgerState. See LedgerTables for a
more thorough description.
The main operations we can do with a LedgerState are ticking (defined in
IsLedger), and applying a block (defined in
ApplyBlock).
Instances
| ApplyBlock LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg LedgerState TestBlock → TestBlock → Ticked LedgerState TestBlock ValuesMK → Except (LedgerErr LedgerState TestBlock) (LedgerResult TestBlock (LedgerState TestBlock DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState TestBlock → TestBlock → Ticked LedgerState TestBlock ValuesMK → Except (LedgerErr LedgerState TestBlock) (LedgerResult TestBlock (LedgerState TestBlock DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState TestBlock → TestBlock → Ticked LedgerState TestBlock ValuesMK → LedgerResult TestBlock (LedgerState TestBlock DiffMK) Source # | |||||
| IsLedger LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState TestBlock → SlotNo → LedgerState TestBlock EmptyMK → LedgerResult TestBlock (Ticked LedgerState TestBlock DiffMK) Source # | |||||
| CanUpgradeLedgerTables LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState TestBlock mk1 → LedgerState TestBlock mk2 → LedgerTables TestBlock ValuesMK → LedgerTables TestBlock ValuesMK Source # | |||||
| CanUpgradeLedgerTables LedgerState TestBlock # | |||||
Defined in Test.Util.TestBlock Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState TestBlock mk1 → LedgerState TestBlock mk2 → LedgerTables TestBlock ValuesMK → LedgerTables TestBlock ValuesMK Source # | |||||
| HasLedgerTables LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState TestBlock mk → LedgerTables TestBlock mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState TestBlock any → LedgerTables TestBlock mk → LedgerState TestBlock mk Source # | |||||
| HasLedgerTables LedgerState TestBlock # | |||||
Defined in Test.Util.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState TestBlock mk → LedgerTables TestBlock mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState TestBlock any → LedgerTables TestBlock mk → LedgerState TestBlock mk Source # | |||||
| LedgerTablesAreTrivial LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState TestBlock mk → LedgerState TestBlock mk' Source # | |||||
| LedgerTablesAreTrivial LedgerState TestBlock # | |||||
Defined in Test.Util.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState TestBlock mk → LedgerState TestBlock mk' Source # | |||||
| SerializeTablesWithHint LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods encodeTablesWithHint ∷ LedgerState TestBlock EmptyMK → LedgerTables TestBlock ValuesMK → Encoding Source # decodeTablesWithHint ∷ LedgerState TestBlock EmptyMK → Decoder s (LedgerTables TestBlock ValuesMK) Source # | |||||
| SerializeTablesWithHint LedgerState TestBlock # | |||||
Defined in Test.Util.TestBlock Methods encodeTablesWithHint ∷ LedgerState TestBlock EmptyMK → LedgerTables TestBlock ValuesMK → Encoding Source # decodeTablesWithHint ∷ LedgerState TestBlock EmptyMK → Decoder s (LedgerTables TestBlock ValuesMK) Source # | |||||
| IndexedMemPack LedgerState TestBlock Void # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods indexedPackedByteCount ∷ LedgerState TestBlock EmptyMK → Void → Int Source # indexedPackM ∷ LedgerState TestBlock EmptyMK → Void → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState TestBlock EmptyMK → Unpack s b Void Source # indexedTypeName ∷ Proxy Void → LedgerState TestBlock EmptyMK → String Source # | |||||
| IndexedMemPack LedgerState TestBlock Void # | |||||
Defined in Test.Util.TestBlock Methods indexedPackedByteCount ∷ LedgerState TestBlock EmptyMK → Void → Int Source # indexedPackM ∷ LedgerState TestBlock EmptyMK → Void → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState TestBlock EmptyMK → Unpack s b Void Source # indexedTypeName ∷ Proxy Void → LedgerState TestBlock EmptyMK → String Source # | |||||
| PayloadSemantics ptype ⇒ ApplyBlock LedgerState (TestBlockWith ptype) # | |||||
Defined in Test.Util.TestBlock Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg LedgerState (TestBlockWith ptype) → TestBlockWith ptype → Ticked LedgerState (TestBlockWith ptype) ValuesMK → Except (LedgerErr LedgerState (TestBlockWith ptype)) (LedgerResult (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (TestBlockWith ptype) → TestBlockWith ptype → Ticked LedgerState (TestBlockWith ptype) ValuesMK → Except (LedgerErr LedgerState (TestBlockWith ptype)) (LedgerResult (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (TestBlockWith ptype) → TestBlockWith ptype → Ticked LedgerState (TestBlockWith ptype) ValuesMK → LedgerResult (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) DiffMK) Source # | |||||
| PayloadSemantics ptype ⇒ IsLedger LedgerState (TestBlockWith ptype) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (TestBlockWith ptype) → SlotNo → LedgerState (TestBlockWith ptype) EmptyMK → LedgerResult (TestBlockWith ptype) (Ticked LedgerState (TestBlockWith ptype) DiffMK) Source # | |||||
| Bridge m a ⇒ ApplyBlock LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg LedgerState (DualBlock m a) → DualBlock m a → Ticked LedgerState (DualBlock m a) ValuesMK → Except (LedgerErr LedgerState (DualBlock m a)) (LedgerResult (DualBlock m a) (LedgerState (DualBlock m a) DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (DualBlock m a) → DualBlock m a → Ticked LedgerState (DualBlock m a) ValuesMK → Except (LedgerErr LedgerState (DualBlock m a)) (LedgerResult (DualBlock m a) (LedgerState (DualBlock m a) DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (DualBlock m a) → DualBlock m a → Ticked LedgerState (DualBlock m a) ValuesMK → LedgerResult (DualBlock m a) (LedgerState (DualBlock m a) DiffMK) Source # | |||||
| MockProtocolSpecific c ext ⇒ ApplyBlock LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SimpleBlock c ext → Ticked LedgerState (SimpleBlock c ext) ValuesMK → Except (LedgerErr LedgerState (SimpleBlock c ext)) (LedgerResult (SimpleBlock c ext) (LedgerState (SimpleBlock c ext) DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SimpleBlock c ext → Ticked LedgerState (SimpleBlock c ext) ValuesMK → Except (LedgerErr LedgerState (SimpleBlock c ext)) (LedgerResult (SimpleBlock c ext) (LedgerState (SimpleBlock c ext) DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SimpleBlock c ext → Ticked LedgerState (SimpleBlock c ext) ValuesMK → LedgerResult (SimpleBlock c ext) (LedgerState (SimpleBlock c ext) DiffMK) Source # | |||||
| Bridge m a ⇒ IsLedger LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (DualBlock m a) → SlotNo → LedgerState (DualBlock m a) EmptyMK → LedgerResult (DualBlock m a) (Ticked LedgerState (DualBlock m a) DiffMK) Source # | |||||
| MockProtocolSpecific c ext ⇒ IsLedger LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg LedgerState (SimpleBlock c ext) → SlotNo → LedgerState (SimpleBlock c ext) EmptyMK → LedgerResult (SimpleBlock c ext) (Ticked LedgerState (SimpleBlock c ext) DiffMK) Source # | |||||
| CanUpgradeLedgerTables LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (DualBlock m a) mk1 → LedgerState (DualBlock m a) mk2 → LedgerTables (DualBlock m a) ValuesMK → LedgerTables (DualBlock m a) ValuesMK Source # | |||||
| CanUpgradeLedgerTables LedgerState (OTBlock k v) # | |||||
Defined in Test.Util.LedgerStateOnlyTables Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (OTBlock k v) mk1 → LedgerState (OTBlock k v) mk2 → LedgerTables (OTBlock k v) ValuesMK → LedgerTables (OTBlock k v) ValuesMK Source # | |||||
| CanUpgradeLedgerTables LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (SimpleBlock c ext) mk1 → LedgerState (SimpleBlock c ext) mk2 → LedgerTables (SimpleBlock c ext) ValuesMK → LedgerTables (SimpleBlock c ext) ValuesMK Source # | |||||
| (Bridge m a, HasLedgerTables LedgerState m) ⇒ HasLedgerTables LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → LedgerState (DualBlock m a) mk Source # | |||||
| (Ord k, Eq v, NoThunks k, NoThunks v) ⇒ HasLedgerTables LedgerState (OTBlock k v) # | |||||
Defined in Test.Util.LedgerStateOnlyTables Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (OTBlock k v) mk → LedgerTables (OTBlock k v) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (OTBlock k v) any → LedgerTables (OTBlock k v) mk → LedgerState (OTBlock k v) mk Source # | |||||
| HasLedgerTables LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (SimpleBlock c ext) mk → LedgerTables (SimpleBlock c ext) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (SimpleBlock c ext) any → LedgerTables (SimpleBlock c ext) mk → LedgerState (SimpleBlock c ext) mk Source # | |||||
| (Ord (TxIn m), MemPack (TxIn m), MemPack (TxOut m)) ⇒ SerializeTablesWithHint LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods encodeTablesWithHint ∷ LedgerState (DualBlock m a) EmptyMK → LedgerTables (DualBlock m a) ValuesMK → Encoding Source # decodeTablesWithHint ∷ LedgerState (DualBlock m a) EmptyMK → Decoder s (LedgerTables (DualBlock m a) ValuesMK) Source # | |||||
| (Ord k, MemPack k, MemPack v) ⇒ SerializeTablesWithHint LedgerState (OTBlock k v) # | |||||
Defined in Test.Util.LedgerStateOnlyTables Methods encodeTablesWithHint ∷ LedgerState (OTBlock k v) EmptyMK → LedgerTables (OTBlock k v) ValuesMK → Encoding Source # decodeTablesWithHint ∷ LedgerState (OTBlock k v) EmptyMK → Decoder s (LedgerTables (OTBlock k v) ValuesMK) Source # | |||||
| SerializeTablesWithHint LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encodeTablesWithHint ∷ LedgerState (SimpleBlock c ext) EmptyMK → LedgerTables (SimpleBlock c ext) ValuesMK → Encoding Source # decodeTablesWithHint ∷ LedgerState (SimpleBlock c ext) EmptyMK → Decoder s (LedgerTables (SimpleBlock c ext) ValuesMK) Source # | |||||
| DecodeDisk TestBlock (LedgerState TestBlock EmptyMK) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods decodeDisk ∷ CodecConfig TestBlock → ∀ s. Decoder s (LedgerState TestBlock EmptyMK) Source # | |||||
| EncodeDisk TestBlock (LedgerState TestBlock EmptyMK) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods encodeDisk ∷ CodecConfig TestBlock → LedgerState TestBlock EmptyMK → Encoding Source # | |||||
| (txout ~ TxOut m, IndexedMemPack LedgerState m txout) ⇒ IndexedMemPack LedgerState (DualBlock m a) txout Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods indexedPackedByteCount ∷ LedgerState (DualBlock m a) EmptyMK → txout → Int Source # indexedPackM ∷ LedgerState (DualBlock m a) EmptyMK → txout → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState (DualBlock m a) EmptyMK → Unpack s b txout Source # indexedTypeName ∷ Proxy txout → LedgerState (DualBlock m a) EmptyMK → String Source # | |||||
| MemPack v ⇒ IndexedMemPack LedgerState (OTBlock k v) v # | |||||
Defined in Test.Util.LedgerStateOnlyTables Methods indexedPackedByteCount ∷ LedgerState (OTBlock k v) EmptyMK → v → Int Source # indexedPackM ∷ LedgerState (OTBlock k v) EmptyMK → v → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState (OTBlock k v) EmptyMK → Unpack s b v Source # indexedTypeName ∷ Proxy v → LedgerState (OTBlock k v) EmptyMK → String Source # | |||||
| IndexedMemPack LedgerState (SimpleBlock c ext) TxOut Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods indexedPackedByteCount ∷ LedgerState (SimpleBlock c ext) EmptyMK → TxOut → Int Source # indexedPackM ∷ LedgerState (SimpleBlock c ext) EmptyMK → TxOut → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState (SimpleBlock c ext) EmptyMK → Unpack s b TxOut Source # indexedTypeName ∷ Proxy TxOut → LedgerState (SimpleBlock c ext) EmptyMK → String Source # | |||||
| Bridge m a ⇒ GetTip (LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState (DualBlock m a) mk → Point (LedgerState (DualBlock m a)) Source # | |||||
| GetTip (LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState TestBlock mk → Point (LedgerState TestBlock) Source # | |||||
| GetTip (LedgerState (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState (TestBlockWith ptype) mk → Point (LedgerState (TestBlockWith ptype)) Source # | |||||
| GetTip (LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState (SimpleBlock c ext) mk → Point (LedgerState (SimpleBlock c ext)) Source # | |||||
| CanHardFork xs ⇒ LedgerStateSupportsPeras (LedgerState (HardForkBlock xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods getPoolDistr ∷ LedgerState (HardForkBlock xs) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → LedgerState (HardForkBlock xs) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods getPoolDistr ∷ LedgerState (DualBlock m a) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → LedgerState (DualBlock m a) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods getPoolDistr ∷ LedgerState TestBlock EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → LedgerState TestBlock EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (LedgerState (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods getPoolDistr ∷ LedgerState (TestBlockWith ptype) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → LedgerState (TestBlockWith ptype) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getPoolDistr ∷ LedgerState (SimpleBlock c ext) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → LedgerState (SimpleBlock c ext) EmptyMK → PerasParams blk Source # | |||||
| CanStowLedgerTables (LedgerState m) ⇒ CanStowLedgerTables (LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods stowLedgerTables ∷ LedgerState (DualBlock m a) ValuesMK → LedgerState (DualBlock m a) EmptyMK Source # unstowLedgerTables ∷ LedgerState (DualBlock m a) EmptyMK → LedgerState (DualBlock m a) ValuesMK Source # | |||||
| CanStowLedgerTables (LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods stowLedgerTables ∷ LedgerState TestBlock ValuesMK → LedgerState TestBlock EmptyMK Source # unstowLedgerTables ∷ LedgerState TestBlock EmptyMK → LedgerState TestBlock ValuesMK Source # | |||||
| CanStowLedgerTables (LedgerState TestBlock) # | |||||
Defined in Test.Util.TestBlock Methods stowLedgerTables ∷ LedgerState TestBlock ValuesMK → LedgerState TestBlock EmptyMK Source # unstowLedgerTables ∷ LedgerState TestBlock EmptyMK → LedgerState TestBlock ValuesMK Source # | |||||
| CanStowLedgerTables (LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods stowLedgerTables ∷ LedgerState (SimpleBlock c ext) ValuesMK → LedgerState (SimpleBlock c ext) EmptyMK Source # unstowLedgerTables ∷ LedgerState (SimpleBlock c ext) EmptyMK → LedgerState (SimpleBlock c ext) ValuesMK Source # | |||||
| PayloadSemantics ptype ⇒ DecodeDisk (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) EmptyMK) # | |||||
Defined in Test.Util.TestBlock Methods decodeDisk ∷ CodecConfig (TestBlockWith ptype) → ∀ s. Decoder s (LedgerState (TestBlockWith ptype) EmptyMK) Source # | |||||
| Typeable ext ⇒ DecodeDisk (MockBlock ext) (LedgerState (MockBlock ext) EmptyMK) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (LedgerState (MockBlock ext) EmptyMK) Source # | |||||
| PayloadSemantics ptype ⇒ EncodeDisk (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) EmptyMK) # | |||||
Defined in Test.Util.TestBlock Methods encodeDisk ∷ CodecConfig (TestBlockWith ptype) → LedgerState (TestBlockWith ptype) EmptyMK → Encoding Source # | |||||
| Typeable ext ⇒ EncodeDisk (MockBlock ext) (LedgerState (MockBlock ext) EmptyMK) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → LedgerState (MockBlock ext) EmptyMK → Encoding Source # | |||||
| (EqMK mk, CanHardFork xs) ⇒ Eq (LedgerState (HardForkBlock xs) mk) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods (==) ∷ LedgerState (HardForkBlock xs) mk → LedgerState (HardForkBlock xs) mk → Bool # (/=) ∷ LedgerState (HardForkBlock xs) mk → LedgerState (HardForkBlock xs) mk → Bool # | |||||
| (Bridge m a, EqMK mk) ⇒ Eq (LedgerState (DualBlock m a) mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods (==) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool # (/=) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool # | |||||
| Eq (LedgerState TestBlock mk) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods (==) ∷ LedgerState TestBlock mk → LedgerState TestBlock mk → Bool # (/=) ∷ LedgerState TestBlock mk → LedgerState TestBlock mk → Bool # | |||||
| Eq (PayloadDependentState ptype mk) ⇒ Eq (LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock Methods (==) ∷ LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk → Bool # (/=) ∷ LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk → Bool # | |||||
| (SimpleCrypto c, Typeable ext, Eq (mk TxIn TxOut)) ⇒ Eq (LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ LedgerState (SimpleBlock c ext) mk → LedgerState (SimpleBlock c ext) mk → Bool # (/=) ∷ LedgerState (SimpleBlock c ext) mk → LedgerState (SimpleBlock c ext) mk → Bool # | |||||
| Generic (LedgerState TestBlock mk) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Associated Types
Methods from ∷ LedgerState TestBlock mk → Rep (LedgerState TestBlock mk) x # to ∷ Rep (LedgerState TestBlock mk) x → LedgerState TestBlock mk # | |||||
| Generic (LedgerState (OTBlock k v) mk) # | |||||
Defined in Test.Util.LedgerStateOnlyTables Associated Types
Methods from ∷ LedgerState (OTBlock k v) mk → Rep (LedgerState (OTBlock k v) mk) x # to ∷ Rep (LedgerState (OTBlock k v) mk) x → LedgerState (OTBlock k v) mk # | |||||
| Generic (LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods from ∷ LedgerState (TestBlockWith ptype) mk → Rep (LedgerState (TestBlockWith ptype) mk) x # to ∷ Rep (LedgerState (TestBlockWith ptype) mk) x → LedgerState (TestBlockWith ptype) mk # | |||||
| Generic (LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ LedgerState (SimpleBlock c ext) mk → Rep (LedgerState (SimpleBlock c ext) mk) x # to ∷ Rep (LedgerState (SimpleBlock c ext) mk) x → LedgerState (SimpleBlock c ext) mk # | |||||
| (ShowMK mk, CanHardFork xs) ⇒ Show (LedgerState (HardForkBlock xs) mk) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods showsPrec ∷ Int → LedgerState (HardForkBlock xs) mk → ShowS # show ∷ LedgerState (HardForkBlock xs) mk → String # showList ∷ [LedgerState (HardForkBlock xs) mk] → ShowS # | |||||
| (Bridge m a, ShowMK mk) ⇒ Show (LedgerState (DualBlock m a) mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| Show (LedgerState TestBlock mk) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods showsPrec ∷ Int → LedgerState TestBlock mk → ShowS # show ∷ LedgerState TestBlock mk → String # showList ∷ [LedgerState TestBlock mk] → ShowS # | |||||
| (ShowMK mk, PayloadSemantics ptype) ⇒ Show (LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock Methods showsPrec ∷ Int → LedgerState (TestBlockWith ptype) mk → ShowS # show ∷ LedgerState (TestBlockWith ptype) mk → String # showList ∷ [LedgerState (TestBlockWith ptype) mk] → ShowS # | |||||
| (SimpleCrypto c, Typeable ext, Show (mk TxIn TxOut)) ⇒ Show (LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → LedgerState (SimpleBlock c ext) mk → ShowS # show ∷ LedgerState (SimpleBlock c ext) mk → String # showList ∷ [LedgerState (SimpleBlock c ext) mk] → ShowS # | |||||
| (NoThunksMK mk, CanHardFork xs) ⇒ NoThunks (LedgerState (HardForkBlock xs) mk) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → LedgerState (HardForkBlock xs) mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → LedgerState (HardForkBlock xs) mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (LedgerState (HardForkBlock xs) mk) → String Source # | |||||
| NoThunks (LedgerState (DualBlock m a) mk) Source # | |||||
| NoThunks (LedgerState TestBlock mk) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| NoThunks (PayloadDependentState ptype mk) ⇒ NoThunks (LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock | |||||
| (SimpleCrypto c, Typeable ext, NoThunks (mk TxIn TxOut)) ⇒ NoThunks (LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → LedgerState (SimpleBlock c ext) mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → LedgerState (SimpleBlock c ext) mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (LedgerState (SimpleBlock c ext) mk) → String Source # | |||||
| (Ord k, Eq v) ⇒ CanStowLedgerTables (OTLedgerState k v) # | |||||
Defined in Test.Util.LedgerStateOnlyTables Methods stowLedgerTables ∷ OTLedgerState k v ValuesMK → OTLedgerState k v EmptyMK Source # unstowLedgerTables ∷ OTLedgerState k v EmptyMK → OTLedgerState k v ValuesMK Source # | |||||
| Serialise (LedgerState TestBlock mk) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods encode ∷ LedgerState TestBlock mk → Encoding Source # decode ∷ Decoder s (LedgerState TestBlock mk) Source # encodeList ∷ [LedgerState TestBlock mk] → Encoding Source # decodeList ∷ Decoder s [LedgerState TestBlock mk] Source # | |||||
| PayloadSemantics ptype ⇒ Serialise (LedgerState (TestBlockWith ptype) EmptyMK) # | |||||
Defined in Test.Util.TestBlock Methods encode ∷ LedgerState (TestBlockWith ptype) EmptyMK → Encoding Source # decode ∷ Decoder s (LedgerState (TestBlockWith ptype) EmptyMK) Source # encodeList ∷ [LedgerState (TestBlockWith ptype) EmptyMK] → Encoding Source # decodeList ∷ Decoder s [LedgerState (TestBlockWith ptype) EmptyMK] Source # | |||||
| ToExpr (LedgerState TestBlock EmptyMK) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods toExpr ∷ LedgerState TestBlock EmptyMK → Expr Source # listToExpr ∷ [LedgerState TestBlock EmptyMK] → Expr Source # | |||||
| HasLedgerTables (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock mk → LedgerTables TestBlock mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock any → LedgerTables TestBlock mk → Ticked LedgerState TestBlock mk Source # | |||||
| HasLedgerTables (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Util.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock mk → LedgerTables TestBlock mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock any → LedgerTables TestBlock mk → Ticked LedgerState TestBlock mk Source # | |||||
| LedgerTablesAreTrivial (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked LedgerState TestBlock mk → Ticked LedgerState TestBlock mk' Source # | |||||
| LedgerTablesAreTrivial (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Util.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked LedgerState TestBlock mk → Ticked LedgerState TestBlock mk' Source # | |||||
| StandardHash blk ⇒ StandardHash (LedgerState blk ∷ MapKind → Type) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Basics | |||||
| (Bridge m a, HasLedgerTables (Ticked LedgerState) m) ⇒ HasLedgerTables (Ticked LedgerState) (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source # | |||||
| HasLedgerTables (Ticked LedgerState) (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (SimpleBlock c ext) mk → LedgerTables (SimpleBlock c ext) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (SimpleBlock c ext) any → LedgerTables (SimpleBlock c ext) mk → Ticked LedgerState (SimpleBlock c ext) mk Source # | |||||
| (Ord k, Eq v, Eq (mk k v)) ⇒ Eq (OTLedgerState k v mk) # | |||||
| (Show k, Show v, Show (mk k v)) ⇒ Show (OTLedgerState k v mk) # | |||||
| (NoThunks k, NoThunks v, NoThunks (mk k v)) ⇒ NoThunks (OTLedgerState k v mk) # | |||||
| Bridge m a ⇒ GetTip (Ticked LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| GetTip (Ticked LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState TestBlock mk → Point (Ticked LedgerState TestBlock) Source # | |||||
| GetTip (Ticked LedgerState (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (TestBlockWith ptype) mk → Point (Ticked LedgerState (TestBlockWith ptype)) Source # | |||||
| GetTip (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (SimpleBlock c ext) mk → Point (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods getPoolDistr ∷ Ticked LedgerState (DualBlock m a) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (DualBlock m a) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods getPoolDistr ∷ Ticked LedgerState TestBlock EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState TestBlock EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods getPoolDistr ∷ Ticked LedgerState (TestBlockWith ptype) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (TestBlockWith ptype) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getPoolDistr ∷ Ticked LedgerState (SimpleBlock c ext) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (SimpleBlock c ext) EmptyMK → PerasParams blk Source # | |||||
| CanStowLedgerTables (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods stowLedgerTables ∷ Ticked LedgerState (SimpleBlock c ext) ValuesMK → Ticked LedgerState (SimpleBlock c ext) EmptyMK Source # unstowLedgerTables ∷ Ticked LedgerState (SimpleBlock c ext) EmptyMK → Ticked LedgerState (SimpleBlock c ext) ValuesMK Source # | |||||
| Generic (Ticked LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods from ∷ Ticked LedgerState (TestBlockWith ptype) mk → Rep (Ticked LedgerState (TestBlockWith ptype) mk) x # to ∷ Rep (Ticked LedgerState (TestBlockWith ptype) mk) x → Ticked LedgerState (TestBlockWith ptype) mk # | |||||
| Generic (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Ticked LedgerState (SimpleBlock c ext) mk → Rep (Ticked LedgerState (SimpleBlock c ext) mk) x # to ∷ Rep (Ticked LedgerState (SimpleBlock c ext) mk) x → Ticked LedgerState (SimpleBlock c ext) mk # | |||||
| (SimpleCrypto c, Typeable ext, Show (LedgerState (SimpleBlock c ext) mk)) ⇒ Show (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → Ticked LedgerState (SimpleBlock c ext) mk → ShowS # show ∷ Ticked LedgerState (SimpleBlock c ext) mk → String # showList ∷ [Ticked LedgerState (SimpleBlock c ext) mk] → ShowS # | |||||
| NoThunks (Ticked LedgerState (DualBlock m a) mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| (NoThunksMK mk, NoThunks (PayloadDependentState ptype mk)) ⇒ NoThunks (Ticked LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock | |||||
| (SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked LedgerState (SimpleBlock c ext) TrackingMK) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → Ticked LedgerState (SimpleBlock c ext) TrackingMK → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → Ticked LedgerState (SimpleBlock c ext) TrackingMK → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (Ticked LedgerState (SimpleBlock c ext) TrackingMK) → String Source # | |||||
| Inject (Flip LedgerState mk) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → Flip LedgerState mk x → Flip LedgerState mk (HardForkBlock xs) Source # | |||||
| Isomorphic (Flip LedgerState mk) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ Flip LedgerState mk (HardForkBlock '[blk]) → Flip LedgerState mk blk Source # inject ∷ NoHardForks blk ⇒ Flip LedgerState mk blk → Flip LedgerState mk (HardForkBlock '[blk]) Source # | |||||
| data LedgerState TestBlock mk # | |||||
Defined in Test.Ouroboros.Storage.TestBlock data LedgerState TestBlock mk = TestLedger {
| |||||
| type LedgerCfg LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| type LedgerErr LedgerState TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock | |||||
| type LedgerCfg LedgerState (HardForkBlock xs) Source # | |||||
| type LedgerCfg LedgerState (TestBlockWith ptype) # | |||||
Defined in Test.Util.TestBlock | |||||
| type LedgerErr LedgerState (HardForkBlock xs) Source # | |||||
| type LedgerErr LedgerState (TestBlockWith ptype) # | |||||
Defined in Test.Util.TestBlock | |||||
| type LedgerCfg LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| type LedgerCfg LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| type LedgerErr LedgerState (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| type LedgerErr LedgerState (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| newtype LedgerState (HardForkBlock xs) mk Source # | |||||
| data LedgerState (TestBlockWith ptype) mk # | |||||
Defined in Test.Util.TestBlock data LedgerState (TestBlockWith ptype) mk = TestLedger {
| |||||
| type Rep (LedgerState TestBlock mk) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock type Rep (LedgerState TestBlock mk) = D1 ('MetaData "LedgerState" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Point TestBlock)) :*: (S1 ('MetaSel ('Just "lastAppliedHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ChainHash TestBlock)) :*: S1 ('MetaSel ('Just "latestPerasCertRound") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe PerasRoundNo))))) | |||||
| type Rep (LedgerState (OTBlock k v) mk) # | |||||
Defined in Test.Util.LedgerStateOnlyTables type Rep (LedgerState (OTBlock k v) mk) = D1 ('MetaData "LedgerState" "Test.Util.LedgerStateOnlyTables" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "OTLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "otlsLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ValuesMK k v)) :*: S1 ('MetaSel ('Just "otlsLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OTLedgerTables k v mk)))) | |||||
| type Rep (LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock type Rep (LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "LedgerState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point (TestBlockWith ptype))) :*: S1 ('MetaSel ('Just "payloadDependentState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentState ptype mk)))) | |||||
| type Rep (LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (LedgerState (SimpleBlock c ext) mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MockState (SimpleBlock c ext))) :*: S1 ('MetaSel ('Just "simpleLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerTables (SimpleBlock c ext) mk)))) | |||||
| data LedgerState (DualBlock m a) mk Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| data LedgerState (OTBlock k v) mk # | |||||
Defined in Test.Util.LedgerStateOnlyTables data LedgerState (OTBlock k v) mk = OTLedgerState {
| |||||
| data LedgerState (SimpleBlock c ext) mk Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block data LedgerState (SimpleBlock c ext) mk = SimpleLedgerState {
| |||||
| newtype Ticked LedgerState TestBlock (mk ∷ MapKind) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock newtype Ticked LedgerState TestBlock (mk ∷ MapKind) = TickedTestLedger {
| |||||
| data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # | |||||
| newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) # | |||||
Defined in Test.Util.TestBlock newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) = TickedTestLedger {
| |||||
| data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| newtype Ticked LedgerState (SimpleBlock c ext ∷ Type) (mk ∷ MapKind) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block newtype Ticked LedgerState (SimpleBlock c ext ∷ Type) (mk ∷ MapKind) = TickedSimpleLedgerState {
| |||||
| type HeaderHash (LedgerState blk ∷ MapKind → Type) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Basics | |||||
| type Rep (Ticked LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk)))) | |||||
| type Rep (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (Ticked LedgerState (SimpleBlock c ext) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext) mk)))) | |||||
newtype LedgerTables blk (mk ∷ MapKind) Source #
The Ledger Tables represent the portion of the data on disk that has been pulled from disk and attached to the in-memory Ledger State or that will eventually be written to disk.
With UTxO-HD and the split of the Ledger ledger state into the in-memory
part and the on-disk part, this splitting was reflected in the new type
parameter added to the (Consensus)
LedgerState, to which we refer as "the
MapKind" or mk.
Every LedgerState (or LedgerState-like
type, such as the ExtLedgerState) is
associated with a LedgerTables and they both share the mk. They both are
of kind LedgerStateKind. LedgerTables is just a way to refer only to a
partial view of the on-disk data without having the rest of the in-memory
LedgerState in scope.
The mk can be instantiated to anything that is map-like, i.e. that expects
two type parameters, the key and the value.
Constructors
| LedgerTables | |
Fields
| |
Instances
| (∀ k v. LedgerTableConstraints' l k v ⇒ Monoid (mk k v), LedgerTableConstraints l) ⇒ Monoid (LedgerTables l mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Combinators Methods mempty ∷ LedgerTables l mk # mappend ∷ LedgerTables l mk → LedgerTables l mk → LedgerTables l mk # mconcat ∷ [LedgerTables l mk] → LedgerTables l mk # | |||||
| (∀ k v. LedgerTableConstraints' blk k v ⇒ Semigroup (mk k v), LedgerTableConstraints blk) ⇒ Semigroup (LedgerTables blk mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Combinators Methods (<>) ∷ LedgerTables blk mk → LedgerTables blk mk → LedgerTables blk mk # sconcat ∷ NonEmpty (LedgerTables blk mk) → LedgerTables blk mk # stimes ∷ Integral b ⇒ b → LedgerTables blk mk → LedgerTables blk mk # | |||||
| Eq (mk (TxIn blk) (TxOut blk)) ⇒ Eq (LedgerTables blk mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Basics Methods (==) ∷ LedgerTables blk mk → LedgerTables blk mk → Bool # (/=) ∷ LedgerTables blk mk → LedgerTables blk mk → Bool # | |||||
| Generic (LedgerTables blk mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Basics Associated Types
Methods from ∷ LedgerTables blk mk → Rep (LedgerTables blk mk) x # to ∷ Rep (LedgerTables blk mk) x → LedgerTables blk mk # | |||||
| Show (mk (TxIn blk) (TxOut blk)) ⇒ Show (LedgerTables blk mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Basics Methods showsPrec ∷ Int → LedgerTables blk mk → ShowS # show ∷ LedgerTables blk mk → String # showList ∷ [LedgerTables blk mk] → ShowS # | |||||
| NoThunks (mk (TxIn blk) (TxOut blk)) ⇒ NoThunks (LedgerTables blk mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Basics | |||||
| type Rep (LedgerTables blk mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Tables.Basics type Rep (LedgerTables blk mk) = D1 ('MetaData "LedgerTables" "Ouroboros.Consensus.Ledger.Tables.Basics" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "LedgerTables" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mk (TxIn blk) (TxOut blk))))) | |||||
data family Ticked (st ∷ k) ∷ k Source #
" Ticked " piece of state, either LedgerState or ChainDepState
Ticking refers to the passage of time (the ticking of the clock). When a
piece of state is marked as ticked, it means that time-related changes have
been applied to the state. There are exactly two methods in the interface
that do that: tickChainDepState and
applyChainTickLedgerResult.
Also note that a successful forecast
must equal
forecastFor
(ledgerViewForecastAt cfg st)
slot. Thus a
protocolLedgerView cfg
(applyChainTick cfg slot st)LedgerView can only be projected
from a Ticked state, but cannot itself be ticked.
Some examples of time related changes:
- Scheduled delegations might have been applied in Byron
- New leader schedule computed for Shelley
- Transition from Byron to Shelley activated in the hard fork combinator.
- Nonces switched out at the start of a new epoch.
Ticked is used mainly in two ways:
Ticked (Ext)LedgerStatewhere its kind gets concretized toStateKind -> StateKindTicked (HeaderState blk)where its kind gets concretized toType -> Type
Instances
| Show (Ticked ()) Source # | |||||
| ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol blk))) ⇒ ChainDepStateSupportsPeras (Ticked (HeaderState blk)) Source # | |||||
Defined in Ouroboros.Consensus.HeaderValidation Methods getEpochNonce ∷ Ticked (HeaderState blk) → Nonce Source # | |||||
| ChainDepStateSupportsPeras (Ticked (PBftState c)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT | |||||
| ChainDepStateSupportsPeras (Ticked (PraosChainDepState c)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Protocol.Praos Methods getEpochNonce ∷ Ticked (PraosChainDepState c) → Nonce Source # | |||||
| ChainDepStateSupportsPeras (Ticked ()) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.Abstract Methods getEpochNonce ∷ Ticked () → Nonce Source # | |||||
| HasLedgerTables (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock mk → LedgerTables TestBlock mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock any → LedgerTables TestBlock mk → Ticked LedgerState TestBlock mk Source # | |||||
| HasLedgerTables (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Util.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock mk → LedgerTables TestBlock mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState TestBlock any → LedgerTables TestBlock mk → Ticked LedgerState TestBlock mk Source # | |||||
| (NoThunks (TxIn blk), NoThunks (TxOut blk), HasLedgerTables (Ticked LedgerState) blk) ⇒ HasLedgerTables (Ticked ExtLedgerState) blk Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Extended Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk mk → LedgerTables blk mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk any → LedgerTables blk mk → Ticked ExtLedgerState blk mk Source # | |||||
| LedgerTablesAreTrivial (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked LedgerState TestBlock mk → Ticked LedgerState TestBlock mk' Source # | |||||
| LedgerTablesAreTrivial (Ticked LedgerState) TestBlock # | |||||
Defined in Test.Util.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked LedgerState TestBlock mk → Ticked LedgerState TestBlock mk' Source # | |||||
| (Bridge m a, HasLedgerTables (Ticked LedgerState) m) ⇒ HasLedgerTables (Ticked LedgerState) (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source # | |||||
| HasLedgerTables (Ticked LedgerState) (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (SimpleBlock c ext) mk → LedgerTables (SimpleBlock c ext) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (SimpleBlock c ext) any → LedgerTables (SimpleBlock c ext) mk → Ticked LedgerState (SimpleBlock c ext) mk Source # | |||||
| Bridge m a ⇒ GetTip (Ticked LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| GetTip (Ticked LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState TestBlock mk → Point (Ticked LedgerState TestBlock) Source # | |||||
| GetTip (Ticked LedgerState (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (TestBlockWith ptype) mk → Point (Ticked LedgerState (TestBlockWith ptype)) Source # | |||||
| GetTip (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (SimpleBlock c ext) mk → Point (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
| IsLedger LedgerState blk ⇒ GetTip (Ticked ExtLedgerState blk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Extended Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked ExtLedgerState blk mk → Point (Ticked ExtLedgerState blk) Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods getPoolDistr ∷ Ticked LedgerState (DualBlock m a) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (DualBlock m a) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState TestBlock) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock Methods getPoolDistr ∷ Ticked LedgerState TestBlock EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState TestBlock EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState (TestBlockWith ptype)) # | |||||
Defined in Test.Util.TestBlock Methods getPoolDistr ∷ Ticked LedgerState (TestBlockWith ptype) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (TestBlockWith ptype) EmptyMK → PerasParams blk Source # | |||||
| LedgerStateSupportsPeras (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getPoolDistr ∷ Ticked LedgerState (SimpleBlock c ext) EmptyMK → PoolDistr Source # getPerasParams ∷ proxy blk → Ticked LedgerState (SimpleBlock c ext) EmptyMK → PerasParams blk Source # | |||||
| CanStowLedgerTables (Ticked LedgerState (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods stowLedgerTables ∷ Ticked LedgerState (SimpleBlock c ext) ValuesMK → Ticked LedgerState (SimpleBlock c ext) EmptyMK Source # unstowLedgerTables ∷ Ticked LedgerState (SimpleBlock c ext) EmptyMK → Ticked LedgerState (SimpleBlock c ext) ValuesMK Source # | |||||
| Generic (Ticked LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock Associated Types
Methods from ∷ Ticked LedgerState (TestBlockWith ptype) mk → Rep (Ticked LedgerState (TestBlockWith ptype) mk) x # to ∷ Rep (Ticked LedgerState (TestBlockWith ptype) mk) x → Ticked LedgerState (TestBlockWith ptype) mk # | |||||
| Generic (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Ticked LedgerState (SimpleBlock c ext) mk → Rep (Ticked LedgerState (SimpleBlock c ext) mk) x # to ∷ Rep (Ticked LedgerState (SimpleBlock c ext) mk) x → Ticked LedgerState (SimpleBlock c ext) mk # | |||||
| (SimpleCrypto c, Typeable ext, Show (LedgerState (SimpleBlock c ext) mk)) ⇒ Show (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods showsPrec ∷ Int → Ticked LedgerState (SimpleBlock c ext) mk → ShowS # show ∷ Ticked LedgerState (SimpleBlock c ext) mk → String # showList ∷ [Ticked LedgerState (SimpleBlock c ext) mk] → ShowS # | |||||
| NoThunks (Ticked LedgerState (DualBlock m a) mk) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| (NoThunksMK mk, NoThunks (PayloadDependentState ptype mk)) ⇒ NoThunks (Ticked LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock | |||||
| (SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked LedgerState (SimpleBlock c ext) TrackingMK) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods noThunks ∷ Context → Ticked LedgerState (SimpleBlock c ext) TrackingMK → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → Ticked LedgerState (SimpleBlock c ext) TrackingMK → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (Ticked LedgerState (SimpleBlock c ext) TrackingMK) → String Source # | |||||
| Show (Ticked (f a)) ⇒ Show (((Ticked ∷ Type → Type) :.: f) a) Source # | |||||
| NoThunks (Ticked (f a)) ⇒ NoThunks (((Ticked ∷ Type → Type) :.: f) a) Source # | |||||
| data Ticked () Source # | |||||
Defined in Ouroboros.Consensus.Ticked | |||||
| data Ticked (HardForkChainDepState xs ∷ Type) Source # | |||||
| data Ticked (HeaderState blk ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.HeaderValidation | |||||
| data Ticked (PBftState c ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT | |||||
| newtype Ticked (WrapChainDepState blk ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.TypeFamilyWrappers | |||||
| data Ticked (PraosChainDepState c ∷ Type) Source # | Ticking the Praos chain dep state has no effect For the real Praos implementation, ticking is crucial, as it determines the point where the "nonce under construction" is swapped out for the "active" nonce. However, for the mock implementation, we keep the full history, and choose the right nonce from that; this means that ticking has no effect. We do however need access to the ticked stake distribution. | ||||
Defined in Ouroboros.Consensus.Mock.Protocol.Praos | |||||
| type HeaderHash (Ticked l blk ∷ k2) Source # | |||||
Defined in Ouroboros.Consensus.Ticked | |||||
| data Ticked ExtLedgerState (blk ∷ Type) (mk ∷ MapKind) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Extended data Ticked ExtLedgerState (blk ∷ Type) (mk ∷ MapKind) = TickedExtLedgerState {
| |||||
| newtype Ticked LedgerState TestBlock (mk ∷ MapKind) # | |||||
Defined in Test.Ouroboros.Storage.TestBlock newtype Ticked LedgerState TestBlock (mk ∷ MapKind) = TickedTestLedger {
| |||||
| data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # | |||||
| newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) # | |||||
Defined in Test.Util.TestBlock newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) = TickedTestLedger {
| |||||
| data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| newtype Ticked LedgerState (SimpleBlock c ext ∷ Type) (mk ∷ MapKind) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block newtype Ticked LedgerState (SimpleBlock c ext ∷ Type) (mk ∷ MapKind) = TickedSimpleLedgerState {
| |||||
| type Rep (Ticked LedgerState (TestBlockWith ptype) mk) # | |||||
Defined in Test.Util.TestBlock type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk)))) | |||||
| type Rep (Ticked LedgerState (SimpleBlock c ext) mk) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (Ticked LedgerState (SimpleBlock c ext) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext) mk)))) | |||||
genesisSimpleLedgerState ∷ AddrDist → LedgerState (SimpleBlock c ext) ValuesMK Source #
updateSimpleLedgerState ∷ ∀ c ext (mk1 ∷ MapKind). (SimpleCrypto c, Typeable ext) ⇒ LedgerConfig (SimpleBlock c ext) → SimpleBlock c ext → TickedLedgerState (SimpleBlock c ext) mk1 → Except (MockError (SimpleBlock c ext)) (LedgerState (SimpleBlock c ext) mk1) Source #
ApplyTx (mempool support)
data family GenTx blk Source #
Generalized transaction
The mempool (and, accordingly, blocks) consist of "generalized transactions"; this could be "proper" transactions (transferring funds) but also other kinds of things such as update proposals, delegations, etc.
Instances
| Inject GenTx Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → GenTx x → GenTx (HardForkBlock xs) Source # | |||||
| Isomorphic GenTx Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ GenTx (HardForkBlock '[blk]) → GenTx blk Source # inject ∷ NoHardForks blk ⇒ GenTx blk → GenTx (HardForkBlock '[blk]) Source # | |||||
| (Typeable m, Typeable a) ⇒ ShowProxy (GenTx (DualBlock m a) ∷ Type) Source # | |||||
| (Typeable c, Typeable ext) ⇒ ShowProxy (GenTx (SimpleBlock c ext) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| (Typeable m, Typeable a) ⇒ ShowProxy (TxId (GenTx (DualBlock m a)) ∷ Type) Source # | |||||
| (Typeable c, Typeable ext) ⇒ ShowProxy (TxId (GenTx (SimpleBlock c ext)) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Eq (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (/=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # | |||||
| Eq (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (/=) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # | |||||
| Eq (GenTxId m) ⇒ Eq (TxId (GenTx (DualBlock m a))) Source # | |||||
| Eq (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (/=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # | |||||
| Ord (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Ordering # (<) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (<=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (>) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (>=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # max ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) # min ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) # | |||||
| Ord (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Ordering # (<) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (<=) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (>) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # (>=) ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool # max ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) # min ∷ GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) # | |||||
| Ord (GenTxId m) ⇒ Ord (TxId (GenTx (DualBlock m a))) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods compare ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Ordering # (<) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (<=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # max ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # min ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # | |||||
| Ord (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Ordering # (<) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (<=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (>) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (>=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # max ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) # min ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) # | |||||
| Generic (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Validated (GenTx (SimpleBlock c ext)) → Rep (Validated (GenTx (SimpleBlock c ext))) x # to ∷ Rep (Validated (GenTx (SimpleBlock c ext))) x → Validated (GenTx (SimpleBlock c ext)) # | |||||
| Generic (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ GenTx (SimpleBlock c ext) → Rep (GenTx (SimpleBlock c ext)) x # to ∷ Rep (GenTx (SimpleBlock c ext)) x → GenTx (SimpleBlock c ext) # | |||||
| Generic (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ TxId (GenTx (SimpleBlock c ext)) → Rep (TxId (GenTx (SimpleBlock c ext))) x # to ∷ Rep (TxId (GenTx (SimpleBlock c ext))) x → TxId (GenTx (SimpleBlock c ext)) # | |||||
| Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) Source # | |||||
| Show (Validated (GenTx (SimpleBlock p c))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Bridge m a ⇒ Show (GenTx (DualBlock m a)) Source # | |||||
| Show (GenTx (SimpleBlock p c)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Show (GenTxId m) ⇒ Show (TxId (GenTx (DualBlock m a))) Source # | |||||
| Show (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| NoThunks (Validated (GenTx (DualBlock m a))) Source # | |||||
| (Typeable p, Typeable c) ⇒ NoThunks (Validated (GenTx (SimpleBlock p c))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| NoThunks (GenTx (DualBlock m a)) Source # | |||||
| (Typeable p, Typeable c) ⇒ NoThunks (GenTx (SimpleBlock p c)) Source # | |||||
| NoThunks (TxId (GenTx (DualBlock m a))) Source # | |||||
| NoThunks (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
| Bridge m a ⇒ HasTxId (GenTx (DualBlock m a)) Source # | |||||
| HasTxId (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods txId ∷ GenTx (SimpleBlock c ext) → TxId (GenTx (SimpleBlock c ext)) Source # | |||||
| Condense (GenTx (SimpleBlock p c)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Condense (GenTxId (SimpleBlock p c)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| HasMockTxs (GenTx (SimpleBlock p c)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods getMockTxs ∷ GenTx (SimpleBlock p c) → [Tx] Source # | |||||
| HasRawTxId (GenTxId m) ⇒ HasRawTxId (TxId (GenTx (DualBlock m a))) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
| |||||
| HasRawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods getRawTxId ∷ TxId (GenTx (SimpleBlock c ext)) → RawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||
| Serialise (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ GenTx (SimpleBlock c ext) → Encoding Source # decode ∷ Decoder s (GenTx (SimpleBlock c ext)) Source # encodeList ∷ [GenTx (SimpleBlock c ext)] → Encoding Source # decodeList ∷ Decoder s [GenTx (SimpleBlock c ext)] Source # | |||||
| Serialise (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ TxId (GenTx (SimpleBlock c ext)) → Encoding Source # decode ∷ Decoder s (TxId (GenTx (SimpleBlock c ext))) Source # encodeList ∷ [TxId (GenTx (SimpleBlock c ext))] → Encoding Source # decodeList ∷ Decoder s [TxId (GenTx (SimpleBlock c ext))] Source # | |||||
| SerialiseNodeToClient (MockBlock ext) (GenTx (MockBlock ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTx (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTx (MockBlock ext)) Source # | |||||
| SerialiseNodeToClient (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||
| SerialiseNodeToNode (MockBlock ext) (GenTx (MockBlock ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTx (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTx (MockBlock ext)) Source # | |||||
| SerialiseNodeToNode (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||
| type Rep (Validated (GenTx (HardForkBlock xs))) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (Validated (GenTx (HardForkBlock xs))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs)))) | |||||
| type Rep (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| type Rep (GenTx (HardForkBlock xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (GenTx (HardForkBlock xs)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTx xs)))) | |||||
| type Rep (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (GenTx (SimpleBlock c ext)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleGenTx") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Tx) :*: S1 ('MetaSel ('Just "simpleGenTxId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId))) | |||||
| type Rep (TxId (GenTx (HardForkBlock xs))) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs)))) | |||||
| type Rep (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (TxId (GenTx (SimpleBlock c ext))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId))) | |||||
| newtype Validated (GenTx (HardForkBlock xs)) Source # | |||||
| data Validated (GenTx (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data Validated (GenTx (DualBlock m a)) = ValidatedDualGenTx {
| |||||
| newtype Validated (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block newtype Validated (GenTx (SimpleBlock c ext)) = ValidatedSimpleGenTx {
| |||||
| newtype GenTx (HardForkBlock xs) Source # | |||||
| newtype TxId (GenTx (HardForkBlock xs)) Source # | |||||
| newtype TxId (GenTx (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| newtype TxId (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| type RawTxId (TxId (GenTx (HardForkBlock xs))) Source # | |||||
| type RawTxId (TxId (GenTx (DualBlock m a))) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| type RawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| data GenTx (DualBlock m a) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data GenTx (DualBlock m a) = DualGenTx {
| |||||
| data GenTx (SimpleBlock c ext) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
A generalized transaction, GenTx, identifier.
Instances
| (Typeable m, Typeable a) ⇒ ShowProxy (TxId (GenTx (DualBlock m a)) ∷ Type) Source # | |||||
| (Typeable c, Typeable ext) ⇒ ShowProxy (TxId (GenTx (SimpleBlock c ext)) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| Eq (GenTxId m) ⇒ Eq (TxId (GenTx (DualBlock m a))) Source # | |||||
| Eq (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (/=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # | |||||
| Ord (GenTxId m) ⇒ Ord (TxId (GenTx (DualBlock m a))) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods compare ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Ordering # (<) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (<=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # max ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # min ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # | |||||
| Ord (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Ordering # (<) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (<=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (>) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # (>=) ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool # max ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) # min ∷ TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) # | |||||
| Generic (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ TxId (GenTx (SimpleBlock c ext)) → Rep (TxId (GenTx (SimpleBlock c ext))) x # to ∷ Rep (TxId (GenTx (SimpleBlock c ext))) x → TxId (GenTx (SimpleBlock c ext)) # | |||||
| Show (GenTxId m) ⇒ Show (TxId (GenTx (DualBlock m a))) Source # | |||||
| Show (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| NoThunks (TxId (GenTx (DualBlock m a))) Source # | |||||
| NoThunks (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
| Condense (GenTxId (SimpleBlock p c)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| HasRawTxId (GenTxId m) ⇒ HasRawTxId (TxId (GenTx (DualBlock m a))) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
| |||||
| HasRawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods getRawTxId ∷ TxId (GenTx (SimpleBlock c ext)) → RawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||
| Serialise (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods encode ∷ TxId (GenTx (SimpleBlock c ext)) → Encoding Source # decode ∷ Decoder s (TxId (GenTx (SimpleBlock c ext))) Source # encodeList ∷ [TxId (GenTx (SimpleBlock c ext))] → Encoding Source # decodeList ∷ Decoder s [TxId (GenTx (SimpleBlock c ext))] Source # | |||||
| SerialiseNodeToClient (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||
| SerialiseNodeToNode (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||
| type Rep (TxId (GenTx (HardForkBlock xs))) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs)))) | |||||
| type Rep (TxId (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block type Rep (TxId (GenTx (SimpleBlock c ext))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-4.0.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId))) | |||||
| newtype TxId (GenTx (HardForkBlock xs)) Source # | |||||
| newtype TxId (GenTx (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| newtype TxId (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| type RawTxId (TxId (GenTx (HardForkBlock xs))) Source # | |||||
| type RawTxId (TxId (GenTx (DualBlock m a))) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
| type RawTxId (TxId (GenTx (SimpleBlock c ext))) | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
data family Validated x Source #
" Validated " transaction or block
The ledger defines how to validate transactions and blocks. It's possible the type before and after validation may be distinct (eg Alonzo transactions), which originally motivated this family.
We also gain the related benefit that certain interface functions, such as those that reapply blocks, can have a more precise type now. TODO
Similarly, the Node-to-Client mini protocols can explicitly indicate that the
client trusts the blocks from the local server, by having the server send
Validated blocks to the client. TODO
Note that validation has different implications for a transaction than for a block. In particular, a validated transaction can be " reapplied " to different ledger states, whereas a validated block must only be " reapplied " to the exact same ledger state (eg as part of rebuilding from an on-disk ledger snapshot).
Since the ledger defines validation, see the ledger details for concrete
examples of what determines the validity (wrt to a LedgerState) of a
transaction and/or block. Example properties include: a transaction's claimed
inputs exist and are still unspent, a block carries a sufficient
cryptographic signature, etc.
Instances
| Eq (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods (==) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (/=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # | |||||
| Ord (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Methods compare ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Ordering # (<) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (<=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (>) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # (>=) ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool # max ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) # min ∷ Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) # | |||||
| Generic (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
Methods from ∷ Validated (GenTx (SimpleBlock c ext)) → Rep (Validated (GenTx (SimpleBlock c ext))) x # to ∷ Rep (Validated (GenTx (SimpleBlock c ext))) x → Validated (GenTx (SimpleBlock c ext)) # | |||||
| Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) Source # | |||||
| Show (Validated (GenTx (SimpleBlock p c))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| NoThunks (Validated (GenTx (DualBlock m a))) Source # | |||||
| (Typeable p, Typeable c) ⇒ NoThunks (Validated (GenTx (SimpleBlock p c))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| type Rep (Validated (GenTx (HardForkBlock xs))) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (Validated (GenTx (HardForkBlock xs))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs)))) | |||||
| type Rep (Validated (GenTx (SimpleBlock c ext))) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
| newtype Validated (GenTx (HardForkBlock xs)) Source # | |||||
| data Validated (GenTx (DualBlock m a)) Source # | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data Validated (GenTx (DualBlock m a)) = ValidatedDualGenTx {
| |||||
| newtype Validated (GenTx (SimpleBlock c ext)) Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block newtype Validated (GenTx (SimpleBlock c ext)) = ValidatedSimpleGenTx {
| |||||
genTxSize ∷ GenTx (SimpleBlock c ext) → ByteSize32 Source #
mkSimpleGenTx ∷ Tx → GenTx (SimpleBlock c ext) Source #
Crypto
class (HashAlgorithm (SimpleHash c), Typeable c) ⇒ SimpleCrypto c Source #
Instances
| SimpleCrypto SimpleMockCrypto Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
| |||||
| SimpleCrypto SimpleStandardCrypto Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
| |||||
data SimpleMockCrypto Source #
Instances
| SimpleCrypto SimpleMockCrypto Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
| |||||||||
| (Serialise ext, Typeable ext) ⇒ ReconstructNestedCtxt Header (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods reconstructPrefixLen ∷ proxy (Header (MockBlock ext)) → PrefixLen Source # reconstructNestedCtxt ∷ proxy (Header (MockBlock ext)) → ShortByteString → SizeInBytes → SomeSecond (NestedCtxt Header) (MockBlock ext) Source # | |||||||||
| Typeable ext ⇒ SerialiseBlockQueryResult (MockBlock ext) BlockQuery Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) fp result → result → Encoding Source # decodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) fp result → ∀ s. Decoder s result Source # | |||||||||
| HasNetworkProtocolVersion (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Associated Types
| |||||||||
| (Serialise ext, Typeable ext, Serialise (MockLedgerConfig SimpleMockCrypto ext), MockProtocolSpecific SimpleMockCrypto ext) ⇒ SerialiseNodeToClientConstraints (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNodeConstraints (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods estimateBlockSize ∷ Header (MockBlock ext) → SizeInBytes Source # | |||||||||
| (Serialise ext, RunMockBlock SimpleMockCrypto ext) ⇒ SerialiseDiskConstraints (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||
| (Serialise ext, Typeable ext) ⇒ HasBinaryBlockInfo (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods getBinaryBlockInfo ∷ MockBlock ext → BinaryBlockInfo Source # | |||||||||
| SerialiseNodeToClient (MockBlock ext) SlotNo Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → SlotNo → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s SlotNo Source # | |||||||||
| SerialiseNodeToClient (MockBlock ext) (SomeBlockQuery (BlockQuery (MockBlock ext))) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → SomeBlockQuery (BlockQuery (MockBlock ext)) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (SomeBlockQuery (BlockQuery (MockBlock ext))) Source # | |||||||||
| SerialiseNodeToClient (MockBlock ext) (GenTx (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTx (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTx (MockBlock ext)) Source # | |||||||||
| SerialiseNodeToClient (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||||||
| Typeable ext ⇒ SerialiseNodeToClient (MockBlock ext) (MockError (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → MockError (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (MockError (MockBlock ext)) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToClient (MockBlock ext) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → MockBlock ext → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (MockBlock ext) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNode (MockBlock ext) (Header (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → Header (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (Header (MockBlock ext)) Source # | |||||||||
| SerialiseNodeToNode (MockBlock ext) (GenTx (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTx (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTx (MockBlock ext)) Source # | |||||||||
| SerialiseNodeToNode (MockBlock ext) (GenTxId (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → GenTxId (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (GenTxId (MockBlock ext)) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNode (MockBlock ext) (SerialisedHeader (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → SerialisedHeader (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (SerialisedHeader (MockBlock ext)) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ SerialiseNodeToNode (MockBlock ext) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → MockBlock ext → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (MockBlock ext) Source # | |||||||||
| Typeable ext ⇒ DecodeDisk (MockBlock ext) (AnnTip (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (AnnTip (MockBlock ext)) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDiskDep ∷ CodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → ∀ s. Decoder s (ByteString → a) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDiskDepIx ∷ CodecConfig (MockBlock ext) → Decoder s (SomeSecond (NestedCtxt Header) (MockBlock ext)) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDisk (MockBlock ext) (Header (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → Header (MockBlock ext) → Encoding Source # | |||||||||
| Typeable ext ⇒ EncodeDisk (MockBlock ext) (AnnTip (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → AnnTip (MockBlock ext) → Encoding Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDisk (MockBlock ext) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → MockBlock ext → Encoding Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDiskDep ∷ CodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → a → Encoding Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ EncodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDiskDepIx ∷ CodecConfig (MockBlock ext) → SomeSecond (NestedCtxt Header) (MockBlock ext) → Encoding Source # | |||||||||
| SerialiseNodeToClient (MockBlock ext) (Serialised (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → Serialised (MockBlock ext) → Encoding Source # decodeNodeToClient ∷ CodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → ∀ s. Decoder s (Serialised (MockBlock ext)) Source # | |||||||||
| SerialiseNodeToNode (MockBlock ext) (Serialised (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → Serialised (MockBlock ext) → Encoding Source # decodeNodeToNode ∷ CodecConfig (MockBlock ext) → BlockNodeToNodeVersion (MockBlock ext) → ∀ s. Decoder s (Serialised (MockBlock ext)) Source # | |||||||||
| Typeable ext ⇒ DecodeDisk (MockBlock ext) (LedgerState (MockBlock ext) EmptyMK) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (LedgerState (MockBlock ext) EmptyMK) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDisk (MockBlock ext) (ByteString → Either DecoderError (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteString → Either DecoderError (MockBlock ext)) Source # | |||||||||
| (Serialise ext, Typeable ext) ⇒ DecodeDisk (MockBlock ext) (ByteString → Header (MockBlock ext)) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods decodeDisk ∷ CodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteString → Header (MockBlock ext)) Source # | |||||||||
| Typeable ext ⇒ EncodeDisk (MockBlock ext) (LedgerState (MockBlock ext) EmptyMK) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation Methods encodeDisk ∷ CodecConfig (MockBlock ext) → LedgerState (MockBlock ext) EmptyMK → Encoding Source # | |||||||||
| NodeInitStorage (SimpleBlock SimpleMockCrypto ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node Methods nodeImmutableDbChunkInfo ∷ StorageConfig (SimpleBlock SimpleMockCrypto ext) → ChunkInfo Source # nodeCheckIntegrity ∷ StorageConfig (SimpleBlock SimpleMockCrypto ext) → SimpleBlock SimpleMockCrypto ext → Bool Source # nodeInitChainDB ∷ IOLike m ⇒ StorageConfig (SimpleBlock SimpleMockCrypto ext) → InitChainDB m (SimpleBlock SimpleMockCrypto ext) → m () Source # | |||||||||
| SupportedNetworkProtocolVersion (SimpleBlock SimpleMockCrypto ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node Methods supportedNodeToNodeVersions ∷ Proxy (SimpleBlock SimpleMockCrypto ext) → Map NodeToNodeVersion (BlockNodeToNodeVersion (SimpleBlock SimpleMockCrypto ext)) Source # supportedNodeToClientVersions ∷ Proxy (SimpleBlock SimpleMockCrypto ext) → Map NodeToClientVersion (BlockNodeToClientVersion (SimpleBlock SimpleMockCrypto ext)) Source # latestReleasedNodeVersion ∷ Proxy (SimpleBlock SimpleMockCrypto ext) → (Maybe NodeToNodeVersion, Maybe NodeToClientVersion) Source # | |||||||||
| (LedgerSupportsProtocol (SimpleBlock SimpleMockCrypto ext), Show (CannotForge (SimpleBlock SimpleMockCrypto ext)), Show (ForgeStateInfo (SimpleBlock SimpleMockCrypto ext)), Show (ForgeStateUpdateError (SimpleBlock SimpleMockCrypto ext)), Serialise ext, RunMockBlock SimpleMockCrypto ext, ChainDepStateSupportsPeras (ChainDepState (BlockProtocol (SimpleBlock SimpleMockCrypto ext))), ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol (SimpleBlock SimpleMockCrypto ext))))) ⇒ RunNode (SimpleBlock SimpleMockCrypto ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node | |||||||||
| type SimpleHash SimpleMockCrypto Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||||||
| type BlockNodeToClientVersion (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||
| type BlockNodeToNodeVersion (MockBlock ext) Source # | |||||||||
Defined in Ouroboros.Consensus.Mock.Node.Serialisation | |||||||||
data SimpleStandardCrypto Source #
Instances
| SimpleCrypto SimpleStandardCrypto Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block Associated Types
| |||||
| type SimpleHash SimpleStandardCrypto Source # | |||||
Defined in Ouroboros.Consensus.Mock.Ledger.Block | |||||
Serialisation
decodeSimpleHeader ∷ (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ (ext' → Encoding) → (∀ s. Decoder s ext') → ∀ s. Decoder s (Header (SimpleBlock' c ext ext')) Source #
encodeSimpleHeader ∷ (HashAlgorithm (SimpleHash c), Typeable c, Typeable ext) ⇒ (ext' → Encoding) → Header (SimpleBlock' c ext ext') → Encoding Source #
simpleBlockBinaryBlockInfo ∷ (SimpleCrypto c, Serialise ext', Typeable ext, Typeable ext') ⇒ SimpleBlock' c ext ext' → BinaryBlockInfo Source #