Byzantium updates (#5855)
* EIP-211 updates * benchmarks * blockhash instruction gas cost updated * More benches * EIP-684 * EIP-649 * EIP-658 * Updated some tests * Modexp fixes * STATICCALL fixes * Pairing fixes * More STATICALL fixes * Use paritytech/bn * Fixed REVERTing of contract creation * Fixed more tests * Fixed more tests * Blockchain tests * Enable previously broken tests * Transition test * Updated tests * Fixed modexp reading huge numbers * Enabled max_code_size test * Review fixes * Updated pairing pricing * missing commas (style) * Update test.rs * Small improvements * eip161abc
This commit is contained in:
committed by
Gav Wood
parent
b602fb4a5e
commit
25b35ebddd
@@ -24,7 +24,7 @@ fn test_blockhash_eip210(factory: Factory) {
|
||||
let test_blockhash_contract = "73fffffffffffffffffffffffffffffffffffffffe33141561007a57600143036020526000356101006020510755600061010060205107141561005057600035610100610100602051050761010001555b6000620100006020510714156100755760003561010062010000602051050761020001555b61014a565b4360003512151561009057600060405260206040f35b610100600035430312156100b357610100600035075460605260206060f3610149565b62010000600035430312156100d157600061010060003507146100d4565b60005b156100f6576101006101006000350507610100015460805260206080f3610148565b630100000060003543031215610116576000620100006000350714610119565b60005b1561013c57610100620100006000350507610200015460a052602060a0f3610147565b600060c052602060c0f35b5b5b5b5b";
|
||||
let blockhash_contract_code = Arc::new(test_blockhash_contract.from_hex().unwrap());
|
||||
let blockhash_contract_code_hash = keccak(blockhash_contract_code.as_ref());
|
||||
let engine = TestEngine::new_metropolis();
|
||||
let engine = TestEngine::new_constantinople();
|
||||
let mut env_info = EnvInfo::default();
|
||||
|
||||
// populate state with 256 last hashes
|
||||
|
||||
@@ -42,15 +42,6 @@ use transaction::{Action, Transaction, SignedTransaction};
|
||||
use rlp::{self, RlpStream};
|
||||
use views::BlockView;
|
||||
|
||||
#[cfg(feature = "json-tests")]
|
||||
pub enum ChainEra {
|
||||
Frontier,
|
||||
Homestead,
|
||||
Eip150,
|
||||
_Eip161,
|
||||
TransitionTest,
|
||||
}
|
||||
|
||||
pub struct TestEngine {
|
||||
engine: Arc<Engine>,
|
||||
max_depth: usize,
|
||||
@@ -64,9 +55,16 @@ impl TestEngine {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_metropolis() -> TestEngine {
|
||||
pub fn new_byzantium() -> TestEngine {
|
||||
TestEngine {
|
||||
engine: ethereum::new_metropolis_test().engine,
|
||||
engine: ethereum::new_byzantium_test().engine,
|
||||
max_depth: 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_constantinople() -> TestEngine {
|
||||
TestEngine {
|
||||
engine: ethereum::new_constantinople_test().engine,
|
||||
max_depth: 0,
|
||||
}
|
||||
}
|
||||
@@ -427,5 +425,8 @@ pub fn get_default_ethash_params() -> EthashParams {
|
||||
max_gas_limit: U256::max_value(),
|
||||
min_gas_price_transition: u64::max_value(),
|
||||
min_gas_price: U256::zero(),
|
||||
eip649_transition: u64::max_value(),
|
||||
eip649_delay: 3_000_000,
|
||||
eip649_reward: None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user