ouroboros-consensus-0.28.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Storage.PerasCertDB.API

Synopsis

Documentation

data PerasCertDB (m ∷ TypeType) blk Source #

Constructors

PerasCertDB 

Fields

  • addCertValidatedPerasCert blk → m AddPerasCertResult

    Add a Peras certificate to the database. The result indicates whether the certificate was actually added, or if it was already present.

  • getWeightSnapshotSTM m (WithFingerprint (PerasWeightSnapshot blk))

    Return the Peras weights in order compare the current selection against potential candidate chains, namely the weights for blocks not older than the current immutable tip. It might contain weights for even older blocks if they have not yet been garbage-collected.

    The Fingerprint is updated every time a new certificate is added, but it stays the same when certificates are garbage-collected.

  • getCertSnapshotSTM m (PerasCertSnapshot blk)
     
  • garbageCollectSlotNo → m ()

    Garbage-collect state older than the given slot number.

  • closeDB ∷ m ()
     

Instances

Instances details
NoThunks (PerasCertDB m blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.PerasCertDB.API

PerasCertSnapshot

data PerasCertSnapshot blk Source #

Constructors

PerasCertSnapshot 

Fields

data PerasCertTicketNo Source #

A sequence number, incremented every time we receive a new certificate.

Note that we will usually receive certificates monotonically by round number, so round numbers could almost fulfill the role of ticket numbers. However, in certain edge cases (while catching up, or during cooldowns), this might not be true, such as during syncing or during cooldown periods. Therefore, for robustness, we choose to maintain dedicated ticket numbers separately.

Instances

Instances details
Enum PerasCertTicketNo Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.PerasCertDB.API

Show PerasCertTicketNo Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.PerasCertDB.API

Eq PerasCertTicketNo Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.PerasCertDB.API

Ord PerasCertTicketNo Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.PerasCertDB.API

NoThunks PerasCertTicketNo Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.PerasCertDB.API