sigp / lighthouse

Ethereum consensus client in Rust
https://lighthouse.sigmaprime.io/
Apache License 2.0
2.81k stars 696 forks source link

Bound max count of lookups #6015

Open dapplion opened 3 days ago

dapplion commented 3 days ago

Issue Addressed

Lookups contain untrusted data, including blocks that have not yet been validated. In case of bugs or malicious activity we want to bound how much memory these lookups can consume. Aprox the max size of a lookup is ~ 10 MB (current max size of gossip and RPC blocks). 200 lookups can take at most 2 GB. 200 lookups allow 3 parallel chains of depth 64 (current maximum).

Proposed Changes