Skip to content

Conversation

@niran
Copy link
Contributor

@niran niran commented Jan 11, 2026

Summary

  • Adds flashblocks-e2e binary for end-to-end regression testing of flashblocks RPC
  • Creates testing/e2e library crate with reusable test infrastructure
  • Includes 22 tests across 7 categories: blocks, call, receipts, logs, sanity, metering, contracts

Architecture

bin/flashblocks-e2e/     # Minimal CLI shim
testing/e2e/             # Reusable library
├── client.rs            # TestClient for RPC interactions
├── harness.rs           # FlashblockHarness for pending state testing
├── types.rs             # MeterBundle*, Flashblock* types
├── runner.rs            # Test execution + output formatting
└── tests/               # Test definitions

Usage

# Run all tests
flashblocks-e2e --rpc-url https://... --flashblocks-ws-url wss://...

# List tests
flashblocks-e2e --list

# Filter tests
flashblocks-e2e --filter "flashblock*"

# JSON output for CI
flashblocks-e2e --format json

Test plan

  • cargo check -p base-e2e -p flashblocks-e2e
  • cargo clippy -p base-e2e -p flashblocks-e2e -- -D warnings
  • Verified against live Base mainnet dev node (14/14 runnable tests pass)

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 11, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

danyalprout pushed a commit that referenced this pull request Jan 11, 2026
* fix flashblocks timing and tests

* formatting
danyalprout pushed a commit that referenced this pull request Jan 11, 2026
* fix flashblocks timing and tests

* formatting
Copy link
Collaborator

@haardikk21 haardikk21 left a comment

Choose a reason for hiding this comment

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

Some comments

Also a question more generally - what's the intention with this CLI? I may have missed the memo on this but is this something we're gonna run manually against dev nodes to try out things or something?

my prev understanding was its aiming to set the stage a bit for automated devnet-style testing of changes per-PR/pre-release, but then I don't really get the need for the CLI and instead have other things in mind that need to be addressed first.

Comment on lines +21 to +31
Test {
name: "get_latest_block".to_string(),
description: Some("Verify we can retrieve the latest block".to_string()),
run: Box::new(|client| Box::pin(test_get_latest_block(client))),
skip_if: None,
},
Test {
name: "get_pending_block".to_string(),
description: Some("Verify we can retrieve the pending block".to_string()),
run: Box::new(|client| Box::pin(test_get_pending_block(client))),
skip_if: None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

non-blocking nit but this seems like the perfect use case for just definining a custom macro to get rid of these duplications throughout this crate

@cb-heimdall
Copy link
Collaborator

Review Error for haardikk21 @ 2026-01-12 06:12:24 UTC
User failed mfa authentication, see go/mfa-help

@niran
Copy link
Contributor Author

niran commented Jan 13, 2026

This was primarily designed to be run against a live node, not a devnet. We absolutely need devnet testing, and as we introduce that, I think we'd probably stop running these against live nodes altogether, so the CLI would be ripped out.

@niran niran force-pushed the flashblocks-e2e branch 5 times, most recently from 66e5e2c to 6b36fcc Compare January 13, 2026 22:33
Add end-to-end regression testing framework for validating Flashblocks
RPC implementation. The tool provides:

- Real-time validation of flashblocks functionality against live nodes
- Transaction state visibility testing within the same block
- WebSocket streaming validation for flashblocks endpoint
- Contract interaction and deployment testing
- Metering endpoint testing (base_meterBundle, base_meteredPriorityFeePerGas)

Test categories:
- blocks: Block retrieval and pending state visibility
- call: eth_call and eth_estimateGas functionality
- receipts: Transaction receipt retrieval
- logs: eth_getLogs including pending logs
- subscriptions: Flashblocks WebSocket streaming
- metering: Bundle metering and fee estimation
- contracts: Contract deployment and interaction

Uses base-bundles types for metering (Bundle, MeterBundleResponse,
TransactionResult) to avoid type duplication.

Usage:
  PRIVATE_KEY=0x... flashblocks-e2e \
    --rpc-url http://localhost:8545 \
    --flashblocks-ws-url wss://localhost:8546/ws \
    --recipient 0x...
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.

5 participants