0xMiden / 0xMiden/node

Cache invalid transactions and batches for early rejection

Open
#1,993 9 comments 0 reactions 0 assignees View on GitHub
rpc
Dominant language
Rust
Stars
104
Forks
138
Avg merge
1d 13h
Merged PRs (30d)
56

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.