0xMiden / 0xMiden/protocol

Avoid storing storage map entries under map root advice map key

オープン
#2,028 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
kernels
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。