Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 crates/chainspec/res/genesis/hoodi.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"morph203Time": 0,
"viridianTime": 1761544800,
"emeraldTime": 1766988000,
"jadeTime": 1774418400,
"jadeForkTime": 1774418400,
"morph": {
"useZktrie": true,
"maxTxPayloadBytesPerBlock": 122880,
Expand Down
2 changes: 1 addition & 1 deletion crates/chainspec/res/genesis/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"morph203Time": 1747029600,
"viridianTime": 1762149600,
"emeraldTime": 1767765600,
"jadeTime": 1775628000,
"jadeForkTime": 1775628000,
"terminalTotalDifficulty": 0,
"morph": {
"useZktrie": true,
Expand Down
6 changes: 3 additions & 3 deletions crates/chainspec/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub struct MorphHardforkInfo {
pub emerald_time: Option<u64>,
/// Jade hardfork timestamp.
#[serde(skip_serializing_if = "Option::is_none")]
pub jade_time: Option<u64>,
pub jade_fork_time: Option<u64>,
}

impl MorphHardforkInfo {
Expand Down Expand Up @@ -136,7 +136,7 @@ mod tests {
"morph203Time": 3000,
"viridianTime": 4000,
"emeraldTime": 5000,
"jadeTime": 6000
"jadeForkTime": 6000
}
"#;

Expand All @@ -151,7 +151,7 @@ mod tests {
morph203_time: Some(3000),
viridian_time: Some(4000),
emerald_time: Some(5000),
jade_time: Some(6000),
jade_fork_time: Some(6000),
}
);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/chainspec/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn build_hardforks(genesis: &Genesis, chain_info: &MorphGenesisInfo) -> ChainHar
(MorphHardfork::Morph203, hardfork_info.morph203_time),
(MorphHardfork::Viridian, hardfork_info.viridian_time),
(MorphHardfork::Emerald, hardfork_info.emerald_time),
(MorphHardfork::Jade, hardfork_info.jade_time),
(MorphHardfork::Jade, hardfork_info.jade_fork_time),
]
.into_iter()
.filter_map(|(fork, time)| time.map(|t| (fork, ForkCondition::Timestamp(t))));
Expand Down
2 changes: 1 addition & 1 deletion crates/engine-api/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mod tests {
});

if let Some(time) = jade_time {
genesis_json["config"]["jadeTime"] = json!(time);
genesis_json["config"]["jadeForkTime"] = json!(time);
}

let genesis: Genesis = serde_json::from_value(genesis_json).unwrap();
Expand Down
6 changes: 3 additions & 3 deletions crates/node/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl HardforkSchedule {
/// Apply this schedule's fork timestamps to a mutable genesis JSON value.
///
/// - `AllActive`: no changes (test genesis already has all forks at 0)
/// - `PreJade`: set `jadeTime` to `u64::MAX`
/// - `PreJade`: set `jadeForkTime` to `u64::MAX`
/// - `Hoodi`/`Mainnet`: compare each `*Time` key against the reference network;
/// forks active now → 0, forks not yet active → `u64::MAX`.
/// Block-based forks (`*Block`) are always kept at 0.
Expand All @@ -122,13 +122,13 @@ impl HardforkSchedule {
Self::PreJade => {
// Disable only Jade; all other forks remain at 0.
let config = genesis["config"].as_object_mut().expect("genesis.config");
config.insert("jadeTime".to_string(), serde_json::json!(u64::MAX));
config.insert("jadeForkTime".to_string(), serde_json::json!(u64::MAX));
}
Self::PreViridian => {
let config = genesis["config"].as_object_mut().expect("genesis.config");
config.insert("viridianTime".to_string(), serde_json::json!(u64::MAX));
config.insert("emeraldTime".to_string(), serde_json::json!(u64::MAX));
config.insert("jadeTime".to_string(), serde_json::json!(u64::MAX));
config.insert("jadeForkTime".to_string(), serde_json::json!(u64::MAX));
}
Self::Hoodi | Self::Mainnet => {
let reference_json = self.reference_genesis_json().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/node/tests/assets/test-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"morph203Time": 0,
"viridianTime": 0,
"emeraldTime": 0,
"jadeTime": 0,
"jadeForkTime": 0,
"morph": {
"feeVaultAddress": "0x530000000000000000000000000000000000000a"
}
Expand Down
Loading