0xMiden / 0xMiden/protocol

Avoid storing storage map entries under map root advice map key

Đang mở
#2,028 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
kernels
Ngôn ngữ chính
Rust
Star
132
Fork
167
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
110

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.