0xMiden / 0xMiden/protocol

Limit number of storage maps per account to 64

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

説明

As motivated in https://github.com/0xMiden/node/issues/2121#issuecomment-4527244793, we should limit the number of storage maps per account to 64.

For now, storage can only be set at account creation time, so we only need to assert this then. We can compute the number of storage maps in `$kernel::account::insert_new_storage` and assert it is <= 64.

On the Rust side, we should also validate this in `AccountStorage`. We can add a constant:

```rust
impl AccountStorage {
pub const MAX_NUM_STORAGE_MAPS: usize = 64;
}
```

And then add validation in `AccountStorage::new`.

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

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

評価

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

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

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