Skip to content

Conversation

@Himess
Copy link

@Himess Himess commented Dec 13, 2025

Closes #88

…ransactions

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 flashbots#88
Copy link
Collaborator

@avalonche avalonche left a comment

Choose a reason for hiding this comment

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

thank you! are you able to update the existing tests with the builder tx assertions?

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
@Himess Himess force-pushed the feat/builder-tx-validation-utility branch from 9bf4263 to a0bb51c Compare December 17, 2025 14:58
@Himess
Copy link
Author

Himess commented Dec 17, 2025

Hi ,@avalonche. Could you re-run workflows ?

@Himess Himess requested a review from avalonche December 17, 2025 15:00
Fixes borrow of partially moved value error by calling
assert_builder_tx_count before block.transactions is moved.
@Himess
Copy link
Author

Himess commented Dec 19, 2025

@avalonche again :(
Sorry

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.

Add test utility to validate whether the generated block includes a builder txn

2 participants