Skip to content

Conversation

@mininny
Copy link
Collaborator

@mininny mininny commented Jan 7, 2026

Description

This PR adds new flashblock acceptance tests for op-rbuilder with rule-based ordering.
This allows op-rbuilder to score individual transaction based on some specific ruleset, and include the transactions with the score ordering.

See corresponding op-rbuilder PR for more detail: https://github.com/ethereum-optimism/op-rbuilder/pull/1

To run these new tests, set flag like this:

export OP_RBUILDER_EXEC_PATH=OP_RBUILDER_PATH
export ROLLUP_BOOST_EXEC_PATH=ROLLUP_BOOST_PATH
FLASHBLOCKS_RULES_TEST=1 just acceptance-test "" flashblocks

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.53%. Comparing base (60b1c96) to head (ca38ee3).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #18723   +/-   ##
========================================
  Coverage    73.53%   73.53%           
========================================
  Files          189      189           
  Lines        11252    11252           
========================================
  Hits          8274     8274           
  Misses        2834     2834           
  Partials       144      144           
Flag Coverage Δ
cannon-go-tests-64 66.58% <ø> (ø)
contracts-bedrock-tests 77.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@teddyknox teddyknox left a comment

Choose a reason for hiding this comment

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

LGTM. Main concern is the potential for tests to silently pass when transactions don't land in the same block.

// The rulesConfig specifies the path to the rules configuration file.
// Note: This function expects the orchestrator to be initialized via DoMain with
// WithSingleChainSystemWithFlashblocksAndRules(rulesConfig) option.
func NewSingleChainWithFlashblocksAndRules(t devtest.T) *SingleChainWithFlashblocks {
Copy link
Contributor

Choose a reason for hiding this comment

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

This function is identical to NewSingleChainWithFlashblocks and is never called. The tests use NewSingleChainWithFlashblocks directly. Either remove it or use it in the tests (replacing NewSingleChainWithFlashblocks in rules tests) to make intent clearer.

Comment on lines +174 to +179
logger.Info("Transactions in different blocks - comparing indices for transactions in same block",
"high_block", receiptHigh.BlockNumber,
"medium_block", receiptMedium.BlockNumber,
"low_block", receiptLow.BlockNumber,
"normal_block", receiptNormal.BlockNumber,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

In TestBoostPriorityOrdering, TestBoostedVsNonBoostedOrdering, and TestMultipleSendersWithMixedPriorities, the tests only verify ordering if transactions land in the same block. If they don't, the test either does weaker checks or logs and moves on. This could lead to tests silently passing without actually verifying the intended behavior.

return nil
}

// Handle timeout errors - only continue if we haven't received any other error type
Copy link
Contributor

Choose a reason for hiding this comment

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

consider rephrasing to "Timeout errors are recoverable - keep reading"

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.

3 participants