Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

Commit 3184561

Browse files
smtmfftjohntaiko
andcommitted
fix(raiko): transition network has same settings as mainnet (#677)
* fix(raiko): transition network has same settings as mainnet * fix(gaiko): update subproject commit reference --------- Co-authored-by: johntaiko <john@taiko.xyz>
1 parent 2598145 commit 3184561

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

lib/src/utils/shasta_rules.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ pub const ANCHOR_MAX_OFFSET: usize = 128;
1919
pub const MAINNET_ANCHOR_MAX_OFFSET: usize = 512;
2020

2121
/// Returns the maximum anchor block number offset for the given chain ID.
22-
/// Mainnet uses 512; Hoodi and other chains use 128.
22+
/// Mainnet and Transition use 512; Hoodi and other chains use 128.
2323
pub fn anchor_max_offset_for_chain(chain_id: u64) -> usize {
24-
if chain_id == TAIKO_MAINNET_CHAIN_ID {
24+
if is_mainnet_like_chain(chain_id) {
2525
MAINNET_ANCHOR_MAX_OFFSET
2626
} else {
2727
ANCHOR_MAX_OFFSET
@@ -317,9 +317,9 @@ const HOODI_TIMESTAMP_MAX_OFFSET: u64 = 12 * 128;
317317
const MAINNET_TIMESTAMP_MAX_OFFSET: u64 = 12 * 512;
318318

319319
/// Returns the maximum timestamp offset from proposal origin for the given chain ID.
320-
/// Mainnet uses 6144; Hoodi and other chains use 1536.
320+
/// Mainnet and Transition use 6144; Hoodi and other chains use 1536.
321321
pub fn timestamp_max_offset_for_chain(chain_id: u64) -> u64 {
322-
if chain_id == TAIKO_MAINNET_CHAIN_ID {
322+
if is_mainnet_like_chain(chain_id) {
323323
MAINNET_TIMESTAMP_MAX_OFFSET
324324
} else {
325325
HOODI_TIMESTAMP_MAX_OFFSET
@@ -489,11 +489,18 @@ pub const MAINNET_MIN_BASE_FEE_SHASTA: u64 = 10_000_000;
489489
pub const MAX_BASE_FEE_SHASTA: u64 = 1_000_000_000;
490490
/// Taiko mainnet chain ID (EIP-4396 min base fee uses MAINNET_MIN_BASE_FEE_SHASTA)
491491
pub const TAIKO_MAINNET_CHAIN_ID: u64 = 167000;
492+
/// Taiko transition network chain ID (uses mainnet-like parameters)
493+
pub const TAIKO_TRANSITION_CHAIN_ID: u64 = 167014;
494+
495+
/// Returns true if the chain uses mainnet-like parameters (anchor offset 512, timestamp offset 6144, min base fee 0.01 gwei).
496+
fn is_mainnet_like_chain(chain_id: u64) -> bool {
497+
chain_id == TAIKO_MAINNET_CHAIN_ID || chain_id == TAIKO_TRANSITION_CHAIN_ID
498+
}
492499

493500
/// Returns the minimum base fee (inclusive) for Shasta blocks for the given chain ID.
494-
/// Mainnet uses 0.01 gwei; all other chains use 0.005 gwei.
501+
/// Mainnet and Transition use 0.01 gwei; all other chains use 0.005 gwei.
495502
pub fn min_base_fee_for_shasta_chain(chain_id: u64) -> u64 {
496-
if chain_id == TAIKO_MAINNET_CHAIN_ID {
503+
if is_mainnet_like_chain(chain_id) {
497504
MAINNET_MIN_BASE_FEE_SHASTA
498505
} else {
499506
MIN_BASE_FEE_SHASTA

0 commit comments

Comments
 (0)