Skip to content

Bundles: Ensure that the min block number is inside the MAX_BLOCK_RANGE_BLOCKS #128

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

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

trianglesphere
Copy link
Contributor

If a user only specifies the min block number, the max block number is set to the current block number + MAX_BLOCK_RANGE_BLOCKS; however, there is no check that the min block is less than the newly set max block number.

…GE_BLOCKS

If a user only specifies the min block number, the max block number is set to the
current block number + MAX_BLOCK_RANGE_BLOCKS; however, there is no check that
the min block is less than the newly set max block number.
if let Some(block_number_min) = bundle.block_number_min {
if block_number_min > bundle.block_number_max.unwrap() {
return Err(
EthApiError::InvalidParams("block_number_min is too high".into()).into(),
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be helpful to return the block_number_min and block_number_max in the error message

@ferranbt ferranbt merged commit 1dcac5f into flashbots:main Jun 6, 2025
2 checks passed
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