-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: track max blobcount in forktracker #14231
Conversation
There was a problem hiding this 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
/// Max blob count at the block's timestamp. | ||
max_blob_count: AtomicU64, |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
ty
closes #14227 #14226