Skip to content

Conversation

@m-Peter
Copy link
Collaborator

@m-Peter m-Peter commented Jul 18, 2025

Description

Notable changes including back-porting #842 .


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Summary by CodeRabbit

  • New Features

    • Introduced experimental options for soft finality and sealing verification, allowing advanced event processing and validation.
    • Added new command-line flags to enable or disable these experimental features.
    • Implemented enhanced event hash storage and verification for improved data integrity.
    • Added new subscriber and verifier engines for advanced block and event tracking.
  • Bug Fixes

    • Improved error handling and messaging during trace collection and storage operations.
  • Chores

    • Enhanced Makefile output for better visibility during dependency checks.

m-Peter and others added 24 commits July 15, 2025 14:06
…d-transactions

Fix endpoint crashes due to non-replay protected EVM transactions
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
…ations

Fix transaction fee calculations to comply with `EIP-1559`
Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
…se-frequency

Improve release frequency for signing keys
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 18, 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.

Walkthrough

This update introduces experimental support for event sealing verification and soft finality in the event ingestion pipeline. It adds new configuration flags and storage mechanisms for event hashes, implements a sealing verifier engine, and provides a new block tracking subscriber. Several supporting changes enable persistent storage and retrieval of event hashes and related metadata.

Changes

File(s) Change Summary
Makefile Updated check-tidy target to add verbose output and streamline command sequence.
bootstrap/bootstrap.go Added EventsHash to Storages, integrated sealing verification and soft finality logic in event ingestion setup.
cmd/run/cmd.go, config/config.go Added two new experimental feature flags and corresponding config fields for soft finality and sealing verification.
services/ingestion/block_tracking_subscriber.go Introduced RPCBlockTrackingSubscriber for block/event tracking with optional sealing verification.
services/ingestion/sealing_verifier.go Added SealingVerifier engine for verifying unsealed and sealed event hashes, including persistent state tracking.
services/ingestion/engine.go Improved error handling in trace collection and storage logic.
services/requester/cross-spork_client.go Added methods to fetch events by block header and subscribe to block headers from a start height.
storage/pebble/db.go Added WithBatch function for atomic batch operations in storage.
storage/pebble/events_hash.go Added EventsHash struct for storing/retrieving event hashes and processed sealed heights.
storage/pebble/keys.go Added new key constants for event hash and sealed height storage.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Gateway
    participant Config
    participant Storages
    participant SealingVerifier
    participant BlockTrackingSubscriber
    participant AccessNode

    User->>Gateway: Start with experimental flags
    Gateway->>Config: Parse experimental flags
    Gateway->>Storages: Setup storage, including EventsHash
    Gateway->>SealingVerifier: Initialize if sealing verification enabled
    Gateway->>BlockTrackingSubscriber: Initialize with verifier if soft finality enabled
    BlockTrackingSubscriber->>AccessNode: Subscribe to block headers/events
    BlockTrackingSubscriber->>SealingVerifier: Add finalized block events
    SealingVerifier->>Storages: Store/retrieve event hashes
    SealingVerifier->>AccessNode: Subscribe to sealed events for verification
Loading

Possibly related PRs

  • onflow/flow-evm-gateway#772: Refactors keystore concurrency and interface, which is directly used in the new event subscriber and sealing verifier logic.

Suggested labels

Improvement, Feature

Suggested reviewers

  • peterargue
  • zhangchiqing

Poem

A rabbit hopped in code’s delight,
New hashes stored, events sealed tight.
With soft finality flags in tow,
The gateway’s streams now smarter flow.
Batch by batch, and block by block,
This bunny’s work is solid as rock!
🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@m-Peter m-Peter changed the base branch from main to mpeter/poc-index-finalized-block-results July 18, 2025 13:54
@peterargue peterargue merged commit 88e6d7e into mpeter/poc-index-finalized-block-results Jul 21, 2025
2 checks passed
@peterargue peterargue deleted the mpeter/soft-finality-sync-with-main branch July 21, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants