Skip to content

Conversation

@fridrik01
Copy link
Contributor

@fridrik01 fridrik01 commented Dec 30, 2025

This PR overrides local_pending_state() in LoadPendingBlock to return flashblock state for pending block tag queries. This enables all state-reading RPC methods (eth_getBalance, eth_getTransactionCount, etc.) to return in-progress flashblock data while "latest" continues to return finalized state

@fridrik01 fridrik01 requested a review from calbera December 30, 2025 16:27
@fridrik01 fridrik01 self-assigned this Dec 30, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 30, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@rezzmah rezzmah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe the better approach is to override the impl of

impl<N, Rpc> LoadPendingBlock for BerachainApi<N, Rpc>

e.g. see https://github.com/paradigmxyz/reth/blob/5b21aa18ce0d6a3693fc2606b9452c03374c598a/crates/optimism/rpc/src/eth/pending_block.rs#L41

this will then implicitly propagate to method like get_balance

@fridrik01 fridrik01 force-pushed the fridrik01/flashblock-get-balance branch from d43f172 to 54a2fe1 Compare January 7, 2026 16:17
@fridrik01 fridrik01 changed the title feat(rpc): add eth_getBalance override for flashblock pending state feat(rpc): return flashblock state for pending block queries Jan 7, 2026
@fridrik01 fridrik01 marked this pull request as ready for review January 7, 2026 16:46
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.

3 participants