This repository was archived by the owner on Aug 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
[DONT MERGE]V1.15.0 transition #679
Open
smtmfft
wants to merge
5
commits into
main
Choose a base branch
from
v1.15.0-transition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+27
−14
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4f6020c
chore: update transition addresses
smtmfft 2598145
chore: update transition verifier addresses
smtmfft 3184561
fix(raiko): transition network has same settings as mainnet (#677)
smtmfft 3c45981
fix(gaiko): update subproject commit reference
johntaiko 50e52bd
chore: update inboxes
smtmfft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule gaiko
updated
3 files
| +1 −1 | go.mod | |
| +2 −4 | go.sum | |
| +0 −12 | internal/witness/chain_spec_list_default.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,9 +19,9 @@ pub const ANCHOR_MAX_OFFSET: usize = 128; | |||||
| pub const MAINNET_ANCHOR_MAX_OFFSET: usize = 512; | ||||||
|
|
||||||
| /// Returns the maximum anchor block number offset for the given chain ID. | ||||||
| /// Mainnet uses 512; Hoodi and other chains use 128. | ||||||
| /// Mainnet and Transition use 512; Hoodi and other chains use 128. | ||||||
| pub fn anchor_max_offset_for_chain(chain_id: u64) -> usize { | ||||||
| if chain_id == TAIKO_MAINNET_CHAIN_ID { | ||||||
| if is_mainnet_like_chain(chain_id) { | ||||||
| MAINNET_ANCHOR_MAX_OFFSET | ||||||
| } else { | ||||||
| ANCHOR_MAX_OFFSET | ||||||
|
|
@@ -317,9 +317,9 @@ const HOODI_TIMESTAMP_MAX_OFFSET: u64 = 12 * 128; | |||||
| const MAINNET_TIMESTAMP_MAX_OFFSET: u64 = 12 * 512; | ||||||
|
|
||||||
| /// Returns the maximum timestamp offset from proposal origin for the given chain ID. | ||||||
| /// Mainnet uses 6144; Hoodi and other chains use 1536. | ||||||
| /// Mainnet and Transition use 6144; Hoodi and other chains use 1536. | ||||||
| pub fn timestamp_max_offset_for_chain(chain_id: u64) -> u64 { | ||||||
| if chain_id == TAIKO_MAINNET_CHAIN_ID { | ||||||
| if is_mainnet_like_chain(chain_id) { | ||||||
| MAINNET_TIMESTAMP_MAX_OFFSET | ||||||
| } else { | ||||||
| HOODI_TIMESTAMP_MAX_OFFSET | ||||||
|
|
@@ -489,11 +489,18 @@ pub const MAINNET_MIN_BASE_FEE_SHASTA: u64 = 10_000_000; | |||||
| pub const MAX_BASE_FEE_SHASTA: u64 = 1_000_000_000; | ||||||
| /// Taiko mainnet chain ID (EIP-4396 min base fee uses MAINNET_MIN_BASE_FEE_SHASTA) | ||||||
| pub const TAIKO_MAINNET_CHAIN_ID: u64 = 167000; | ||||||
| /// Taiko transition network chain ID (uses mainnet-like parameters) | ||||||
| pub const TAIKO_TRANSITION_CHAIN_ID: u64 = 167014; | ||||||
|
|
||||||
| /// Returns true if the chain uses mainnet-like parameters (anchor offset 512, timestamp offset 6144, min base fee 0.01 gwei). | ||||||
| fn is_mainnet_like_chain(chain_id: u64) -> bool { | ||||||
|
||||||
| fn is_mainnet_like_chain(chain_id: u64) -> bool { | |
| pub(crate) fn is_mainnet_like_chain(chain_id: u64) -> bool { |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The new
TAIKO_TRANSITION_CHAIN_IDconstant and theis_mainnet_like_chainhelper drive behavior changes inanchor_max_offset_for_chain,timestamp_max_offset_for_chain, andmin_base_fee_for_shasta_chain. There appear to be existing tests for mainnet/hoodi chain IDs in this file (based on the existing test-like patterns for these functions). Tests should be added to verify that chain ID 167014 returns the mainnet-like values (512, 6144, andMAINNET_MIN_BASE_FEE_SHASTA) from each of these three functions.