Skip to content

Commit d88a0e2

Browse files
Niolsneilmayhew
authored andcommitted
Document prop_blockFetchLeashingAttack
1 parent 689783e commit d88a0e2

File tree

1 file changed

+8
-0
lines changed
  • ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/Genesis/Tests

1 file changed

+8
-0
lines changed

ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/Genesis/Tests/Uniform.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ prop_downtime = forAllGenesisTest
421421
, pgpDowntime = DowntimeWithSecurityParam (gtSecurityParam gt)
422422
}
423423

424+
-- | Test that the block fetch leashing attack does not delay the immutable tip.
425+
-- This leashing attack consists in having adversarial peers that behave
426+
-- honestly when it comes to ChainSync but refuse to send blocks. A proper node
427+
-- under test should detect those behaviours as adversarial and find a way to
428+
-- make progress.
424429
prop_blockFetchLeashingAttack :: Property
425430
prop_blockFetchLeashingAttack =
426431
forAllGenesisTest
@@ -435,6 +440,9 @@ prop_blockFetchLeashingAttack =
435440
where
436441
genBlockFetchLeashingSchedule :: GenesisTest TestBlock () -> QC.Gen (PointSchedule TestBlock)
437442
genBlockFetchLeashingSchedule genesisTest = do
443+
-- A schedule with several honest peers and no adversaries. We will then
444+
-- keep one of those as honest and remove the block points from the
445+
-- others, hence producing one honest peer and several adversaries.
438446
PointSchedule {psSchedule} <-
439447
stToGen $
440448
uniformPoints

0 commit comments

Comments
 (0)