Skip to content

Commit f119442

Browse files
committed
Better documentation for equivocating certs in statemachine tests
1 parent 74c2ff9 commit f119442

File tree

1 file changed

+4
-1
lines changed
  • ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/PerasCertDB

1 file changed

+4
-1
lines changed

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/PerasCertDB/StateMachine.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ instance StateModel Model where
116116
action ->
117117
model.open && case action of
118118
CloseDB -> True
119-
-- Do not add equivocating certificates.
119+
-- Equivocating certificates are not possible by construction,
120+
-- so we should ensure that adding a certificate with the same round
121+
-- number but different content is rejected.
122+
-- See https://tweag.github.io/cardano-peras/peras-design.pdf#subsection.2.2.2
120123
AddCert cert -> all p model.certs
121124
where
122125
p cert' = getPerasCertRound cert /= getPerasCertRound cert' || cert == cert'

0 commit comments

Comments
 (0)