0xMiden / 0xMiden/miden-vm

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

Aperta
#3,486 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
merkle
Lingua principale
Rust
Stelle
772
Fork
352
Merge medio
1g 12h
PR unite (30g)
93

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.