0xMiden / 0xMiden/node

Cache invalid transactions and batches for early rejection

Abierto
#1,993 9 comentarios 0 reacciones 0 asignados Ver en GitHub
rpc
Lenguaje dominante
Rust
Estrellas
104
Forks
138
Merge medio
1 d 13 h
PR fusionados (30 d)
56

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.