-
Notifications
You must be signed in to change notification settings - Fork 106
chore: testing updates & repo restructure #347
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
- Remove file structure sections from READMEs - Move build_node function body into LocalNode::new - Replace local TestHarness::signer methods with Account::signer_b256()
🟡 Heimdall Review Status
|
|
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. |
…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.
| // Feature extensions (FlashblocksExtension must be last - uses replace_configured) | ||
| runner.install_ext(Box::new(TxPoolExtension::new(tracing_config, sequencer_rpc))); | ||
| runner.install_ext(Box::new(MeteringExtension::new(metering_enabled))); | ||
| runner | ||
| .install_ext(Box::new(FlashblocksExtension::new(flashblocks_cell, flashblocks_config))); |
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.
I think we could have kept the old api by doing:
pub fn install_ext::<T: BaseNodeExtension>(config: T::Config)I don't hold a super strong opinion here, either way works, but I think the old type-based api is a bit easier to read personally. Perhaps worth writing a small ticket once this is merged to address later as a low-hanging-fruit.
bin/node/src/main.rs
Outdated
| let sequencer_rpc = args.rollup_args.sequencer.clone(); | ||
| let tracing_config = args.tracing_config(); | ||
| let metering_enabled = args.enable_metering; | ||
| let flashblocks_config = args.flashblocks_config(); |
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.
Instead of having to do this, we could implement From<Args> for FlashblocksConfig for example and then in the method, call below just do:
runner.install_ext(Box::new(FlashblocksExtension::new(flashblocks_cell, args.into())));This way we keep the binary file a bit more lean.
(Same goes for the other configs)
refcell
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.
A couple of nits, but this is very nice work!
Description
This PR is refactors the repo to make the crate dependency graph simpler and leverage test-utils features.
Shared Crates
base-primitivesbase-flashtypesbase-bundlesbase-access-listsbase-primitives(test-utils)base-cli-utilsbase-reth-rpc-typesClient Crates
base-client-nodebase-primitives(test-utils)base-meteringbase-bundles,base-client-nodebase-flashblocksbase-flashtypes,base-client-nodebase-txpoolbase-client-nodeBinaries
base-reth-nodebase-cli-utils,base-client-node,base-flashblocks,base-metering,base-txpoolPR Changes
sharedcrates don't depend onclientFollow ups