From b068e18e7e000d0f301f4458cb5629e8ef7f7664 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Thu, 11 Jul 2024 21:27:34 +0800 Subject: [PATCH 1/2] feat(genesis): rm eip150_hash Signed-off-by: jsvisa --- crates/genesis/src/lib.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/crates/genesis/src/lib.rs b/crates/genesis/src/lib.rs index d75808a8a7c..5939fdc0240 100644 --- a/crates/genesis/src/lib.rs +++ b/crates/genesis/src/lib.rs @@ -255,7 +255,7 @@ impl GenesisAccount { /// Encapsulates parameters shaping network evolution and behavior. /// /// See [geth's `ChainConfig` -/// struct](https://github.com/ethereum/go-ethereum/blob/64dccf7aa411c5c7cd36090c3d9b9892945ae813/params/config.go#L349) +/// struct](https://github.com/ethereum/go-ethereum/blob/v1.14.0/params/config.go#L326) /// for the source of each field. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(default, rename_all = "camelCase")] @@ -287,10 +287,6 @@ pub struct ChainConfig { )] pub eip150_block: Option, - /// The [EIP-150](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-150.md) hard fork hash. - #[serde(skip_serializing_if = "Option::is_none")] - pub eip150_hash: Option, - /// The [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) hard fork block. #[serde( skip_serializing_if = "Option::is_none", @@ -528,7 +524,6 @@ impl Default for ChainConfig { dao_fork_block: None, dao_fork_support: false, eip150_block: None, - eip150_hash: None, eip155_block: None, eip158_block: None, byzantium_block: None, @@ -1020,9 +1015,6 @@ mod tests { let expected_genesis = Genesis { config: ChainConfig { chain_id: 1337, - eip150_hash: Some( - hex!("0000000000000000000000000000000000000000000000000000000000000000").into(), - ), homestead_block: Some(0), eip150_block: Some(0), eip155_block: Some(0), @@ -1097,9 +1089,6 @@ mod tests { let expected_genesis = Genesis { config: ChainConfig { chain_id: 1337, - eip150_hash: Some( - hex!("0000000000000000000000000000000000000000000000000000000000000000").into(), - ), homestead_block: Some(0), eip150_block: Some(0), eip155_block: Some(0), From 12fba4e187cc7a9559df8b824eb0411b9c992b77 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Thu, 11 Jul 2024 21:27:39 +0800 Subject: [PATCH 2/2] fix testcase Signed-off-by: jsvisa --- crates/genesis/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/genesis/src/lib.rs b/crates/genesis/src/lib.rs index 5939fdc0240..20156ad2818 100644 --- a/crates/genesis/src/lib.rs +++ b/crates/genesis/src/lib.rs @@ -982,7 +982,6 @@ mod tests { "chainId": 1337, "homesteadBlock": 0, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, @@ -1057,7 +1056,6 @@ mod tests { "chainId": 1337, "homesteadBlock": 0, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0,