Skip to content

fix: correct L2 claim block timestamp calculation in BPO disabling logic#140

Merged
seolaoh merged 1 commit intomainfrom
seolaoh/fix-l2-timestamp-calculation
Mar 16, 2026
Merged

fix: correct L2 claim block timestamp calculation in BPO disabling logic#140
seolaoh merged 1 commit intomainfrom
seolaoh/fix-l2-timestamp-calculation

Conversation

@seolaoh
Copy link
Copy Markdown
Collaborator

@seolaoh seolaoh commented Mar 12, 2026

Summary

  • Fix cost-estimator failure on Celo Mainnet caused by adding jovian_time to celo-registry configs
  • The BPO disabling logic in CeloBootInfo::load() computes l2_claim_block_timestamp as genesis.l2_time + l2_claim_block * block_time, but Celo Mainnet's genesis L2 block number is 31,056,500 (not 0), so the calculation must subtract the genesis block number: genesis.l2_time + (l2_claim_block - genesis.l2.number) * block_time
  • Without this fix, the computed timestamp is always far in the future (overshooting by ~31M seconds), making is_jovian_active() return true for pre-Jovian blocks. This skips the osaka/BPO stripping, causing the wrong blob_base_fee to be calculated using BPO2 blob params instead of the expected params

Note

This only affects Celo Mainnet, as Celo Sepolia and Celo Chaos have genesis L2 block number 0.

The blob params for osaka and BPO hardforks are currently stripped based
on the claimed l2 block timestamp, comparing if it's Jovian activated or
not. For Celo Mainnet, the genesis l2_time is not the timestamp for the
0th block, so we have to subtract the genesis l2 block number from the
claimed l2 block number to get the correct timestamp.
@seolaoh seolaoh changed the title Fix l2 timestamp calculation for Celo Mainnet fix: correct L2 claim block timestamp calculation in BPO disabling logic Mar 12, 2026
@seolaoh seolaoh marked this pull request as ready for review March 12, 2026 16:38
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6ec8765cd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread crates/kona/proof/src/boot.rs
Copy link
Copy Markdown
Contributor

@palango palango left a comment

Choose a reason for hiding this comment

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

Interesting edge cases we run int ;)

@seolaoh seolaoh merged commit e223d9d into main Mar 16, 2026
12 checks passed
@seolaoh seolaoh deleted the seolaoh/fix-l2-timestamp-calculation branch March 16, 2026 09:56
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.

2 participants