-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ethcore/res: add mordor testnet configuration #11200
Changes from 3 commits
d4996f1
2499b2f
e9bbc00
7585324
a9bafda
bd1c7b8
5da3db1
d5ab017
fe55bbd
23f1beb
b42c98b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
{ | ||
"name":"Mordor Classic Testnet", | ||
"dataDir":"mordor", | ||
"engine":{ | ||
"Ethash":{ | ||
"params":{ | ||
"minimumDifficulty":"0x20000", | ||
"difficultyBoundDivisor":"0x800", | ||
"durationLimit":"0xd", | ||
"blockReward":"0x4563918244F40000", | ||
"homesteadTransition":"0x0", | ||
"ecip1010PauseTransition":"0x0", | ||
"ecip1010ContinueTransition":"0x0", | ||
"ecip1017EraRounds":"0x1e8480", | ||
"bombDefuseTransition":"0x0", | ||
"eip100bTransition":"0x0" | ||
} | ||
} | ||
}, | ||
"params":{ | ||
"gasLimitBoundDivisor":"0x400", | ||
"accountStartNonce":"0x0", | ||
"maximumExtraDataSize":"0x20", | ||
"minGasLimit":"0x1388", | ||
"networkID":"0x7", | ||
"chainID":"0x3f", | ||
"eip150Transition":"0x0", | ||
"eip160Transition":"0x0", | ||
"eip161abcTransition":"0x0", | ||
"eip161dTransition":"0x0", | ||
"eip155Transition":"0x0", | ||
"maxCodeSize":"0x6000", | ||
"maxCodeSizeTransition":"0x0", | ||
"eip140Transition":"0x0", | ||
"eip211Transition":"0x0", | ||
"eip214Transition":"0x0", | ||
"eip658Transition":"0x0" | ||
}, | ||
"genesis":{ | ||
"seal":{ | ||
"ethereum":{ | ||
"nonce":"0x0000000000000000", | ||
"mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000" | ||
} | ||
}, | ||
"difficulty":"0x20000", | ||
"author":"0x0000000000000000000000000000000000000000", | ||
"timestamp":"0x5d9676db", | ||
"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"extraData":"0x70686f656e697820636869636b656e206162737572642062616e616e61", | ||
"gasLimit":"0x2fefd8" | ||
}, | ||
"nodes":[ | ||
"enode://03b133f731049e3f7be827339c3759be92778c05e54a1847d178c0fdb56fa168aa1e7e61fc77791a7afdd0328a00318f73c01212eb3f3bbe919f5ce8f5b4a314@192.227.105.4:32000", | ||
"enode://06fdbeb591d26f53b2e7250025fe955ca013431ded930920cf1e3cd1f0c920e9a5e727949d209bc25a07288327b525279b11c5551315c50ff0db483e69fc159b@34.218.225.178:32000", | ||
"enode://1813e90a0afdd7c1e4892c5376960e3577a9e6c5a4f86fa405a405c7421a4a1608248d77cc90333842f13d8954d82113dec480cfb76b4fef8cb475157cf4d5f2@10.28.224.3:30000", | ||
"enode://2b69a3926f36a7748c9021c34050be5e0b64346225e477fe7377070f6289bd363b2be73a06010fd516e6ea3ee90778dd0399bc007bb1281923a79374f842675a@51.15.116.226:30303", | ||
"enode://621e28e529146fd501709194885f50540c494f1a2985d1fb4ec8769226b5cb0b0d1a11545926077821474c2767cdd87888ead8a2509a2c9069dd5584e4b1c3b8@10.28.223.8:30000", | ||
"enode://a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd@51.15.116.226:30303" | ||
], | ||
"accounts":{ | ||
"0x0000000000000000000000000000000000000001":{ | ||
"builtin":{ | ||
"name":"ecrecover", | ||
"pricing":{ | ||
"linear":{ | ||
"base":3000, | ||
"word":0 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000002":{ | ||
"builtin":{ | ||
"name":"sha256", | ||
"pricing":{ | ||
"linear":{ | ||
"base":60, | ||
"word":12 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000003":{ | ||
"builtin":{ | ||
"name":"ripemd160", | ||
"pricing":{ | ||
"linear":{ | ||
"base":600, | ||
"word":120 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000004":{ | ||
"builtin":{ | ||
"name":"identity", | ||
"pricing":{ | ||
"linear":{ | ||
"base":15, | ||
"word":3 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000005":{ | ||
"builtin":{ | ||
"activate_at":"0x0", | ||
"name":"modexp", | ||
"pricing":{ | ||
"modexp":{ | ||
"divisor":20 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000006":{ | ||
"builtin":{ | ||
"activate_at":"0x0", | ||
"name":"alt_bn128_add", | ||
"eip1108_transition": "0x7fffffffffffff", | ||
"pricing":{ | ||
"alt_bn128_const_operations": { | ||
"price": 500, | ||
"eip1108_transition_price": 150 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000007":{ | ||
"builtin":{ | ||
"activate_at":"0x0", | ||
"eip1108_transition": "0x7fffffffffffff", | ||
"name":"alt_bn128_mul", | ||
"pricing":{ | ||
"alt_bn128_const_operations": { | ||
"price": 40000, | ||
"eip1108_transition_price": 6000 | ||
} | ||
} | ||
} | ||
}, | ||
"0x0000000000000000000000000000000000000008":{ | ||
"builtin":{ | ||
"activate_at":"0x0", | ||
"eip1108_transition": "0x7fffffffffffff", | ||
"name":"alt_bn128_pairing", | ||
"pricing":{ | ||
"alt_bn128_pairing": { | ||
"base": 100000, | ||
"pair": 80000, | ||
"eip1108_transition_base": 45000, | ||
"eip1108_transition_pair": 34000 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,7 @@ mod accounts { | |
let account_settings = AccountProviderSettings { | ||
unlock_keep_secret: cfg.enable_fast_unlock, | ||
blacklisted_accounts: match *spec { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For my education, what is this blacklist for? The docs are oxymoronic: "/// Disallowed accounts.". What did There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a relict from the parity wallet UI. there was a chance that a user did not follow instructions and recovered an account from an empty seed phrase. this account is blacklisted from mainnet usage for safety reasons. but as we no longer have the wallet, we could also remove this. |
||
SpecType::Morden | SpecType::Ropsten | SpecType::Kovan | SpecType::Sokol | SpecType::Dev => vec![], | ||
SpecType::Morden | SpecType::Mordor | SpecType::Ropsten | SpecType::Kovan | SpecType::Goerli | SpecType::Kotti | SpecType::Sokol | SpecType::Dev => vec![], | ||
_ => vec![ | ||
H160::from_str("00a329c0648769a73afac7f9381e08fb43dbea72").expect("the string is valid hex; qed"), | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ pub enum SpecType { | |
Mix, | ||
Callisto, | ||
Morden, | ||
Mordor, | ||
Ropsten, | ||
Kovan, | ||
Rinkeby, | ||
|
@@ -63,8 +64,8 @@ impl str::FromStr for SpecType { | |
|
||
fn from_str(s: &str) -> Result<Self, Self::Err> { | ||
let spec = match s { | ||
"ethereum" | "frontier" | "homestead" | "byzantium" | "foundation" | "mainnet" => SpecType::Foundation, | ||
"classic" | "frontier-dogmatic" | "homestead-dogmatic" => SpecType::Classic, | ||
"eth" | "ethereum" | "foundation" | "mainnet" => SpecType::Foundation, | ||
"etc" | "classic" => SpecType::Classic, | ||
"poanet" | "poacore" => SpecType::Poanet, | ||
"xdai" => SpecType::Xdai, | ||
"volta" => SpecType::Volta, | ||
|
@@ -73,11 +74,12 @@ impl str::FromStr for SpecType { | |
"ellaism" => SpecType::Ellaism, | ||
"mix" => SpecType::Mix, | ||
"callisto" => SpecType::Callisto, | ||
"morden" | "classic-testnet" => SpecType::Morden, | ||
"morden" => SpecType::Morden, | ||
"mordor" | "classic-testnet" => SpecType::Morden, | ||
"ropsten" => SpecType::Ropsten, | ||
"kovan" | "testnet" => SpecType::Kovan, | ||
"kovan" => SpecType::Kovan, | ||
"rinkeby" => SpecType::Rinkeby, | ||
"goerli" | "görli" => SpecType::Goerli, | ||
"goerli" | "görli" | "testnet" => SpecType::Goerli, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, how about we remove "testnet" altogether? What is it useful for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I missed the explanation in the PR descr. Something for the relnotes then (cc @s3krit) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's a legacy option. I'm open to removing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's do that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made a note to myself for the release notes. Thanks |
||
"kotti" => SpecType::Kotti, | ||
"sokol" | "poasokol" => SpecType::Sokol, | ||
"dev" => SpecType::Dev, | ||
|
@@ -101,6 +103,7 @@ impl fmt::Display for SpecType { | |
SpecType::Mix => "mix", | ||
SpecType::Callisto => "callisto", | ||
SpecType::Morden => "morden", | ||
SpecType::Mordor => "mordor", | ||
SpecType::Ropsten => "ropsten", | ||
SpecType::Kovan => "kovan", | ||
SpecType::Rinkeby => "rinkeby", | ||
|
@@ -128,6 +131,7 @@ impl SpecType { | |
SpecType::Mix => Ok(spec::new_mix(params)), | ||
SpecType::Callisto => Ok(spec::new_callisto(params)), | ||
SpecType::Morden => Ok(spec::new_morden(params)), | ||
SpecType::Mordor => Ok(spec::new_mordor(params)), | ||
SpecType::Ropsten => Ok(spec::new_ropsten(params)), | ||
SpecType::Kovan => Ok(spec::new_kovan(params)), | ||
SpecType::Rinkeby => Ok(spec::new_rinkeby(params)), | ||
|
@@ -364,15 +368,12 @@ mod tests { | |
|
||
#[test] | ||
fn test_spec_type_parsing() { | ||
assert_eq!(SpecType::Foundation, "eth".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "ethereum".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "foundation".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "frontier".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "homestead".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "byzantium".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "mainnet".parse().unwrap()); | ||
assert_eq!(SpecType::Foundation, "ethereum".parse().unwrap()); | ||
assert_eq!(SpecType::Classic, "etc".parse().unwrap()); | ||
assert_eq!(SpecType::Classic, "classic".parse().unwrap()); | ||
assert_eq!(SpecType::Classic, "frontier-dogmatic".parse().unwrap()); | ||
assert_eq!(SpecType::Classic, "homestead-dogmatic".parse().unwrap()); | ||
assert_eq!(SpecType::Poanet, "poanet".parse().unwrap()); | ||
assert_eq!(SpecType::Poanet, "poacore".parse().unwrap()); | ||
assert_eq!(SpecType::Xdai, "xdai".parse().unwrap()); | ||
|
@@ -384,13 +385,14 @@ mod tests { | |
assert_eq!(SpecType::Mix, "mix".parse().unwrap()); | ||
assert_eq!(SpecType::Callisto, "callisto".parse().unwrap()); | ||
assert_eq!(SpecType::Morden, "morden".parse().unwrap()); | ||
assert_eq!(SpecType::Morden, "classic-testnet".parse().unwrap()); | ||
assert_eq!(SpecType::Mordor, "mordor".parse().unwrap()); | ||
assert_eq!(SpecType::Mordor, "classic-testnet".parse().unwrap()); | ||
assert_eq!(SpecType::Ropsten, "ropsten".parse().unwrap()); | ||
assert_eq!(SpecType::Kovan, "kovan".parse().unwrap()); | ||
assert_eq!(SpecType::Kovan, "testnet".parse().unwrap()); | ||
assert_eq!(SpecType::Rinkeby, "rinkeby".parse().unwrap()); | ||
assert_eq!(SpecType::Goerli, "goerli".parse().unwrap()); | ||
assert_eq!(SpecType::Goerli, "görli".parse().unwrap()); | ||
assert_eq!(SpecType::Goerli, "testnet".parse().unwrap()); | ||
assert_eq!(SpecType::Kotti, "kotti".parse().unwrap()); | ||
assert_eq!(SpecType::Sokol, "sokol".parse().unwrap()); | ||
assert_eq!(SpecType::Sokol, "poasokol".parse().unwrap()); | ||
|
@@ -414,6 +416,7 @@ mod tests { | |
assert_eq!(format!("{}", SpecType::Mix), "mix"); | ||
assert_eq!(format!("{}", SpecType::Callisto), "callisto"); | ||
assert_eq!(format!("{}", SpecType::Morden), "morden"); | ||
assert_eq!(format!("{}", SpecType::Mordor), "mordor"); | ||
assert_eq!(format!("{}", SpecType::Ropsten), "ropsten"); | ||
assert_eq!(format!("{}", SpecType::Kovan), "kovan"); | ||
assert_eq!(format!("{}", SpecType::Rinkeby), "rinkeby"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we would probably want to adapt it to the new format after #11039 is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't see #11039 as blocker for this PR, but happy to convert it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I'm just saying whichever will be merged last, gets to fix it, since we're making a breaking change in #11039
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we'll backport #11039 so we might need to have it both ways. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry @soc1c but this needs to be resolved after #11039
eip1108_params
are removed