[spec] add istanbul test spec (#11033)
* [spec] add istanbul test spec (wip) * [spec] fix trailing comma * [spec] add blake2_f precompiled * [spec] specify eip1283ReenableTransition * [spec] update istanbul spec to new blake2 pricing spec
This commit is contained in:
parent
feb87c901e
commit
fc9a2933af
@ -52,6 +52,9 @@ pub fn new_constantinople_test_machine() -> Machine { load_machine(include_bytes
|
||||
/// Create a new Foundation St. Peter's (Contantinople Fix) era spec.
|
||||
pub fn new_constantinople_fix_test_machine() -> Machine { load_machine(include_bytes!("../../res/ethereum/st_peters_test.json")) }
|
||||
|
||||
/// Create a new Foundation Istanbul era spec.
|
||||
pub fn new_istanbul_test_machine() -> Machine { load_machine(include_bytes!("../../res/ethereum/istanbul_test.json")) }
|
||||
|
||||
/// Create a new Musicoin-MCIP3-era spec.
|
||||
pub fn new_mcip3_test_machine() -> Machine { load_machine(include_bytes!("../../res/ethereum/mcip3_test.json")) }
|
||||
|
||||
|
119
ethcore/res/ethereum/istanbul_test.json
Normal file
119
ethcore/res/ethereum/istanbul_test.json
Normal file
@ -0,0 +1,119 @@
|
||||
{
|
||||
"name": "Istanbul (test)",
|
||||
"engine": {
|
||||
"Ethash": {
|
||||
"params": {
|
||||
"minimumDifficulty": "0x020000",
|
||||
"difficultyBoundDivisor": "0x0800",
|
||||
"durationLimit": "0x0d",
|
||||
"blockReward": "0x1BC16D674EC80000",
|
||||
"homesteadTransition": "0x0",
|
||||
"eip100bTransition": "0x0",
|
||||
"difficultyBombDelays": {
|
||||
"0": 5000000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
|
||||
"accountStartNonce": "0x00",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x1",
|
||||
"maxCodeSize": 24576,
|
||||
"maxCodeSizeTransition": "0x0",
|
||||
"eip150Transition": "0x0",
|
||||
"eip160Transition": "0x0",
|
||||
"eip161abcTransition": "0x0",
|
||||
"eip161dTransition": "0x0",
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip155Transition": "0x0",
|
||||
"eip658Transition": "0x0",
|
||||
"eip145Transition": "0x0",
|
||||
"eip1014Transition": "0x0",
|
||||
"eip1052Transition": "0x0",
|
||||
"eip1283Transition": "0x0",
|
||||
"eip1283ReenableTransition": "0x0",
|
||||
"eip1344Transition": "0x0",
|
||||
"eip1706Transition": "0x0",
|
||||
"eip1884Transition": "0x0",
|
||||
"eip2028Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"ethereum": {
|
||||
"nonce": "0x0000000000000042",
|
||||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x400000000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
|
||||
"gasLimit": "0x1388"
|
||||
},
|
||||
"accounts": {
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 20 } } } },
|
||||
"0000000000000000000000000000000000000006": {
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"activate_at": "0x00",
|
||||
"eip1108_transition": "0x0",
|
||||
"pricing": {
|
||||
"alt_bn128_const_operations": {
|
||||
"price": 500,
|
||||
"eip1108_transition_price": 150
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"activate_at": "0x00",
|
||||
"eip1108_transition": "0x0",
|
||||
"pricing": {
|
||||
"alt_bn128_const_operations": {
|
||||
"price": 40000,
|
||||
"eip1108_transition_price": 6000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"activate_at": "0x00",
|
||||
"eip1108_transition": "0x0",
|
||||
"pricing": {
|
||||
"alt_bn128_pairing": {
|
||||
"base": 100000,
|
||||
"pair": 80000,
|
||||
"eip1108_transition_base": 45000,
|
||||
"eip1108_transition_pair": 34000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000009": {
|
||||
"builtin": {
|
||||
"name": "blake2_f",
|
||||
"activate_at": "0x00",
|
||||
"pricing": {
|
||||
"blake2_f": {
|
||||
"gas_per_round": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -86,6 +86,7 @@ bundle_test_spec! {
|
||||
"constructor" => new_test_constructor,
|
||||
"ethereum/byzantium_test" => new_byzantium_test,
|
||||
"ethereum/constantinople_test" => new_constantinople_test,
|
||||
"ethereum/istanbul_test" => new_istanbul_test,
|
||||
"ethereum/eip150_test" => new_eip150_test,
|
||||
"ethereum/eip161_test" => new_eip161_test,
|
||||
"ethereum/eip210_test" => new_eip210_test,
|
||||
@ -111,6 +112,7 @@ bundle_test_spec! {
|
||||
bundle_test_machine! {
|
||||
"ethereum/byzantium_test" => new_byzantium_test_machine,
|
||||
"ethereum/constantinople_test" => new_constantinople_test_machine,
|
||||
"ethereum/istanbul_test" => new_istanbul_test_machine,
|
||||
"ethereum/eip210_test" => new_eip210_test_machine,
|
||||
"ethereum/frontier_test" => new_frontier_test_machine,
|
||||
"ethereum/homestead_test" => new_homestead_test_machine,
|
||||
|
@ -109,6 +109,7 @@ impl<'a> EvmTestClient<'a> {
|
||||
ForkSpec::Byzantium => Some(spec::new_byzantium_test()),
|
||||
ForkSpec::Constantinople => Some(spec::new_constantinople_test()),
|
||||
ForkSpec::ConstantinopleFix => Some(spec::new_constantinople_fix_test()),
|
||||
ForkSpec::Istanbul => Some(spec::new_istanbul_test()),
|
||||
ForkSpec::EIP158ToByzantiumAt5 => Some(spec::new_transition_test()),
|
||||
ForkSpec::FrontierToHomesteadAt5 | ForkSpec::HomesteadToDaoAt5 | ForkSpec::HomesteadToEIP150At5 => None,
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ Transaction options:
|
||||
State test options:
|
||||
--chain CHAIN Run only from specific chain name (i.e. one of EIP150, EIP158,
|
||||
Frontier, Homestead, Byzantium, Constantinople,
|
||||
ConstantinopleFix, EIP158ToByzantiumAt5, FrontierToHomesteadAt5,
|
||||
ConstantinopleFix, Istanbul, EIP158ToByzantiumAt5, FrontierToHomesteadAt5,
|
||||
HomesteadToDaoAt5, HomesteadToEIP150At5).
|
||||
--only NAME Runs only a single test matching the name.
|
||||
|
||||
|
@ -31,6 +31,7 @@ pub enum ForkSpec {
|
||||
Byzantium,
|
||||
Constantinople,
|
||||
ConstantinopleFix,
|
||||
Istanbul,
|
||||
EIP158ToByzantiumAt5,
|
||||
FrontierToHomesteadAt5,
|
||||
HomesteadToDaoAt5,
|
||||
|
Loading…
Reference in New Issue
Block a user