0xMiden / 0xMiden/protocol

Avoid storing storage map entries under map root advice map key

Offen
#2,028 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
kernels
Vorherrschende Sprache
Rust
Sterne
132
Forks
167
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
110

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.