0xMiden / 0xMiden/node

Cache invalid transactions and batches for early rejection

未关闭
#1,993 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
rpc
主要语言
Rust
星标
104
派生
138
平均合并
1 天 13 小时
30 天内合并 PR
56

描述

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?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。