0xMiden / 0xMiden/miden-vm

`Smt` and `SimpleSmt`: Make generic over `T: AsRef<Word>`

未关闭
#3,486 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
merkle
主要语言
Rust
星标
772
派生
352
平均合并
1 天 12 小时
30 天内合并 PR
93

描述

Currently, `Smt` only supports values of type `Word`. It would be helpful to allow any type that basically wraps a `Word` (i.e. implements `AsRef`), so that we can use any methods on such type.

For example, in `miden-node`, we have an `Smt` for nullifiers. We would like to create a type `struct NullifierValue(Word)` which supports converting to/from `BlockNum`. We currently cannot implement such type, because we are forced to store `Word`s in the `Smt`. See [comment](https://github.com/0xPolygonMiden/miden-node/pull/266#discussion_r1517819779).

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。