filecoin-project / ref-fvm

Reference implementation of the Filecoin Virtual Machine
https://fvm.filecoin.io/
Other
377 stars 134 forks source link

Lazy (H)AMT value decoding #321

Open Stebalien opened 2 years ago

Stebalien commented 2 years ago

Currently, our rust HAMT and AMT implementations eagerly decode. Unfortunately:

  1. This means we need to eagerly decode everything (and re-encode on save).
  2. This causes what appears to be a significant amount of code bloat as HAMT and AMT internals now need to be monomorphized on a per-value-type basis. If we instead decoded into some form of "deferred" object (as we currently do in go), the core HAMT & AMT code could be value (and even key) agnostic.
raulk commented 2 years ago

@Stebalien P3 + Phase 1 basically means it's not going to happen. We are moving this to Phase 2 and can bump the priority. Please shout if you wanna oppose!

Stebalien commented 2 years ago

This is not an immediate priority.