0xMiden / 0xMiden/node

Cache invalid transactions and batches for early rejection

Aperta
#1,993 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub
rpc
Lingua principale
Rust
Stelle
104
Fork
138
Merge medio
1g 13h
PR unite (30g)
56

Descrizione

As per https://github.com/0xMiden/node/pull/1846#discussion_r3018923960, it makes sense to keep a cache of invalid transactions and batches so that we don't repeatedly re-evaluate the same input.

While generating a proof is expensive, it only needs to be done once, whereas we may have to re-assess the same input many times without such a check.

> Separately, I wonder if we should keep some kind of an LRU cache for invalid batches/transactions. The attack vector here is that someone could generate a single proven tx/batch that references some invalid block, and then submit it many times. This way, they attacker pays the cost of generating the proof only once, but the node would be forced to verify it many times (maybe thousands) which may also include going to the store etc.

The original comment's concern was a valid proof but invalid reference block. #1992 would address this, so I wonder if this blacklist is truly a separate issue, or if #1992 could be considered a fix. @bobbinth - maybe I'm missing an angle?

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.