0xMiden / 0xMiden/miden-vm

`ValuePath`: make generic over leaf value

Open
#3,483 0 comments 0 reactions 0 assignees View on GitHub
merkle
Dominant language
Rust
Stars
772
Forks
352
Avg merge
1d 12h
Merged PRs (30d)
93

Description

[`ValuePath`](https://github.com/0xPolygonMiden/crypto/blob/c86bdc6d515046513a86ec331da5a0f77fd29cf2/src/merkle/path.rs#L166-L171) currently assumes that only one `Value` is stored at a Merkle Tree's leaf. This is not always true - see `TieredSmt` and `Smt`.

We should

- Rename to `LeafPath`
- Make `LeafPath` generic over the leaf type
- Use `LeafPath` in `SparseMerkleTree::Opening`'s [trait bound](https://github.com/0xPolygonMiden/crypto/blob/88797c393777c220089378a1b183c006effd98ae/src/merkle/smt/mod.rs#L55)

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.