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

Unify invariants checking with version in go-state-types #1550

Open
ZenGround0 opened this issue Jun 4, 2024 · 2 comments
Open

Unify invariants checking with version in go-state-types #1550

ZenGround0 opened this issue Jun 4, 2024 · 2 comments
Milestone

Comments

@ZenGround0
Copy link
Contributor

@rvagg identified a big issue here: #1540 (comment)

We should have one version of state invariants in rust maintainted here. There are two steps to this work

  1. Go through go-state-types go invariants and make sure all invariants in go are reflected in rust code. I expect they have differed fairly significantly in the last two years.
  2. In a lotus-shed or other utility (maybe even a lotus developer cli command?) hook up the rust invariants on an ffi blockstore and run them.

Running go invariants and comparing with step 2 will probably be helpful for identifying diff in the invariants implemented in both.

@rjan90 rjan90 added this to FilOz Jun 4, 2024
@rjan90 rjan90 moved this to 🐱Todo in FilOz Jun 4, 2024
@rjan90 rjan90 moved this from 🐱Todo to 📌 Triage in FilOz Jun 4, 2024
@ZenGround0
Copy link
Contributor Author

From @Stebalien

  • No significant blockers, just some unhappiness causing work involving the ffi and learning the quirks of fvm blockstore registration
  • We should build filecoin-ffi with invariants in production. Making it optional will make running unnecessarily difficult.

@Stebalien
Copy link
Member

An alternative is to FFI the other way around:

  1. Make a small rust crate that builds badger and exposes the relevant methods over FFI.
  2. Do this all in rust land. See https://github.com/oligamiq/ffi-rust-go/ as an example.

If we do it this way, we can bypass lotus entirely which may end up with a nicer result. On the other hand, it's probably more work.

@rjan90 rjan90 added this to the DX-Streamline milestone Jun 4, 2024
@anorth anorth changed the title One invariants checker not two Unify invariants checking with version in go-state-types Jun 4, 2024
@rjan90 rjan90 removed the status in FilOz Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants