0xMiden / 0xMiden/miden-vm

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

Offen
#3,486 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
merkle
Vorherrschende Sprache
Rust
Sterne
772
Forks
352
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
93

Beschreibung

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).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.