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

Commit 33bfcec

Browse files
EtherCoreAdminsorpaas
authored andcommitted
Add EtherCore support (#11402)
* support ethercore mainnet with basic token metrics and ProgPoW support, ecip1017, bomb defuse & istanbul
1 parent a47a5b1 commit 33bfcec

File tree

4 files changed

+197
-1
lines changed

4 files changed

+197
-1
lines changed

ethcore/res/ethereum/ethercore.json

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"name": "EtherCore",
3+
"dataDir": "ethercore",
4+
"engine": {
5+
"Ethash": {
6+
"params": {
7+
"minimumDifficulty": "0x20000",
8+
"difficultyBoundDivisor": "0x800",
9+
"durationLimit": "0xd",
10+
"blockReward": "0xde0b6b3a7640000",
11+
"homesteadTransition": "0x0",
12+
"eip100bTransition": "0x0",
13+
"bombDefuseTransition":"0x0",
14+
"ecip1017EraRounds":"0x5f5e100",
15+
"progpowTransition": "0x0"
16+
}
17+
}
18+
},
19+
"params": {
20+
"gasLimitBoundDivisor": "0x400",
21+
"accountStartNonce": "0x0",
22+
"maximumExtraDataSize": "0x20",
23+
"minGasLimit": "0x1388",
24+
"networkID": "0x1d2",
25+
"eip150Transition": "0x0",
26+
"eip160Transition": "0x0",
27+
"eip161abcTransition": "0x0",
28+
"eip161dTransition": "0x0",
29+
"eip155Transition": "0x0",
30+
"maxCodeSize":"0x6000",
31+
"maxCodeSizeTransition":"0x0",
32+
"eip140Transition": "0x0",
33+
"eip211Transition": "0x0",
34+
"eip214Transition": "0x0",
35+
"eip658Transition": "0x0",
36+
"eip145Transition": "0x0",
37+
"eip1014Transition": "0x0",
38+
"eip1052Transition": "0x0",
39+
"eip1283Transition": "0x0",
40+
"eip1344Transition": "0x0",
41+
"eip1706Transition": "0x0",
42+
"eip1884Transition": "0x0",
43+
"eip2028Transition": "0x0"
44+
},
45+
"genesis": {
46+
"seal": {
47+
"ethereum": {
48+
"nonce": "0x0000000000000042",
49+
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
50+
}
51+
},
52+
"difficulty": "0x80000",
53+
"author": "0x0000000000000000000000000000000000000000",
54+
"timestamp": "0x5e0be100",
55+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
56+
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
57+
"gasLimit": "0x7a1200"
58+
},
59+
"nodes": [
60+
"enode://dfcfd268e7d4631cec5a94d7eeb5981a2ed3f30235c774e1bf0a4e843672405e5a1c93502e1631edf108b6f1ea8701fb97e6d892eb5e3775c70dc53b2f773b9f@207.148.105.65:30303",
61+
"enode://6c67afac3a018ee5641b0aba996f180fbb718aa7857174cad568b00440a43cccb1845124cd1cbe43c7ce1e95d597a3d20d175f0bf8494d875e83ec15e0f42cb4@207.148.105.65:30503"
62+
],
63+
"accounts": {
64+
"0x0000000000000000000000000000000000000001":{
65+
"builtin":{
66+
"name":"ecrecover",
67+
"pricing":{
68+
"linear":{
69+
"base":3000,
70+
"word":0
71+
}
72+
}
73+
}
74+
},
75+
"0x0000000000000000000000000000000000000002":{
76+
"builtin":{
77+
"name":"sha256",
78+
"pricing":{
79+
"linear":{
80+
"base":60,
81+
"word":12
82+
}
83+
}
84+
}
85+
},
86+
"0x0000000000000000000000000000000000000003":{
87+
"builtin":{
88+
"name":"ripemd160",
89+
"pricing":{
90+
"linear":{
91+
"base":600,
92+
"word":120
93+
}
94+
}
95+
}
96+
},
97+
"0x0000000000000000000000000000000000000004":{
98+
"builtin":{
99+
"name":"identity",
100+
"pricing":{
101+
"linear":{
102+
"base":15,
103+
"word":3
104+
}
105+
}
106+
}
107+
},
108+
"0x0000000000000000000000000000000000000005":{
109+
"builtin":{
110+
"name":"modexp",
111+
"activate_at":"0x0",
112+
"pricing":{
113+
"modexp":{
114+
"divisor":20
115+
}
116+
}
117+
}
118+
},
119+
"0x0000000000000000000000000000000000000006":{
120+
"builtin":{
121+
"name":"alt_bn128_add",
122+
"pricing":{
123+
"0x0":{
124+
"info":"EIP 1108 transition",
125+
"price":{
126+
"alt_bn128_const_operations":{
127+
"price":150
128+
}
129+
}
130+
}
131+
}
132+
}
133+
},
134+
"0x0000000000000000000000000000000000000007":{
135+
"builtin":{
136+
"name":"alt_bn128_mul",
137+
"pricing":{
138+
"0x0":{
139+
"info":"EIP 1108 transition",
140+
"price":{
141+
"alt_bn128_const_operations":{
142+
"price":6000
143+
}
144+
}
145+
}
146+
}
147+
}
148+
},
149+
"0x0000000000000000000000000000000000000008":{
150+
"builtin":{
151+
"name":"alt_bn128_pairing",
152+
"pricing":{
153+
"0x0":{
154+
"info":"EIP 1108 transition",
155+
"price":{
156+
"alt_bn128_pairing":{
157+
"base":45000,
158+
"pair":34000
159+
}
160+
}
161+
}
162+
}
163+
}
164+
},
165+
"0x0000000000000000000000000000000000000009":{
166+
"builtin":{
167+
"name":"blake2_f",
168+
"activate_at":"0x0",
169+
"pricing":{
170+
"blake2_f":{
171+
"gas_per_round":1
172+
}
173+
}
174+
}
175+
},
176+
"0xaf6F001FdB3CD98CD38A3f6C7306706D98689dF0":{
177+
"balance":"0x295be96e64066972000000"
178+
},
179+
"0xf182a7D9e7789E82e362A98eBC5fCAcdC2904182":{
180+
"balance":"0x295be96e64066972000000"
181+
},
182+
"0x5A23b7d2ee9dccbb7C33103d22852e1cC88548b2":{
183+
"balance":"0xf8277896582678ac000000"
184+
},
185+
"0x22e0176a4aDD34A2a32B4423437B6cf23F7dc638":{
186+
"balance":"0x6342fd08f00f6378000000"
187+
}
188+
}
189+
}

ethcore/spec/src/chain.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ bundle_release_spec! {
7575
"ethereum/musicoin" => new_musicoin,
7676
"ethereum/poacore" => new_poanet,
7777
"ethereum/xdai" => new_xdai,
78+
"ethereum/ethercore" => new_ethercore,
7879
"ethereum/poasokol" => new_sokol,
7980
"ethereum/rinkeby" => new_rinkeby,
8081
"ethereum/ropsten" => new_ropsten,

parity/cli/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ usage! {
300300

301301
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
302302
"--chain=[CHAIN]",
303-
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, classic, poacore, xdai, volta, ewc, musicoin, ellaism, mix, callisto, morden, mordor, ropsten, kovan, rinkeby, goerli, kotti, poasokol, testnet, evantestcore, evancore or dev.",
303+
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, classic, poacore, xdai, volta, ewc, musicoin, ellaism, mix, callisto, ethercore, morden, mordor, ropsten, kovan, rinkeby, goerli, kotti, poasokol, testnet, evantestcore, evancore or dev.",
304304

305305
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(),
306306
"--keys-path=[PATH]",

parity/params.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub enum SpecType {
4343
Ellaism,
4444
Mix,
4545
Callisto,
46+
EtherCore,
4647
Morden,
4748
Mordor,
4849
Ropsten,
@@ -78,6 +79,7 @@ impl str::FromStr for SpecType {
7879
"ellaism" => SpecType::Ellaism,
7980
"mix" => SpecType::Mix,
8081
"callisto" => SpecType::Callisto,
82+
"ethercore" => SpecType::EtherCore,
8183
"morden" => SpecType::Morden,
8284
"mordor" | "classic-testnet" => SpecType::Mordor,
8385
"ropsten" => SpecType::Ropsten,
@@ -108,6 +110,7 @@ impl fmt::Display for SpecType {
108110
SpecType::Ellaism => "ellaism",
109111
SpecType::Mix => "mix",
110112
SpecType::Callisto => "callisto",
113+
SpecType::EtherCore => "ethercore",
111114
SpecType::Morden => "morden",
112115
SpecType::Mordor => "mordor",
113116
SpecType::Ropsten => "ropsten",
@@ -138,6 +141,7 @@ impl SpecType {
138141
SpecType::Ellaism => Ok(spec::new_ellaism(params)),
139142
SpecType::Mix => Ok(spec::new_mix(params)),
140143
SpecType::Callisto => Ok(spec::new_callisto(params)),
144+
SpecType::EtherCore => Ok(spec::new_ethercore(params)),
141145
SpecType::Morden => Ok(spec::new_morden(params)),
142146
SpecType::Mordor => Ok(spec::new_mordor(params)),
143147
SpecType::Ropsten => Ok(spec::new_ropsten(params)),
@@ -397,6 +401,7 @@ mod tests {
397401
assert_eq!(SpecType::Ellaism, "ellaism".parse().unwrap());
398402
assert_eq!(SpecType::Mix, "mix".parse().unwrap());
399403
assert_eq!(SpecType::Callisto, "callisto".parse().unwrap());
404+
assert_eq!(SpecType::EtherCore, "ethercore".parse().unwrap());
400405
assert_eq!(SpecType::Morden, "morden".parse().unwrap());
401406
assert_eq!(SpecType::Mordor, "mordor".parse().unwrap());
402407
assert_eq!(SpecType::Mordor, "classic-testnet".parse().unwrap());
@@ -430,6 +435,7 @@ mod tests {
430435
assert_eq!(format!("{}", SpecType::Ellaism), "ellaism");
431436
assert_eq!(format!("{}", SpecType::Mix), "mix");
432437
assert_eq!(format!("{}", SpecType::Callisto), "callisto");
438+
assert_eq!(format!("{}", SpecType::EtherCore), "ethercore");
433439
assert_eq!(format!("{}", SpecType::Morden), "morden");
434440
assert_eq!(format!("{}", SpecType::Mordor), "mordor");
435441
assert_eq!(format!("{}", SpecType::Ropsten), "ropsten");

0 commit comments

Comments
 (0)