0xMiden / 0xMiden/protocol

Validate transaction fee in batch

Aperta
#1,689 1 commento 1 reazione 0 assegnatari Vedi su GitHub
fees kernels
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

After the initial fee implementation, the `FEE_ASSET` is essentially completely burned because the batches and blocks don't do anything with it.

While burning is fine for now (until batches and blocks claim the tip part), a batch should validate that a transaction's fees are sufficient by recalculating the required fee for the transaction and checking it against `FEE_ASSET`.

This function can be used for that and should be implemented on both `ExecutedTransaction` and `ProvenTransaction` and not behind `testing`:

https://github.com/0xMiden/miden-base/blob/634d9785914ffb3695042ec72f03ddd469f7f842/crates/miden-objects/src/testing/tx.rs#L5-L11

After this issue, we can consider continuing with validating batch fees in the block, but this issue only covers the above.

Broken out of #1673.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.