ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Ouroboros.Storage.PerasVoteDB.StateMachine

Synopsis

Documentation

Reusable generators

genVoterIdGen PerasVoterId Source #

Generate a random PerasVoterId.

We want to force collisions when adding votes, so we need to restrict the key space a lot here. Otherwise we might never hit the case where the same voter casts two votes for the same round/block.

genVoteStakeGen PerasVoteStake Source #

Generate a random PerasVoteStake.

Make it so that we always require multiple votes to reach a quorum. This is assuming a quorum threshold strictly larger than 50%, which is a very conservative assumption for Peras.