0xMiden / 0xMiden/rust-sdk

`InOrderIndex::idx` is `usize`

Open
#1,691 1 comment 0 reactions 0 assignees View on GitHub
blocked question
Dominant language
Rust
Stars
78
Forks
129
Avg merge
4d 14h
Merged PRs (30d)
52

Description

We want to compile the client to both WASM environments and native environments. The blockchain MMR is designed to have `u32::MAX` leaves, which makes the max `idx` of `InOrderIndex` go over that limit.
In WASM, `usize` is 32-bit so we are inherently limited when we need to store/retrieve nodes from the database.
This is something to tackle upstream on the crypto crate, but AFAIK, this doesn't block us for the next ~2^31 blocks which is many years away. Still, adding this issue for visibility (and see if anyone has any comments).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.