Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gaiko
16 changes: 11 additions & 5 deletions host/config/chain_spec_list_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
"Block": 0
},
"SHASTA": {
"Timestamp": 1770987600
"Timestamp": 1773320400
},
"CANCUN": "TBD"
},
Expand All @@ -286,11 +286,17 @@
"rpc": "https://taiko-transition-rpc.invalid",
"beacon_rpc": null,
"verifier_address_forks": {
"PACAYA": {
"SGX": "0xf92b97Ac8C1D8bfCFCB26CFb153a36aDb99471EF",
"SP1": "0xb179D4038DD6084c548EEf674DAC262F51264e5e",
"RISC0": "0xCF5CA135AC33D6Fc3CE7752e5c7449f6cE4d0925",
"SGXGETH": "0x17d9Ae481d901DDC08728E0B25307dAea1f8DE9D"
},
"SHASTA": {
"SGX": "0xF6c749514c65D16b244A46A6eA4F691f15241ad3",
"RISC0": "0x15190EEf1934DFC909Cd8ae3479701cd644982F7",
"SP1": "0xe00Bd5E1c0a63be8b1385ba560f99f2A595050Ba",
"SGXGETH": "0xA7b19cd71553f9Cc1519963b6F98EEf3dB73d885"
"SGX": "0x09550880a4634083aB5B8fE7CEf30B89e59a897d",
"RISC0": "0x79EAE0c1a9D875A70693ad600d1AaeB8D1a66c89",
"SP1": "0x4A3cE2Bfa2b85d064e3A6B011B00D986EcE1993E",
"SGXGETH": "0x930219fDa62F2A50cE84e5871ABe1B41517d6d45"
}
},
"genesis_time": 0,
Expand Down
19 changes: 13 additions & 6 deletions lib/src/utils/shasta_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Comment on lines +492 to +493

Copilot AI Mar 10, 2026

Copy link

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_ID constant and the is_mainnet_like_chain helper drive behavior changes in anchor_max_offset_for_chain, timestamp_max_offset_for_chain, and min_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, and MAINNET_MIN_BASE_FEE_SHASTA) from each of these three functions.

Copilot uses AI. Check for mistakes.

/// 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 {

Copilot AI Mar 10, 2026

Copy link

Choose a reason for hiding this comment

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

is_mainnet_like_chain is declared as a private function (fn without pub), which means it cannot be reused outside this module. If the concept of 'mainnet-like chain' is useful to callers (e.g., for tests or other modules), consider making it pub. At a minimum, making it pub(crate) would allow intra-crate usage and testing.

Suggested change
fn is_mainnet_like_chain(chain_id: u64) -> bool {
pub(crate) fn is_mainnet_like_chain(chain_id: u64) -> bool {

Copilot uses AI. Check for mistakes.
chain_id == TAIKO_MAINNET_CHAIN_ID || chain_id == TAIKO_TRANSITION_CHAIN_ID
}

/// Returns the minimum base fee (inclusive) for Shasta blocks for the given chain ID.
/// Mainnet uses 0.01 gwei; all other chains use 0.005 gwei.
/// Mainnet and Transition use 0.01 gwei; all other chains use 0.005 gwei.
pub fn min_base_fee_for_shasta_chain(chain_id: u64) -> u64 {
if chain_id == TAIKO_MAINNET_CHAIN_ID {
if is_mainnet_like_chain(chain_id) {
MAINNET_MIN_BASE_FEE_SHASTA
} else {
MIN_BASE_FEE_SHASTA
Expand Down
Loading