ref-fvm
ref-fvm copied to clipboard
Keep track of "dirty" actors in the state tree
Currently, when we read an actor, we stick it in the state-tree cache. But that means we try to write it back to the blockstore at the end of the block, even if it hasn't changed.
We should add a dirty bit to to the cache so we don't do this.
Specifically, we need to distinguish between dirty and just "cached" in:
https://github.com/filecoin-project/ref-fvm/blob/6f3db40ad7108e27146d0b9efdf7c64107507839/fvm/src/state_tree.rs#L306
and
https://github.com/filecoin-project/ref-fvm/blob/6f3db40ad7108e27146d0b9efdf7c64107507839/fvm/src/state_tree.rs#L326
Furthermore, we should be caching "nonexistence".
@mriise this was assigned to you. Do you plan on acting on it, or should we reassign?