0xMiden / 0xMiden/protocol

`MustBeErased` marker

Aberta
#3,268 2 comentários 0 reações 0 responsáveis Ver no GitHub
fees
Linguagem predominante
Rust
Estrelas
132
Forks
167
Merge médio
1d 23h
PRs com merge (30d)
110

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.