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
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
0 commit comments