Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #262 from ethcore/fixed_crashing_tests
Browse files Browse the repository at this point in the history
changed max vm depth from 128 to 64, change homestead block to 1_000_000
  • Loading branch information
Gav Wood committed Jan 29, 2016
2 parents 53f9bff + d3b4cfd commit 45bc887
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion res/ethereum/frontier.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engineName": "Ethash",
"params": {
"accountStartNonce": "0x00",
"frontierCompatibilityModeLimit": "0xdbba0",
"frontierCompatibilityModeLimit": "0xf4240",
"maximumExtraDataSize": "0x20",
"tieBreakingGas": false,
"minGasLimit": "0x1388",
Expand Down
2 changes: 1 addition & 1 deletion res/ethereum/frontier_like_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engineName": "Ethash",
"params": {
"accountStartNonce": "0x00",
"frontierCompatibilityModeLimit": "0x0dbba0",
"frontierCompatibilityModeLimit": "0xf4240",
"maximumExtraDataSize": "0x20",
"tieBreakingGas": false,
"minGasLimit": "0x1388",
Expand Down
2 changes: 1 addition & 1 deletion src/executive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crossbeam;
/// Max depth to avoid stack overflow (when it's reached we start a new thread with VM)
/// TODO [todr] We probably need some more sophisticated calculations here (limit on my machine 132)
/// Maybe something like here: https://github.com/ethereum/libethereum/blob/4db169b8504f2b87f7d5a481819cfb959fc65f6c/libethereum/ExtVM.cpp
const MAX_VM_DEPTH_FOR_THREAD: usize = 128;
const MAX_VM_DEPTH_FOR_THREAD: usize = 64;

/// Returns new address created from address and given nonce.
pub fn contract_address(address: &Address, nonce: &U256) -> Address {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn do_json_test(json_data: &[u8]) -> Vec<String> {
let schedule = match test.find("blocknumber")
.and_then(|j| j.as_string())
.and_then(|s| BlockNumber::from_str(s).ok())
.unwrap_or(0) { x if x < 900000 => &old_schedule, _ => &new_schedule };
.unwrap_or(0) { x if x < 1_000_000 => &old_schedule, _ => &new_schedule };
let rlp = Bytes::from_json(&test["rlp"]);
let res = UntrustedRlp::new(&rlp).as_val().map_err(From::from).and_then(|t: Transaction| t.validate(schedule, schedule.have_delegate_call));
fail_unless(test.find("transaction").is_none() == res.is_err());
Expand Down

0 comments on commit 45bc887

Please sign in to comment.