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(chainspec): add Chainspec::blob_fee_params_at_timestamp #14049

Merged

Conversation

TropicalDog17
Copy link
Contributor

Closes #14042

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.

ty,

smol suggestions

@@ -385,7 +385,7 @@ impl ChainSpec {
// given timestamp.
for (fork, params) in bf_params.iter().rev() {
if self.hardforks.is_fork_active_at_timestamp(fork.clone(), timestamp) {
return *params
return *params;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return *params;
return *params

@@ -404,7 +404,7 @@ impl ChainSpec {
// given timestamp.
for (fork, params) in bf_params.iter().rev() {
if self.hardforks.is_fork_active_at_block(fork.clone(), block_number) {
return *params
return *params;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return *params;
return *params

Comment on lines 419 to 422
if self.is_cancun_active_at_timestamp(timestamp) {
Some(cancun)
} else if self.is_prague_active_at_timestamp(timestamp) {
Some(prague)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we flip the order here starting with the highest (prague)

@@ -413,6 +413,18 @@ impl ChainSpec {
}
}

/// Get the blob fee parameters for the given timestamp.
pub fn blob_fee_params_at_timestamp(&self, timestamp: u64) -> Option<BlobParams> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we also make this part of the chainspec trait?

@mattsse mattsse enabled auto-merge January 29, 2025 19:16
@mattsse mattsse added this pull request to the merge queue Jan 29, 2025
Merged via the queue into paradigmxyz:main with commit 974cea1 Jan 29, 2025
44 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.

Add Chainspec::blob_fee_params_at_timestamp
2 participants