Add Musicoin and MCIP-3 UBI hardfork. (#6621)
* Add musicoin chain spec. * Add musicoin to parity node * Add musicoin to the wallet * Add i18n for musicoin * Align musicoin chain spec with 1.8, ref #6134 * Update musicoin bootnodes * Prepare MCIP-3 in musicoin chain spec. * Update musicoin chain spec with contract addresses for MCIP-3 * Extend ethash params by MCIP-3 * Fix musicoin chain spec json * Use U256 for block rewards. * Update musicoin registrar * Fix merge leftovers * Update musicoin chain spec for latest master * Bestow MCIP-3 block reward(s). * Update musicoin registry once and for all * Align MCIP-3 block reward with go implementation * Remove mcip3 test chain spec from repository * Update MCIP-3 block rewards * Musicoin homestead transition is at 1_150_000 * Expect mcip3 transtion to be properly defined in chain spec. * Panic handling for mcip to default to regular block rewards if not specified * Giving mcip3 rewards a useful default value. * Fix ethjson tests. * Update musicoin chain spec * Fix tests 0:) * Add musicoin mcip3 era test spec. * Update musicoin chain spec(s) * Add tests for mcip3 era block rewards * Fix tests * Disable byzantium for musicoin * Pass miner reward to the tracer. * Allow modifying blockreward in MCIP-3 transition.
This commit is contained in:
@@ -301,7 +301,7 @@ usage! {
|
||||
|
||||
ARG arg_chain: (String) = "foundation", or |c: &Config| otry!(c.parity).chain.clone(),
|
||||
"--chain=[CHAIN]",
|
||||
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, testnet, kovan or dev.",
|
||||
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, musicoin, testnet, kovan or dev.",
|
||||
|
||||
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| otry!(c.parity).keys_path.clone(),
|
||||
"--keys-path=[PATH]",
|
||||
|
||||
@@ -35,6 +35,7 @@ pub enum SpecType {
|
||||
Olympic,
|
||||
Classic,
|
||||
Expanse,
|
||||
Musicoin,
|
||||
Dev,
|
||||
Custom(String),
|
||||
}
|
||||
@@ -57,6 +58,7 @@ impl str::FromStr for SpecType {
|
||||
"kovan" | "testnet" => SpecType::Kovan,
|
||||
"olympic" => SpecType::Olympic,
|
||||
"expanse" => SpecType::Expanse,
|
||||
"musicoin" => SpecType::Musicoin,
|
||||
"dev" => SpecType::Dev,
|
||||
other => SpecType::Custom(other.into()),
|
||||
};
|
||||
@@ -73,6 +75,7 @@ impl fmt::Display for SpecType {
|
||||
SpecType::Olympic => "olympic",
|
||||
SpecType::Classic => "classic",
|
||||
SpecType::Expanse => "expanse",
|
||||
SpecType::Musicoin => "musicoin",
|
||||
SpecType::Kovan => "kovan",
|
||||
SpecType::Dev => "dev",
|
||||
SpecType::Custom(ref custom) => custom,
|
||||
@@ -90,6 +93,7 @@ impl SpecType {
|
||||
SpecType::Olympic => Ok(ethereum::new_olympic(params)),
|
||||
SpecType::Classic => Ok(ethereum::new_classic(params)),
|
||||
SpecType::Expanse => Ok(ethereum::new_expanse(params)),
|
||||
SpecType::Musicoin => Ok(ethereum::new_musicoin(params)),
|
||||
SpecType::Kovan => Ok(ethereum::new_kovan(params)),
|
||||
SpecType::Dev => Ok(Spec::new_instant()),
|
||||
SpecType::Custom(ref filename) => {
|
||||
@@ -103,6 +107,7 @@ impl SpecType {
|
||||
match *self {
|
||||
SpecType::Classic => Some("classic".to_owned()),
|
||||
SpecType::Expanse => Some("expanse".to_owned()),
|
||||
SpecType::Musicoin => Some("musicoin".to_owned()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
@@ -353,6 +358,7 @@ mod tests {
|
||||
assert_eq!(format!("{}", SpecType::Olympic), "olympic");
|
||||
assert_eq!(format!("{}", SpecType::Classic), "classic");
|
||||
assert_eq!(format!("{}", SpecType::Expanse), "expanse");
|
||||
assert_eq!(format!("{}", SpecType::Musicoin), "musicoin");
|
||||
assert_eq!(format!("{}", SpecType::Kovan), "kovan");
|
||||
assert_eq!(format!("{}", SpecType::Dev), "dev");
|
||||
assert_eq!(format!("{}", SpecType::Custom("foo/bar".into())), "foo/bar");
|
||||
|
||||
Reference in New Issue
Block a user