Skip to content

revive: Skip redundant eth_block_hash RPC call in block subscription#11476

Merged
EgrPrty merged 2 commits intounstable2507from
pg/skip-redundant-eth-block-hash-rpc-2507
Mar 25, 2026
Merged

revive: Skip redundant eth_block_hash RPC call in block subscription#11476
EgrPrty merged 2 commits intounstable2507from
pg/skip-redundant-eth-block-hash-rpc-2507

Conversation

@pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Mar 24, 2026

backport #11475

  • skip one cache call
  • add some extra logs

insert_block_receipts already receives the ethereum block hash from the
caller (via eth_block().hash), but extract_from_block was fetching it
again via a separate state_call RPC. This redundant call occasionally
stalls for 10-20s on public RPC nodes, causing the block cache to fall
behind and the health check to report out-of-sync.

Add extract_from_block_with_eth_hash that accepts a pre-fetched hash,
and use it from insert_block_receipts. The original extract_from_block
still fetches the hash for callers that don't have it.
@pgherveou pgherveou requested a review from a team as a code owner March 24, 2026 09:31
@pgherveou pgherveou force-pushed the pg/skip-redundant-eth-block-hash-rpc-2507 branch from 85a0aa0 to 9195d1d Compare March 24, 2026 09:32
@pgherveou pgherveou added the T7-smart_contracts This PR/Issue is related to smart contracts. label Mar 24, 2026
@pgherveou pgherveou enabled auto-merge (squash) March 24, 2026 15:25
@EgrPrty EgrPrty disabled auto-merge March 25, 2026 07:21
@EgrPrty EgrPrty merged commit fb5779d into unstable2507 Mar 25, 2026
301 of 318 checks passed
@EgrPrty EgrPrty deleted the pg/skip-redundant-eth-block-hash-rpc-2507 branch March 25, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants