Conversation
* fix(raiko): transition network has same settings as mainnet * fix(gaiko): update subproject commit reference --------- Co-authored-by: johntaiko <john@taiko.xyz>
There was a problem hiding this comment.
Pull request overview
This PR introduces support for a "Transition" network (chain ID 167014) by treating it as a mainnet-like chain, sharing the same parameters (anchor offset 512, timestamp offset 6144, min base fee 0.01 gwei). It also updates the Transition chain's fork timestamps and verifier addresses.
Changes:
- Adds
TAIKO_TRANSITION_CHAIN_IDconstant and anis_mainnet_like_chainhelper to consolidate mainnet-like chain checks across anchor offset, timestamp offset, and min base fee functions. - Updates the Transition chain spec with a new SHASTA fork timestamp, new SHASTA verifier addresses, and adds PACAYA fork verifier addresses.
- Bumps the
gaikosubmodule to a new commit.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/src/utils/shasta_rules.rs | Adds Transition chain ID, is_mainnet_like_chain helper, and updates three functions to use it. |
| host/config/chain_spec_list_default.json | Updates SHASTA timestamp, adds PACAYA verifier addresses, and updates SHASTA verifier addresses for the Transition chain. |
| gaiko | Submodule pointer update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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 { |
There was a problem hiding this comment.
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.
| fn is_mainnet_like_chain(chain_id: u64) -> bool { | |
| pub(crate) fn is_mainnet_like_chain(chain_id: u64) -> bool { |
| /// Taiko transition network chain ID (uses mainnet-like parameters) | ||
| pub const TAIKO_TRANSITION_CHAIN_ID: u64 = 167014; |
There was a problem hiding this comment.
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.
For transition test only