Skip to content

Submitter: fix backfill clamping + misc RPC selection fixes#987

Merged
norswap merged 11 commits intomasterfrom
ns/fix-flaky-rpc
Jul 23, 2025
Merged

Submitter: fix backfill clamping + misc RPC selection fixes#987
norswap merged 11 commits intomasterfrom
ns/fix-flaky-rpc

Conversation

@norswap
Copy link
Copy Markdown
Collaborator

@norswap norswap commented Jul 23, 2025

Currently, our local node replica is fubared, it's lagging a few days behind the sequencer and making progress, albeit at a fraction of the normal pace.

This uncovered a bunch of interesting issues, and this is a first PR to address them.

  • First, it showed that the backfill logic, which normally gets clamped to a max number of blocks (15 by default) wasn't operating because of a dumb operator precedence issue.
  • Second, we didn't necessarily select an RPC that had made forward block progress during RPC selection.

This does not solve all the issues. We just haven't really considered this scenario where a RPC is live but largely trailing.

The main issue is not in the block subscription anymore, but in all the others RPC calls, which simply attempt to use the RPCs in the defined order, falling back in list order. The fix (for later) will be to implement a Viem client proxy that uses the RPC selected by the block service as its default block.

Copy link
Copy Markdown
Collaborator Author

norswap commented Jul 23, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@norswap norswap changed the title update comments Submitter: fix backfill clamping + misc RPC selection fixes Jul 23, 2025
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying happychain with  Cloudflare Pages  Cloudflare Pages

Latest commit: adeea56
Status: ✅  Deploy successful!
Preview URL: https://511df9ad.happychain.pages.dev
Branch Preview URL: https://ns-fix-flaky-rpc.happychain.pages.dev

View logs

@norswap norswap marked this pull request as ready for review July 23, 2025 10:26
@norswap norswap merged commit 0e51d32 into master Jul 23, 2025
4 checks passed
@norswap norswap deleted the ns/fix-flaky-rpc branch July 23, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant