ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.ObjectPool.PerasVote

Description

Instantiate ObjectPoolReader and ObjectPoolWriter using Peras votes from the PerasVoteDB (or the ChainDB which is wrapping the PerasVoteDB).

Synopsis

Documentation

makePerasVotePoolWriterFromVoteDB Source #

Arguments

∷ ∀ blk (m ∷ TypeType). (StandardHash blk, IOLike m) 
SystemTime m 
STM m PerasVoteStakeDistr

This is needed for validating votes (since it is during the validation of votes that we give them a verified weight. In the future, we won't read it from the stake distr directly, but rather use the committee selection data)

PerasVoteDB m blk 
ObjectPoolWriter (PerasVoteId blk) (PerasVote blk) m 

Create a pool writer directly from a PerasVoteDB. In particular, the result of addVote is ignored, so any produced cert will have to be handled manually by another mean. This function is mostly meant for tests against the PerasVoteDB in isolation; for actual production use, see makePerasVotePoolWriterFromChainDB which creates a pool writer from the ChainDB and thus properly handles the produced certs.

makePerasVotePoolWriterFromChainDB Source #

Arguments

∷ ∀ blk (m ∷ TypeType). (StandardHash blk, IOLike m) 
SystemTime m 
STM m PerasVoteStakeDistr

This is needed for validating votes (since its during the validation of votes that we give them a verified weight. In the future, we won't read it from the stake distr directly, but rather use the committee selection data)

ChainDB m blk 
ObjectPoolWriter (PerasVoteId blk) (PerasVote blk) m 

Create a pool writer from the ChainDB. This properly handles the produced certs by letting the ChainDB take care of them (see addPerasVoteWithAsyncCertHandling).