Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Epic]: invariant checking #15706

Closed
2 tasks
tac0turtle opened this issue Apr 5, 2023 · 1 comment
Closed
2 tasks

[Epic]: invariant checking #15706

tac0turtle opened this issue Apr 5, 2023 · 1 comment

Comments

@tac0turtle
Copy link
Member

Summary

Invariants were used in the early days of cosmos in order to test and identify bugs in staking and other modules. This later got repurposed into the crisis module and is treated as a safety feature. The core issue with the crisis module is it intends to halt the chain if the invariant is broken, but in cases where invariants are broken it does not mean that the chain should halt. In these scenarios it is enough for the chain to recover the wrong state in a future upgrade

Secondly there is a new module landing (circuit) that could disable code paths therefore staying alive but also staying safe. This is important as more chains come on line and support more businesses. We dont want chains to have operating hours.

Thirdly, the crisis module will not halt a chain if an invariant is broken making the module only a way to check invariants.

Problem Definition

Invariants currently are not safe and performant, a new strategy should be created to run invariants.

Work Breakdown

  • Define new way to check invariants
  • Implement needed changes.
@likhita-809
Copy link
Contributor

likhita-809 commented Jun 15, 2023

As mentioned in ADR-067, we'll be having a simulator which provides validity predicates which ensures invariants behaviour . So that, there won't be the old behaviour of invariants in production (halting on broken invariant). This work is binded with simulations work and hence there is no need of a new strategy for checking invariants.
ref: #16400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@tac0turtle @likhita-809 and others