Description
Description
Currently, the eth1 block cache holds a fixed size of block_cache_truncation
blocks in its cache. When casting an eth1 vote, we go through the block cache and filter blocks which aren't candidate blocks in the voting period.
However, with the new eth1 voting scheme, we know the range of eth1 blocks (based on their timestamp) which are candidate blocks for that current voting period.
We can use this info to only hold those candidate blocks in the block cache. This could reduce the number of blocks that we need to hold in the block cache from 4096 to ~ 1024 and also remove one layer of filtering of the blocks (filtering happens from eth1 chain -> block_cache, but no filtering required for block_cache -> block_production).
Steps to resolve
Modify the eth1 block cache to store only blocks which are candidate blocks for that eth1 voting period.