Skip to content

Conversation

@danyalprout
Copy link
Collaborator

@danyalprout danyalprout commented Jan 11, 2026

Description

This PR is refactors the repo to make the crate dependency graph simpler and leverage test-utils features.

Shared Crates

Crate Description Internal Dependencies
base-primitives Shared primitives and test utilities for node-reth None
base-flashtypes Flashblocks primitive types None
base-bundles Bundle types for transaction bundles None
base-access-lists FBAL (Flashblocks Access Lists) library base-primitives (test-utils)
base-cli-utils CLI utilities None
base-reth-rpc-types Re-exports reth RPC types for external consumers None

Client Crates

Crate Description Internal Dependencies
base-client-node Primitive types and traits for Base node runner extensions base-primitives (test-utils)
base-metering Metering RPC for Base node base-bundles, base-client-node
base-flashblocks Flashblocks state management base-flashtypes, base-client-node
base-txpool Txpool extensions for Base base-client-node

Binaries

Crate Description Internal Dependencies
base-reth-node Base Reth node binary base-cli-utils, base-client-node, base-flashblocks, base-metering, base-txpool

PR Changes

  1. Breaks the shared => client dependency (access list to test-utils)
  2. Makes the TestHarness generic and allows installing extensions
  3. Deletes the test-utils crate by moving TestHarness into a shared node crate and the FlashblocksTestHarness into the flashblocks crate
  4. Refactors the test accounts/user enums to remove duplication
  5. Migrates metering tests to the TestHarness
  6. Builds genesis files/chain spec in code vs. hardcoded JSON
  7. GHA/script to ensure that shared crates don't depend on client
  8. Renames a bunch of crates to remove "reth" from the name

Follow ups

  1. Remove the flashblocks test extension and use the standard flashblocks extension for testing

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 11, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/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 danyalprout requested review from haardikk21, niran and refcell and removed request for haardikk21 and refcell January 11, 2026 05:18
@danyalprout danyalprout marked this pull request as ready for review January 11, 2026 05:43
@niran
Copy link
Contributor

niran commented Jan 11, 2026

Makes sense to me. I still want the rest of #346's metering tests cleanup, but it shouldn't matter too much which order they're merged in since there will be pain regardless.

danyalprout pushed a commit that referenced this pull request Jan 11, 2026
…ransactions (#347)

* feat(tests): add BuilderTxValidation utility for validating builder transactions

Adds `BuilderTxValidation` trait to test framework that provides:
- `find_builder_txs()`: Returns info about builder transactions in a block
- `has_builder_tx()`: Quick check if block contains builder transactions
- `assert_builder_tx_count()`: Assert expected number of builder transactions

Also adds `block_includes_builder_transaction` test demonstrating the utility.

Closes #88

* test: add BuilderTxValidation assertions to existing tests

Updates smoke, flashblocks, and revert tests to use the BuilderTxValidation
utility for validating builder transactions in blocks:

- smoke.rs: Added builder tx count assertions to chain_produces_blocks,
  chain_produces_big_tx_with_gas_limit, and chain_produces_big_tx_without_gas_limit
- flashblocks.rs: Added builder tx count assertions to smoke_dynamic_base,
  smoke_dynamic_unichain, smoke_classic_unichain, and smoke_classic_base
- revert.rs: Added builder tx validation to monitor_transaction_gc,
  disabled, and allow_reverted_transactions_without_bundle tests

* fix: move builder tx validation before transactions move

Fixes borrow of partially moved value error by calling
assert_builder_tx_count before block.transactions is moved.
Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

A couple of nits, but this is very nice work!

@danyalprout danyalprout changed the title [spike] testing & repo restructure chore: testing updates & repo restructure Jan 11, 2026
Move config extraction directly into extension constructor calls
to reduce intermediate variables in main.rs.
Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

🔥 -- let's get some more eyes on before merging?

@danyalprout
Copy link
Collaborator Author

100%, will wait for @niran / @haardikk21 to take a look.

danyalprout pushed a commit that referenced this pull request Jan 11, 2026
…ransactions (#347)

* feat(tests): add BuilderTxValidation utility for validating builder transactions

Adds `BuilderTxValidation` trait to test framework that provides:
- `find_builder_txs()`: Returns info about builder transactions in a block
- `has_builder_tx()`: Quick check if block contains builder transactions
- `assert_builder_tx_count()`: Assert expected number of builder transactions

Also adds `block_includes_builder_transaction` test demonstrating the utility.

Closes #88

* test: add BuilderTxValidation assertions to existing tests

Updates smoke, flashblocks, and revert tests to use the BuilderTxValidation
utility for validating builder transactions in blocks:

- smoke.rs: Added builder tx count assertions to chain_produces_blocks,
  chain_produces_big_tx_with_gas_limit, and chain_produces_big_tx_without_gas_limit
- flashblocks.rs: Added builder tx count assertions to smoke_dynamic_base,
  smoke_dynamic_unichain, smoke_classic_unichain, and smoke_classic_base
- revert.rs: Added builder tx validation to monitor_transaction_gc,
  disabled, and allow_reverted_transactions_without_bundle tests

* fix: move builder tx validation before transactions move

Fixes borrow of partially moved value error by calling
assert_builder_tx_count before block.transactions is moved.
@danyalprout danyalprout added this pull request to the merge queue Jan 12, 2026
Merged via the queue into main with commit a5de9fa Jan 12, 2026
21 checks passed
@danyalprout danyalprout deleted the danyal/part-eleven-gha-script branch January 12, 2026 04:35
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