Crate penumbra_mock_consensus

source ·
Expand description

penumbra-mock-consensus is a library for testing consensus-driven ABCI applications.


This library provides facilities that can act as a stand-in for consensus engines like CometBFT or Tendermint in integration tests.

Testing applications using a mock consensus engine has many benefits. For example, this allows integration test cases to run as fast as possible, without needing wait real wall-clock time for blocks to be generated, or for integration test cases to exercise slashing logic related to byzantine misbehavior (e.g., double-signing).

This library is agnostic with respect to the replicable state transition machine that it is used to test. This means that, while it may be used to write integration tests for the Penumbra network, it can also be used to test other decentralized applications.

See TestNode for more information about using penumbra-mock-consensus.


Projects implemented in Go may wish to consider using CometMock. penumbra-mock-consensus is primarily oriented towards projects implemented in Rust that wish to use cargo test or cargo nextest as a test-runner.



Type Aliases§

  • A type alias for the TestNode::on_block callback.