0xMiden / 0xMiden/protocol

Refactor ad-hoc `miden::standards::note` module into final structure

Aperta
#3,603 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
standards
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

We should remove the temporarily introduced `crates/miden-standards/asm/standards/note/mod.masm` module and move these procedures to more appropriate locations:

- `input_note_get_storage` -> `miden::protocol::input_note::get_storage`
- As part of this, it would be good to move `active_note::write_storage_to_memory` to `miden::protocol::note` as it now applies to both input and active notes.
- `get_recipient_preimage` -> `miden::protocol::note::get_recipient_preimage`. It is a generic note procedure so it lands in `note`.
- Currently the procedure returns just script root and storage commitment, but we may want to make this procedure more complete and also return the serial number, so it is the full preimage.
- Alternatively, we call this something like `get_partial_recipient_preimage` to indicate it returns only part of the preimage. Most callers probably don't need the serial, so this may be preferable and leaves `get_recipient_preimage` for a future full-preimage implementation.
- `output_note_get_recipient_preimage` -> `miden::protocol::output_note::get_recipient_preimage`, which internally uses `note::get_recipient_preimage`.

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.