Moduleouroboros-consensus-4.2.1.0
Ouroboros.Consensus.Storage.LedgerDB.API
- 21 types
- 2 classes
- 8 values
- Packageouroboros-consensus-4.2.1.0
- Exports31
- LicenceApache-2.0
Methods
upgradeTables :: l blk mk1 -> l blk mk2 -> LedgerTables blk ValuesMK -> LedgerTables blk ValuesMK
Instances3CanUpgradeLedgerTables
CanUpgradeLedgerTables LedgerState blk => CanUpgradeLedgerTables ExtLedgerState blkDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Ledger.Extended(CanHardFork xs, HasHardForkTxOut xs) => CanUpgradeLedgerTables LedgerState (HardForkBlock xs)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.HardFork.Combinator.Ledger · orphanCanUpgradeLedgerTables LedgerState (DualBlock m a)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Ledger.Dual
Constructors
InitDBinitFromGenesis :: !m dbinitFromSnapshot :: !DiskSnapshot -> m (Either (SnapshotFailure blk) (db, RealPoint blk))initReapplyBlock :: !LedgerDbCfg ExtLedgerState blk -> blk -> db -> m dbcurrentTip :: !db -> LedgerState blk EmptyMKmkLedgerDb :: !db -> m (LedgerDB' m blk, TestInternals' m blk)
Constructors
Instances4Eq, Show, Generic, Rep
StandardHash blk => Eq (InitLog blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIStandardHash blk => Show (InitLog blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIGeneric (InitLog blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APItype Rep (InitLog blk) = D1 ('MetaDataDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API"InitLog"
"Ouroboros.Consensus.Storage.LedgerDB.API"
"ouroboros-consensus-4.2.1.0-C9zVP0VXla2Fy4UJAsSSXt"
'False) (C1 ('MetaCons"InitFromGenesis"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"InitFromSnapshot"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiskSnapshot) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons"InitFailure"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiskSnapshot) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SnapshotFailure blk)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (InitLog blk))))))
Constructors
LedgerDBgetVolatileTip :: STM m (l blk EmptyMK)getImmutableTip :: STM m (l blk EmptyMK)getPastLedgerState :: Point blk -> STM m (Maybe (l blk EmptyMK))getHeaderStateHistory :: l ~ ExtLedgerState => STM m (HeaderStateHistory blk)openForkerAtTarget :: Target (Point blk) -> m (Either GetForkerError (Forker m l blk))validateFork :: (TraceValidateEvent blk -> m ()) -> BlockCache blk -> Word64 -> NonEmpty (Header blk) -> SuccessForkerAction m l blk -> m (ValidateResult l blk)getPrevApplied :: STM m (Set (RealPoint blk))garbageCollect :: SlotNo -> m ()tryTakeSnapshot :: m ()snapshotRequestQueue :: SnapshotRequestQueue mcloseDB :: m ()
Instances2NoThunks, HeaderHash
NoThunks (LedgerDB m l blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APItype HeaderHash (LedgerDB m l blk) = HeaderHash blkDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
Constructors
Instances3NoThunks, Generic, Rep
NoThunks (LedgerCfg l blk) => NoThunks (LedgerDbCfg l blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIGeneric (LedgerDbCfgF f l blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APItype Rep (LedgerDbCfgF f l blk) = D1 ('MetaDataDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API"LedgerDbCfgF"
"Ouroboros.Consensus.Storage.LedgerDB.API"
"ouroboros-consensus-4.2.1.0-C9zVP0VXla2Fy4UJAsSSXt"
'False) (C1 ('MetaCons"LedgerDbCfg"
'PrefixI 'True) (S1 ('MetaSel ('Just"ledgerDbCfgSecParam"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f SecurityParam)) :*: (S1 ('MetaSel ('Just"ledgerDbCfg"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f (LedgerCfg l blk))) :*: S1 ('MetaSel ('Just"ledgerDbCfgComputeLedgerEvents"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ComputeLedgerEvents))))
Constructors
Instances2Show, Exception
Show LedgerDbErrorDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIException LedgerDbErrorDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
Constructors
Instances1Show
Show LedgerDbPruneDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
type
type LedgerDbSerialiseConstraints blk = (Serialise (HeaderHash blk), EncodeDisk blk (LedgerState blk EmptyMK), DecodeDisk blk (LedgerState blk EmptyMK), EncodeDisk blk (AnnTip blk), DecodeDisk blk (AnnTip blk), EncodeDisk blk (ChainDepState (BlockProtocol blk)), DecodeDisk blk (ChainDepState (BlockProtocol blk)), IndexedMemPack LedgerState blk (TxOut blk), MemPack (TxIn blk), SerializeTablesWithHint LedgerState blk)Constructors
ReplayGoal (Point blk)
Instances2Eq, Show
StandardHash blk => Eq (ReplayGoal blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIStandardHash blk => Show (ReplayGoal blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
Constructors
ReplayStart (Point blk)
Instances2Eq, Show
StandardHash blk => Eq (ReplayStart blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIStandardHash blk => Show (ReplayStart blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
class
class StreamingBackend (m :: Type -> Type) backend (l :: Type -> (Type -> Type -> Type) -> Type) blk whereAssociated types
Instances1StreamingBackend
IOLike m => StreamingBackend m Mem l blkDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.V2.InMemory
Constructors
TestInternalswipeLedgerDB :: m ()takeSnapshotNOW :: WhereToTakeSnapshot -> Maybe String -> m ()push :: l blk DiffMK -> m ()reapplyThenPushNOW :: blk -> m ()truncateSnapshots :: m ()closeLedgerDB :: m ()getNumLedgerTablesHandles :: m Word64
Instances1NoThunks
NoThunks (TestInternals m l blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
Constructors
Instances2Eq, Show
(StandardHash blk, InspectLedger blk) => Eq (TraceReplayEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API(StandardHash blk, InspectLedger blk) => Show (TraceReplayEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
Constructors
ReplayedBlock (RealPoint blk) [LedgerEvent blk] (ReplayStart blk) (ReplayGoal blk)
Instances4Eq, Show, Generic, Rep
(InspectLedger blk, StandardHash blk) => Eq (TraceReplayProgressEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API(InspectLedger blk, StandardHash blk) => Show (TraceReplayProgressEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIGeneric (TraceReplayProgressEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APItype Rep (TraceReplayProgressEvent blk) = D1 ('MetaDataDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API"TraceReplayProgressEvent"
"Ouroboros.Consensus.Storage.LedgerDB.API"
"ouroboros-consensus-4.2.1.0-C9zVP0VXla2Fy4UJAsSSXt"
'False) (C1 ('MetaCons"ReplayedBlock"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LedgerEvent blk])) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ReplayStart blk)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ReplayGoal blk)))))
Constructors
Instances4Eq, Show, Generic, Rep
StandardHash blk => Eq (TraceReplayStartEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIStandardHash blk => Show (TraceReplayStartEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APIGeneric (TraceReplayStartEvent blk)Defined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.APItype Rep (TraceReplayStartEvent blk) = D1 ('MetaDataDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API"TraceReplayStartEvent"
"Ouroboros.Consensus.Storage.LedgerDB.API"
"ouroboros-consensus-4.2.1.0-C9zVP0VXla2Fy4UJAsSSXt"
'False) (C1 ('MetaCons"ReplayFromGenesis"
'PrefixI 'False) U1 :+: C1 ('MetaCons"ReplayFromSnapshot"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiskSnapshot) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ReplayStart blk))))
Instances1Eq
Eq WhereToTakeSnapshotDefined in ouroboros-consensus-4.2.1.0 · Ouroboros.Consensus.Storage.LedgerDB.API
type
type Yield (m :: Type -> Type) (l :: Type -> (Type -> Type -> Type) -> Type) blk = l blk EmptyMK -> (Stream (Of (TxIn blk, TxOut blk)) (ExceptT DeserialiseFailure m) (Stream (Of ByteString) m (Maybe CRC)) -> ExceptT DeserialiseFailure m (Stream (Of ByteString) m (Maybe CRC, Maybe CRC))) -> ExceptT DeserialiseFailure m (Maybe CRC, Maybe CRC)