0xMiden / 0xMiden/protocol

`MustBeErased` marker

Ouverte
#3,268 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
fees
Langage dominant
Rust
Étoiles
132
Forks
167
Merge moyen
1 j 23 h
PR mergées (30 j)
110

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.