Clean up note script minify and compact APIs
- Langage dominant
- Rust
- Étoiles
- 132
- Forks
- 167
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 110
Description
#3146 moved debug info out of `MastForest`. That changed what note script compaction means.
Motivating PR comments:
- https://github.com/0xMiden/protocol/pull/3146#discussion_r3515743236
- https://github.com/0xMiden/protocol/pull/3146#discussion_r3516237946
The old names now confuse two things:
- compacting the MAST forest.
- dropping package debug info.
The main paths are:
- [`crates/miden-protocol/src/note/script.rs`](https://github.com/0xMiden/protocol/blob/2432a082e53c7e16b2885c8ee42e05489480358c/crates/miden-protocol/src/note/script.rs#L238-L266) has `compact()` and the deprecated `clear_debug_info()` wrapper. The compact API changed in #3146, so this permalink points at the PR head.
- [`crates/miden-protocol/src/note/recipient.rs`](https://github.com/0xMiden/protocol/blob/2432a082e53c7e16b2885c8ee42e05489480358c/crates/miden-protocol/src/note/recipient.rs#L67-L70), [`crates/miden-protocol/src/note/details.rs`](https://github.com/0xMiden/protocol/blob/2432a082e53c7e16b2885c8ee42e05489480358c/crates/miden-protocol/src/note/details.rs#L70-L73), and [`crates/miden-protocol/src/note/mod.rs`](https://github.com/0xMiden/protocol/blob/2432a082e53c7e16b2885c8ee42e05489480358c/crates/miden-protocol/src/note/mod.rs#L197-L200) forward `minify_script()`.
- [`crates/miden-protocol/src/transaction/outputs/notes.rs`](https://github.com/0xMiden/protocol/blob/2432a082e53c7e16b2885c8ee42e05489480358c/crates/miden-protocol/src/transaction/outputs/notes.rs#L497-L501) calls `minify_script()` before checking the note size.
Please remove or rename the old `minify_script` and `clear_debug_info` surface.
Keep one clear API for compacting a note script MAST forest. Make any debug info drop explicit.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.