0xMiden / 0xMiden/protocol

Clean up note script minify and compact APIs

Aberta
#3,196 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
132
Forks
167
Merge médio
1d 23h
PRs com merge (30d)
110

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.