You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to have a separate LRU cache to keep track of already decoded state witnesses. This is needed to prevent attacks on chunk validators by sending the same witness multiple times and making it apply chunks which can be resource-intensive.
This PR introduces a separate LRU cache to keep track already processes
state witnesses. Note that malformed witness (that couldn't be decoded
or decompressed) is also considered processed because we want to avoid
processing more parts for that chunk.
When we have enough witness parts the entry is removed from
`parts_cache` and added to `processed_witnesses`. This makes
`is_decoded` field in `CacheEntry` redundant since now `parts_cache`
only stores not-yet-decoded witnesses, so the field was removed.
This PR also includes a bit of refactoring such as getting rid of
`CacheEntry` `shard_id` field and removing/renaming metrics.
Closes#11302.
Part of #11193
We want to have a separate LRU cache to keep track of already decoded state witnesses. This is needed to prevent attacks on chunk validators by sending the same witness multiple times and making it apply chunks which can be resource-intensive.
Similar to #11111
Also see #11193 (comment)
The text was updated successfully, but these errors were encountered: