consensus-test
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Consensus.MiniProtocol.BlockFetch.Client

Description

A test for the consensus-specific parts of the BlockFetch client.

When adding a block to the ChainDB, we allocate potential punishments, which are later invoked after block validation, crucially allowing us to kill the BlockFetch client and hence disconnect from malicious peers.

This test spins up several BlockFetch clients, which download randomly generated chains and add them to the ChainDB, which will enact these punishments on validation. Right now, we only ensure that doing so for chains originating from honest behavior do not cause any disconnects, but we plan to also model malicious/erroneous behavior.

Documentation