Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit 8a5cf1d

Browse files
sorpaasandresilva
authored andcommitted
Enable all Constantinople hard fork changes in constantinople_test.json (#9505)
* Enable all Constantinople hard fork changes in constantinople_test.json * Address grumbles * Remove EIP-210 activation * 8m -> 5m * Temporarily add back eip210 transition so we can get test passed * Add eip210_test and remove eip210 transition from const_test
1 parent 2c0b107 commit 8a5cf1d

File tree

4 files changed

+66
-5
lines changed

4 files changed

+66
-5
lines changed

ethcore/res/ethereum/constantinople_test.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
2-
"name": "Byzantium (Test)",
2+
"name": "Constantinople (test)",
33
"engine": {
44
"Ethash": {
55
"params": {
66
"minimumDifficulty": "0x020000",
77
"difficultyBoundDivisor": "0x0800",
88
"durationLimit": "0x0d",
9-
"blockReward": "0x29A2241AF62C0000",
9+
"blockReward": "0x1BC16D674EC80000",
1010
"homesteadTransition": "0x0",
1111
"eip100bTransition": "0x0",
1212
"eip649Transition": "0x0",
13-
"eip649Reward": "0x29A2241AF62C0000"
13+
"eip649Reward": "0x1BC16D674EC80000",
14+
"eip1234Transition": "0x0",
15+
"eip1234Reward": "0x1BC16D674EC80000"
1416
}
1517
}
1618
},
@@ -29,11 +31,13 @@
2931
"eip161abcTransition": "0x0",
3032
"eip161dTransition": "0x0",
3133
"eip140Transition": "0x0",
32-
"eip210Transition": "0x0",
3334
"eip211Transition": "0x0",
3435
"eip214Transition": "0x0",
3536
"eip155Transition": "0x0",
3637
"eip658Transition": "0x0",
38+
"eip145Transition": "0x0",
39+
"eip1014Transition": "0x0",
40+
"eip1052Transition": "0x0",
3741
"eip1283Transition": "0x0"
3842
},
3943
"genesis": {

ethcore/res/ethereum/eip210_test.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "EIP210 (test)",
3+
"engine": {
4+
"Ethash": {
5+
"params": {
6+
"minimumDifficulty": "0x020000",
7+
"difficultyBoundDivisor": "0x0800",
8+
"durationLimit": "0x0d",
9+
"blockReward": "0x4563918244F40000",
10+
"homesteadTransition": "0x0"
11+
}
12+
}
13+
},
14+
"params": {
15+
"gasLimitBoundDivisor": "0x0400",
16+
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
17+
"accountStartNonce": "0x00",
18+
"maximumExtraDataSize": "0x20",
19+
"minGasLimit": "0x1388",
20+
"networkID" : "0x1",
21+
"maxCodeSize": 24576,
22+
"maxCodeSizeTransition": "0x0",
23+
"eip98Transition": "0xffffffffffffffff",
24+
"eip150Transition": "0x0",
25+
"eip160Transition": "0x0",
26+
"eip161abcTransition": "0x0",
27+
"eip161dTransition": "0x0",
28+
"eip210Transition": "0x0"
29+
},
30+
"genesis": {
31+
"seal": {
32+
"ethereum": {
33+
"nonce": "0x0000000000000042",
34+
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
35+
}
36+
},
37+
"difficulty": "0x400000000",
38+
"author": "0x0000000000000000000000000000000000000000",
39+
"timestamp": "0x00",
40+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
41+
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
42+
"gasLimit": "0x1388"
43+
},
44+
"accounts": {
45+
"0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
46+
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
47+
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
48+
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
49+
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } },
50+
"0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } },
51+
"0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 2000, "word": 0 } } } },
52+
"0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }
53+
}
54+
}

ethcore/src/ethereum/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ pub fn new_frontier_test_machine() -> EthereumMachine { load_machine(include_byt
151151
/// Create a new Foundation Homestead-era chain spec as though it never changed from Frontier.
152152
pub fn new_homestead_test_machine() -> EthereumMachine { load_machine(include_bytes!("../../res/ethereum/homestead_test.json")) }
153153

154+
/// Create a new Foundation Homestead-EIP210-era chain spec as though it never changed from Homestead/Frontier.
155+
pub fn new_eip210_test_machine() -> EthereumMachine { load_machine(include_bytes!("../../res/ethereum/eip210_test.json")) }
156+
154157
/// Create a new Foundation Byzantium era spec.
155158
pub fn new_byzantium_test_machine() -> EthereumMachine { load_machine(include_bytes!("../../res/ethereum/byzantium_test.json")) }
156159

ethcore/src/tests/evm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn test_blockhash_eip210(factory: Factory) {
3939
let test_blockhash_contract = "73fffffffffffffffffffffffffffffffffffffffe33141561007a57600143036020526000356101006020510755600061010060205107141561005057600035610100610100602051050761010001555b6000620100006020510714156100755760003561010062010000602051050761020001555b61014a565b4360003512151561009057600060405260206040f35b610100600035430312156100b357610100600035075460605260206060f3610149565b62010000600035430312156100d157600061010060003507146100d4565b60005b156100f6576101006101006000350507610100015460805260206080f3610148565b630100000060003543031215610116576000620100006000350714610119565b60005b1561013c57610100620100006000350507610200015460a052602060a0f3610147565b600060c052602060c0f35b5b5b5b5b";
4040
let blockhash_contract_code = Arc::new(test_blockhash_contract.from_hex().unwrap());
4141
let blockhash_contract_code_hash = keccak(blockhash_contract_code.as_ref());
42-
let machine = ::ethereum::new_constantinople_test_machine();
42+
let machine = ::ethereum::new_eip210_test_machine();
4343
let mut env_info = EnvInfo::default();
4444

4545
// populate state with 256 last hashes

0 commit comments

Comments
 (0)