filecoin-project / filecoin-project/builtin-actors
Revisit invariant checks in all tests
- 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
Assessment
This issue has not been assessed yet.