feat(tests): add BuilderTxValidation utility for validating builder transactions#347
Merged
avalonche merged 3 commits intoflashbots:mainfrom Jan 7, 2026
Merged
Conversation
…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
avalonche
reviewed
Dec 17, 2025
Collaborator
avalonche
left a comment
There was a problem hiding this comment.
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
9bf4263 to
a0bb51c
Compare
Contributor
Author
|
Hi ,@avalonche. Could you re-run workflows ? |
Fixes borrow of partially moved value error by calling assert_builder_tx_count before block.transactions is moved.
Contributor
Author
|
@avalonche again :( |
avalonche
approved these changes
Jan 7, 2026
This was referenced Jan 17, 2026
This was referenced Feb 24, 2026
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.
Closes #88