filecoin-project / filecoin-project/builtin-actors

Revisit invariant checks in all tests

Open
#478 1 comment 0 reactions 0 assignees View on GitHub
good first issue testing
Dominant language
Rust
Stars
96
Forks
94
Avg merge
6d 17h
Merged PRs (30d)
3

Description

Most of the tests, both crate and ITGs, should include invariant checks at the end, either asserting that everything is passing or that certain invariants are broken (and only them).

While porting tests from Go we might have missed some, either because they were not in the original implementation (but we can improve it here) or just by chance / missed additional tests when rebasing / anything else.

This task is to revisit all of them (writing a script to check where we lack such a check may be useful) and add the check if relevant. If the check is failing, it should fail exactly where we expect it to.

Another idea is to add a customizable destructor in e.g. `MockRuntime` with a call to proper invariant check. Or a procedural macro. This would reduce code bloat but perhaps we want to keep it explicit.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.