0xMiden / 0xMiden/protocol

Clean up note script minify and compact APIs

オープン
#3,196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。