Skip to content

feat: add verification service for flashblocks with metrics tracking for block reorgs #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jowparks
Copy link
Collaborator

@jowparks jowparks commented May 2, 2025

Flashblocks Verification Service

  • Added a verification service to validate flashblocks against chain data
  • Implemented transaction hash tracking and deduplication
  • Added comprehensive metrics tracking for block verification events:
    • Successful verifications
    • Failed verifications
    • Block not found in cache
    • Transaction count mismatches
  • Integrated verification with reth ExEx (Execute Extension) framework
  • Added new verification module with complete test coverage
  • Modified transaction processing to maintain ordered transaction hash lists

@jowparks jowparks force-pushed the block-reorg-verification branch from 9fcead6 to a9731b6 Compare May 2, 2025 21:05
@jowparks jowparks marked this pull request as ready for review May 2, 2025 22:33
@jowparks jowparks force-pushed the block-reorg-verification branch 2 times, most recently from 36ca8da to 48232cf Compare May 5, 2025 17:39
@jowparks jowparks force-pushed the block-reorg-verification branch from 48232cf to d2cf877 Compare May 13, 2025 00:03
@jowparks jowparks force-pushed the block-reorg-verification branch from d2cf877 to b8d109a Compare May 13, 2025 17:58
let chain_spec = builder.config().chain.clone();
let handle = builder
.with_types_and_provider::<OpNode, BlockchainProvider<_>>()
.with_components(op_node.components())
.with_add_ons(op_node.add_ons())
.on_component_initialized(move |_ctx| Ok(()))
.install_exex("flashblocks-verification", async move |ctx| {
Copy link
Collaborator

Choose a reason for hiding this comment

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

wondering if this should be optional and only enabled with a flag? wdyt?

let verification_service = VerificationService::new(cache);
while let Some(notification) = ctx.notifications.try_next().await? {
match &notification {
ExExNotification::ChainCommitted { new } => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this mean it gets triggered during historical syncing as well?
I think we probably only want it to start verifying when live syncing

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.

2 participants