0xMiden / 0xMiden/protocol

`MustBeErased` marker

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

説明

The marker was described in https://github.com/0xMiden/protocol/discussions/2899 together with other protocol changes. This issue mostly pulls out the relevant parts for the marker

### Summary
To support `FeeNote` we enhance the current mechanism of erasable notes. Specifically, we add an optional `MustBeErased` marker on output notes, which serves two purposes:
- its presence changes the fee computation (not inserted into the note tree, no long-term onchain storage)
- transactions which include non-erased notes with the marker are rejected in the batch kernel*
This marker, combined with a simple analysis of batch builder incentives guarantees erasure of the `FeeNote` at the batch level.

---

*I wonder if we can skip this check in the batch kernel, because the batch-builder incentives would already soft-enforce this. Specifically, if the builder includes the tx with, but fails to erase, the MustBeErased-note, then they will end up paying out-of-pocket for the difference between the tx-kernel-computed lower expected_output_notes and whatever the batch kernel actually computes, which is total_output_notes.

So first of all, the batch builder will want to collect the fee from FeeNote, but if for some reason they decide not to, they will actually be penalized for it.

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

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

評価

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

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

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