-
Notifications
You must be signed in to change notification settings - Fork 110
feat(testing): add flashblocks-e2e testing tool #348
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
base: main
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
* fix flashblocks timing and tests * formatting
* fix flashblocks timing and tests * formatting
haardikk21
left a comment
There was a problem hiding this 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.
| 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, |
There was a problem hiding this comment.
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
|
Review Error for haardikk21 @ 2026-01-12 06:12:24 UTC |
b7bf1c6 to
7e7b308
Compare
|
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. |
66e5e2c to
6b36fcc
Compare
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...
6b36fcc to
32ab1b2
Compare
Summary
flashblocks-e2ebinary for end-to-end regression testing of flashblocks RPCtesting/e2elibrary crate with reusable test infrastructureArchitecture
Usage
Test plan
cargo check -p base-e2e -p flashblocks-e2ecargo clippy -p base-e2e -p flashblocks-e2e -- -D warnings