0xMiden / 0xMiden/node

Refactor RPC messages to query storage maps by slot ID instead of name

未關閉
#1,444 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
rpc store
主要語言
Rust
星號
104
分支
138
平均合併
1 天 13 小時
30 天內合併 PR
56

描述

A `StorageSlotName` contains both a `String` that uniquely identifies a slot, as well as a `StorageSlotId`, that is derived (hashed) from the name.

It may make sense to change RPC queries to request slots by slot ID instead of slot name, under the assumption that querying by slot ID would be more efficient (should be validated).

I'm not sure if this applies to basically whever we use a `slot_name` in `rpc.proto` or just for requests like `MapEntries` and `StorageMapDetailRequest`.

This then requires changing the DB schema to also index by slot ID and include the slot ID next to the slot name in the `account_storage_map_values` table.

Context:
- https://github.com/0xMiden/miden-node/pull/1440#discussion_r2605465555
- https://github.com/0xMiden/miden-node/pull/1440#discussion_r2605477023

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。