Skip to content
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

feat: track max blobcount in forktracker #14231

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

stevencartavia
Copy link
Contributor

@stevencartavia stevencartavia commented Feb 5, 2025

closes #14227 #14226

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.

great, only smol nits

Comment on lines 556 to 557
/// Max blob count at the block's timestamp.
max_blob_count: AtomicU64,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this needs to be a simple u64 here

.chain_spec()
.blob_params_at_timestamp(timestamp)
.map(|p| p.max_blob_count)
.unwrap_or(0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this we can't do, we should always use MAX_BLOBS_PER_BLOCK

@@ -752,6 +772,7 @@ impl<Client> EthTransactionValidatorBuilder<Client> {
shanghai: AtomicBool::new(shanghai),
cancun: AtomicBool::new(cancun),
prague: AtomicBool::new(prague),
max_blob_count: AtomicU64::new(MAX_BLOBS_PER_BLOCK as u64),
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh here we actually need to check if prague then BlobParams::prague, otherwise BlobParams::cancun blobcount

@@ -340,14 +340,14 @@ where
)
}

if blob_count > MAX_BLOBS_PER_BLOCK {
// too many blobs
let max_blob_count = self.fork_tracker.max_blob_count().try_into().unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

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

here you can simply cast this as usize

@mattsse mattsse added A-tx-pool Related to the transaction mempool E-prague Related to the prague network upgrade labels Feb 5, 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.

lgtm

ty

@mattsse mattsse enabled auto-merge February 5, 2025 20:39
@mattsse mattsse added this pull request to the merge queue Feb 5, 2025
Merged via the queue into paradigmxyz:main with commit 9ac96e9 Feb 5, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool E-prague Related to the prague network upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

track max blobcount in forktracker
2 participants