Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ethcore/machine/src/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")) }

Expand Down
119 changes: 119 additions & 0 deletions ethcore/res/ethereum/istanbul_test.json
Original file line number Diff line number Diff line change
@@ -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",
Copy link
Copy Markdown
Collaborator

@sorpaas sorpaas Sep 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual config we need to write for Ethereum mainnet also has “eip1283DisableTransition”, so we “technically” need one here as well. But because it’s the same block as reenable transition, it won’t matter for this test config.

"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": {
Comment thread
ordian marked this conversation as resolved.
"name": "blake2_f",
"activate_at": "0x00",
"pricing": {
"blake2_f": {
"gas_per_round": 1
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions ethcore/spec/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/client/evm_test_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion evmbin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions json/src/spec/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub enum ForkSpec {
Byzantium,
Constantinople,
ConstantinopleFix,
Istanbul,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ordian This enum throws warnings for each variant. :/ Either we add dummy docs or annotate it #[allow(missing_docs)].

Copy link
Copy Markdown
Collaborator

@niklasad1 niklasad1 Sep 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is probably my fault in #11027, enabled the lint warn_missing_docs

EIP158ToByzantiumAt5,
FrontierToHomesteadAt5,
HomesteadToDaoAt5,
Expand Down