builtin-actors
builtin-actors copied to clipboard
Unify invariants checking with version in go-state-types
@rvagg identified a big issue here: https://github.com/filecoin-project/builtin-actors/pull/1540#discussion_r1618121222
We should have one version of state invariants in rust maintainted here. There are two steps to this work
- 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.
- 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.
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.
An alternative is to FFI the other way around:
- Make a small rust crate that builds badger and exposes the relevant methods over FFI.
- 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.