`MustBeErased` marker
- 主要語言
- Rust
- 星號
- 132
- 分支
- 167
- 平均合併
- 1 天 23 小時
- 30 天內合併 PR
- 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 還沒有評估資料。