feat: refactor integration testing setup#166
Merged
haardikk21 merged 38 commits intomainfrom Nov 26, 2025
Merged
Conversation
Collaborator
✅ Heimdall Review Status
|
This was
linked to
issues
Nov 3, 2025
8fc0354 to
c2befa7
Compare
niran
reviewed
Nov 20, 2025
haardikk21
commented
Nov 21, 2025
- Add latest_block() method to TestHarness in test-utils that encapsulates the two-step process of getting best_block_number then fetching that block - Refactor test_progress_canonical_blocks_without_flashblocks to use the new method - Refactor FlashblockBuilder::build() to use the new method - Reduces code duplication and improves maintainability across all tests
Replace NodeBuilder::testing_node() with LocalNode::create_test_database() to reduce memory usage in parallel tests. The testing_node() helper hardcodes an 8 TB map size which causes ENOMEM errors when running multiple test processes concurrently with cargo test. This prevents memory exhaustion when running parallel tests while maintaining the same functionality.
…er pattern - Add missing max_pending_blocks_depth parameter (5) to FlashblocksState::new() calls in rpc.rs tests - Add missing max_pending_blocks_depth parameter to init_flashblocks_state in test-utils - Fix builder pattern to use engine_api_launcher() + launch_with() instead of .launch() to match TestHarness::new() signature - Enable 'client' feature for reth-optimism-rpc dependency to fix OpEngineApiClient import error These changes ensure no logic was lost during the rebase and fix compilation errors.
70e71ed to
56ba57b
Compare
Collaborator
Author
|
LGTM - thanks a lot! I can't do an approval since I opened this PR cc @danyalprout |
3 tasks
danyalprout
approved these changes
Nov 26, 2025
refcell
added a commit
that referenced
this pull request
Feb 18, 2026
### Description Fixes test casing.
mw2000
pushed a commit
that referenced
this pull request
Mar 9, 2026
* deployment * feat: witnessgen args * port for the server * fix: proof timeout flag * .env.example * chore: cargo fmt * feat: bump ram * feat: update slack * remove docker-compose.yml
mw2000
pushed a commit
that referenced
this pull request
Mar 16, 2026
* deployment * feat: witnessgen args * port for the server * fix: proof timeout flag * .env.example * chore: cargo fmt * feat: bump ram * feat: update slack * remove docker-compose.yml
haardikk21
added a commit
that referenced
this pull request
Mar 17, 2026
…ngine API support (#166) * wip: create test harness independently * wip: initialize foundry project * wip: install solmate * update readme * wip: generalize test harness, allow for ExEx's and RPC modules to be passed down * remove foundry github workflow * wip: first test migration * migrate most rpc.rs tests * test-utils: wire flashblocks state into harness * Remove legacy flashblocks RPC tests * Port flashblocks state tests to shared harness * Sync harness provider with canonical chain * Cleanup flashblocks OnceCell usage * Add latest_block() utility to base TestHarness - Add latest_block() method to TestHarness in test-utils that encapsulates the two-step process of getting best_block_number then fetching that block - Refactor test_progress_canonical_blocks_without_flashblocks to use the new method - Refactor FlashblockBuilder::build() to use the new method - Reduces code duplication and improves maintainability across all tests * Remove unused utils * refactor(test-utils): replace testing_node() with manual database setup Replace NodeBuilder::testing_node() with LocalNode::create_test_database() to reduce memory usage in parallel tests. The testing_node() helper hardcodes an 8 TB map size which causes ENOMEM errors when running multiple test processes concurrently with cargo test. This prevents memory exhaustion when running parallel tests while maintaining the same functionality. * refactor: remove retry loop from new_canonical_block_without_processing * Rename framework_test back to rpc * cargo clippy * fix: restore missing max_pending_blocks_depth parameter and fix builder pattern - Add missing max_pending_blocks_depth parameter (5) to FlashblocksState::new() calls in rpc.rs tests - Add missing max_pending_blocks_depth parameter to init_flashblocks_state in test-utils - Fix builder pattern to use engine_api_launcher() + launch_with() instead of .launch() to match TestHarness::new() signature - Enable 'client' feature for reth-optimism-rpc dependency to fix OpEngineApiClient import error These changes ensure no logic was lost during the rebase and fix compilation errors. * update test-utils docs * cargo fmt * just fix * add jovianTime * Move flashblocks tests to integration suite * Silence executor warnings in flashblocks tests * Add shared test tracing helper * Document flashblocks integration tests * Default TestHarness launcher * Split flashblocks harness * Introduce FlashblocksLocalNode * Decouple Flashblocks node * Refactor flashblocks harness and tests * Add manual flashblocks harness * Clarify flashblocks launcher wrapping * Simplify flashblocks provider wiring * Extract FlashblocksHarness module * Document flashblocks harness module --------- Co-authored-by: Niran Babalola <niran.babalola@coinbase.com>
haardikk21
pushed a commit
that referenced
this pull request
Mar 17, 2026
* deployment * feat: witnessgen args * port for the server * fix: proof timeout flag * .env.example * chore: cargo fmt * feat: bump ram * feat: update slack * remove docker-compose.yml
mw2000
pushed a commit
that referenced
this pull request
Mar 19, 2026
* deployment * feat: witnessgen args * port for the server * fix: proof timeout flag * .env.example * chore: cargo fmt * feat: bump ram * feat: update slack * remove docker-compose.yml
mw2000
pushed a commit
that referenced
this pull request
Mar 23, 2026
* deployment * feat: witnessgen args * port for the server * fix: proof timeout flag * .env.example * chore: cargo fmt * feat: bump ram * feat: update slack * remove docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a shared integration test framework in
crates/test-utilsand migrates the existing flashblocks RPC tests to use this new infrastructure. This framework supports tests that need to advance the state of the chain via flashblocks or full blocks to verify behavior.TestHarness: The main orchestration layer that combines node management, Engine API interactions, and account management. It handles block building, chain advancement, and flashblocks submission.LocalNode: An in-process Optimism node wrapper with Base Sepolia configuration, isolated from P2P discovery for parallel testing.EngineApi: A wrapper around the Consensus Layer (CL) Engine API for forkchoice updates and payload submission.TestAccounts: Pre-funded, deterministic accounts (Alice, Bob, Charlie, Deployer) compatible with Anvil defaults.Closes #162 and #164.