`MustBeErased` marker
- Lingua principale
- Rust
- Stelle
- 132
- Fork
- 167
- Merge medio
- 1g 23h
- PR unite (30g)
- 110
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.