cosmos / interchain-security

Replicated security (aka interchain security V1) is an open sourced IBC application which allows cosmos blockchains to lease their proof-of-stake security to one another.
https://cosmos.github.io/interchain-security/
Other
152 stars 108 forks source link

PBT: Write ADR for property-based testing #1987

Open p-offtermatt opened 1 week ago

p-offtermatt commented 1 week ago

Problem

Our current tests on ICS are mostly manually written, which necessarily means they can only cover scenarios that a human has come up with. We want a form of randomized tests that test invariants/correctness properties.

Closing criteria

We have an ADR for the infrastructure for Property-Based Testing.

Problem details

Previous approaches for this problem include difftesting and MBT. The downside of those approaches is that they need a re-implementation of the system-under-test.

Instead, we want to do property-based testing, where only correctness properties have to be written.

p-offtermatt commented 1 week ago

Keeping some notes for the ADR here:

We need 4 components for PBT:

It might be possible to reuse many things from the cosmos sdk simulator and the existing MBT driver utilizing ibc-go. Potentially, the best way to frame this is to expand the Cosmos SDK simulator with capability for multi-chain interactions.