Reduce clones and cleanup in block cache path (#6431)
* node: Migrate check_blocks to use typed blocks() Use the typed `blocks()` method instead of `blocks_as_json()` so that block comparisons go through the same alloy serialization on both the cached and provider sides. This gives a fairer diff by normalizing both blocks through the same types, and only compares the block data (without receipts) since `eth_getBlockByHash` does not return receipts. * graph, store: Remove blocks_as_json from ChainStore trait All callers now use the typed `blocks()` method. The resolver serializes the CachedBlock to JSON at the GraphQL boundary. This eliminates the separate raw-JSON code path from the trait. * graph: Wrap LightEthereumBlock in Arc inside CachedBlock Arc-wrap the Light variant to avoid expensive deep clones of AnyBlock. into_light_block now borrows self and returns Arc via cheap refcount bumps. * graph: Inline EthereumJsonBlock into CachedBlock::from_json Remove the single-consumer EthereumJsonBlock wrapper and inline its deserialization and patching logic directly into CachedBlock::from_json. * graph: Rename to_light_block, add to_json on CachedBlock
K
Krishnanand V P committed
019c4c04167e3ee2e522b3f8a8aa5faa6e1159b9
Parent: c97f92a
Committed by GitHub <noreply@github.com>
on 3/11/2026, 9:42:35 AM