0xMiden / 0xMiden/protocol

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

Offen
#3,603 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
standards
Vorherrschende Sprache
Rust
Sterne
132
Forks
167
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
110

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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