0xMiden / 0xMiden/protocol

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

Đang mở
#3,603 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
standards
Ngôn ngữ chính
Rust
Star
132
Fork
167
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
110

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.