0xMiden / 0xMiden/protocol

Insert/Pop key to the `MAP_VALUE_STORAGE_SLOT`

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

説明

### Feature description

Related to the issue comment that I have described here: https://github.com/OpenZeppelin/miden-confidential-contracts/discussions/37#discussioncomment-15341691

Is it possible to add a kernel level procedure which insert/pop a key-value pair to a `MAP_VALUE_STORAGE_SLOT`

### Why is this feature needed?

Assume that we have the following map value slots, which are using the same key values such as `faucet_id`

```
# map entries: [faucet_id, 0, 0] => [amount_0, amount_1, amount_2, 0]
const.PER_FAUCET_AMOUNT_LIMITS_MAP_SLOT = 0

# map entries: [faucet_id, 0, 0] => [amount_spent_in_epoch, epoch_last_spent, limit_block, running_sum]
const.PER_FAUCET_SPENDING_TRACKER_MAP_SLOT = 1
```

Updating this requires to call these two procedures together by getting the keys from the advice provider for both of them. It also makes the things more complicated for the propose/execute logic for timelocked accounts

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

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

評価

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

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

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