Skip to content

Conversation

@Snezhkko
Copy link
Contributor

@Snezhkko Snezhkko commented Nov 7, 2025

This change corrects the argument order passed to blob_tx_priority in BlobTransaction::new and BlobTransaction::update_priority to follow the documented fee_delta(max_tx_fee, current_fee) semantics. Previously, the arguments were inverted, effectively comparing current network fees against transaction caps, which could zero out priorities and break eviction ordering. The fix ensures deltas become negative when caps are below current fees, aligning with BlobOrd’s eviction logic and the filtering semantics used elsewhere in this module. Added unit tests assert exact priority values to prevent regressions in argument orientation.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool this is indeed the correct order

/// Returns the priority for the transaction, based on the "delta" blob fee and priority fee.
pub fn blob_tx_priority(
blob_fee_cap: u128,
blob_fee: u128,
max_priority_fee: u128,
base_fee: u128,
) -> i64 {

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Nov 7, 2025
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

tests are failing because this now calcs the inverse

https://github.com/paradigmxyz/reth/blob/main/crates/transaction-pool/src/pool/blob.rs#L382-L389

so we need to swap the order here as well,
the existing code is correct only the variable naming is incorrect

@Snezhkko
Copy link
Contributor Author

Snezhkko commented Nov 7, 2025

tests are failing because this now calcs the inverse

https://github.com/paradigmxyz/reth/blob/main/crates/transaction-pool/src/pool/blob.rs#L382-L389

so we need to swap the order here as well, the existing code is correct only the variable naming is incorrect

is there need for a test then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants