Avoid storing storage map entries under map root advice map key
- Lenguaje dominante
- Rust
- Estrellas
- 132
- Forks
- 167
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 110
Descripción
In https://github.com/0xMiden/miden-base/pull/1896, the account delta was changed so it can represent the state of an entire, new account. In order for the delta to represent the entire state, all entries of all storage maps must be present in the delta. This means, all entries need to be inserted into the in-kernel delta during account creation.
The choice in that PR was to have the advice map contain each map's entries like this: `STORAGE_MAP_ROOT |-> [MAP ENTRIES]`. Using the storage map root is convenient, because it is easily accessible in MASM, but using the root as the key is not ideal, because the usual rule we follow for advice map entries is that the entries sequential hash should match they advice map key.
A couple of alternatives were mentioned here https://github.com/0xMiden/miden-base/pull/1896#discussion_r2435057079, but the best approach would be to avoid the advice map entirely and push the entries onto the advice stack when a certain event is triggered.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.