Open bobbinth opened 6 months ago
For this PR, you should be able to follow the PR about StorageMaps
https://github.com/0xPolygonMiden/miden-base/pull/521
One potentially tricky thing would be to figure out which Rust struct to use as the "backing" type. We may not be able to use SimpleSmt
for this because the depth parameter is generic. So, we may need to create a new struct for this in miden-crypto
.
In #307 and #310 we implemented basic new account storage structure described in https://github.com/0xPolygonMiden/miden-base/issues/239#issuecomment-1791479475. Specifically, we have support for value types but not for maps or arrays.
We need to add support for arrays as well. This would make storage more efficient and flexible for use cases where a small-sh number of items needs to be index-accessible.
To support this on the kernel side, we need to add two procedures to the kernel API:
We also need to add support for maps to
AccountStorage
as well asDataStore
trait inmiden-tx
. The backing data structure for this is probably going to be Simple SMT.