Skip to content

Commit b51669d

Browse files
committed
Disable EBB generation in ChainDB q-s-m tests when k>2
1 parent a38b664 commit b51669d

File tree

1 file changed

+10
-1
lines changed
  • ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,16 @@ genBlk chunkInfo Model{..} =
16081608
noSavedGapBlocks = Map.null savedGapBlocks
16091609
withoutGapBlocks = fmap (,Persistent [])
16101610

1611-
modelSupportsEBBs = ImmutableDB.chunkInfoSupportsEBBs chunkInfo
1611+
k = unNonZero (maxRollbacks (configSecurityParam (unOpaque modelConfig)))
1612+
1613+
modelSupportsEBBs =
1614+
ImmutableDB.chunkInfoSupportsEBBs chunkInfo
1615+
-- NOTE: we disable the generation of EBBs entirely when k>2 to avoid
1616+
-- triggering an edge case caused by a mismatch between the model and
1617+
-- actual the implementation. For more information, see:
1618+
-- https://github.com/IntersectMBO/ouroboros-consensus/issues/1745
1619+
&& k <= 2
1620+
16121621
canContainEBB = const modelSupportsEBBs -- TODO: we could be more precise
16131622
genBody :: Gen TestBody
16141623
genBody = do

0 commit comments

Comments
 (0)