Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/paritytech/parity into wa…
Browse files Browse the repository at this point in the history
…rp_sync_on_light_client

* 'master' of https://github.com/paritytech/parity:
  ethcore: add transition flag for transaction permission contract (openethereum#9275)
  Remove all dapp permissions related settings (openethereum#9120)
  Improve return data truncate logic (openethereum#9254)
  Update wasm-tests hash (openethereum#9295)
  Implement KIP4: create2 for wasm (openethereum#9277)
  Fix loop start value (openethereum#9285)
  Avoid using $HOME if not necessary (openethereum#9273)
  Fix path to parity.h (openethereum#9274)
  • Loading branch information
ordian committed Aug 7, 2018
2 parents 8424ad6 + 712101b commit 00aea86
Show file tree
Hide file tree
Showing 55 changed files with 360 additions and 1,287 deletions.
15 changes: 10 additions & 5 deletions ethcore/evm/src/interpreter/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,19 @@ impl Memory for Vec<u8> {
fn into_return_data(mut self, offset: U256, size: U256) -> ReturnData {
let mut offset = offset.low_u64() as usize;
let size = size.low_u64() as usize;

if !is_valid_range(offset, size) {
return ReturnData::empty()
return ReturnData::empty();
}

if self.len() - size > MAX_RETURN_WASTE_BYTES {
{ let _ = self.drain(..offset); }
self.truncate(size);
self.shrink_to_fit();
offset = 0;
if offset == 0 {
self.truncate(size);
self.shrink_to_fit();
} else {
self = self[offset..(offset + size)].to_vec();
offset = 0;
}
}
ReturnData::new(self, offset, size)
}
Expand Down
2 changes: 2 additions & 0 deletions ethcore/evm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ fn test_calls(factory: super::Factory) {

assert_set_contains(&ext.calls, &FakeCall {
call_type: FakeCallType::Call,
create_scheme: None,
gas: U256::from(2556),
sender_address: Some(address.clone()),
receive_address: Some(code_address.clone()),
Expand All @@ -755,6 +756,7 @@ fn test_calls(factory: super::Factory) {
});
assert_set_contains(&ext.calls, &FakeCall {
call_type: FakeCallType::Call,
create_scheme: None,
gas: U256::from(2556),
sender_address: Some(address.clone()),
receive_address: Some(address.clone()),
Expand Down
3 changes: 2 additions & 1 deletion ethcore/res/tx_permission_tests/contract_ver_2_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"minGasLimit": "0x1388",
"networkID" : "0x69",
"gasLimitBoundDivisor": "0x0400",
"transactionPermissionContract": "0x0000000000000000000000000000000000000005"
"transactionPermissionContract": "0x0000000000000000000000000000000000000005",
"transactionPermissionContractTransition": "1"
},
"genesis": {
"seal": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"minGasLimit": "0x1388",
"networkID" : "0x69",
"gasLimitBoundDivisor": "0x0400",
"transactionPermissionContract": "0x0000000000000000000000000000000000000005"
"transactionPermissionContract": "0x0000000000000000000000000000000000000005",
"transactionPermissionContractTransition": "1"
},
"genesis": {
"seal": {
Expand Down
2 changes: 1 addition & 1 deletion ethcore/res/wasm-tests
Loading

0 comments on commit 00aea86

Please sign in to comment.