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

2.6.1-beta #10973

Merged
merged 11 commits into from
Aug 14, 2019
33 changes: 24 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ variables:
sccache --start-server
- sccache -s
after_script:
# sccache debug info
# sccache debug info
- if test -e sccache_debug.log;
then
echo "_____All crate-types:_____";
Expand Down Expand Up @@ -147,7 +147,7 @@ test-linux-nightly:

build-android:
<<: *build-on-linux
image: parity/rust-parity-ethereum-android-build:stretch
image: parity/parity-ci-android:stretch
variables:
CARGO_TARGET: armv7-linux-androideabi

Expand All @@ -158,21 +158,21 @@ build-linux:
build-linux-i386:
<<: *build-on-linux
only: *releaseable_branches
image: parity/rust-parity-ethereum-build:i386
image: parity/parity-ci-i386:latest
variables:
CARGO_TARGET: i686-unknown-linux-gnu

build-linux-arm64:
<<: *build-on-linux
only: *releaseable_branches
image: parity/rust-parity-ethereum-build:arm64
image: parity/parity-ci-arm64:latest
variables:
CARGO_TARGET: aarch64-unknown-linux-gnu

build-linux-armhf:
<<: *build-on-linux
only: *releaseable_branches
image: parity/rust-parity-ethereum-build:armhf
image: parity/parity-ci-armhf:latest
variables:
CARGO_TARGET: armv7-unknown-linux-gnueabihf

Expand Down Expand Up @@ -310,16 +310,31 @@ publish-awss3-release:
- linux-docker

publish-docs:
stage: publish
image: parity/rust-parity-ethereum-docs:xenial
stage: publish
image: parity/parity-ci-docs:latest
only:
- tags
except:
- nightly
cache: {}
dependencies: []
cache: {}
dependencies: []
script:
- scripts/gitlab/publish-docs.sh
tags:
- linux-docker
allow_failure: true

publish-av-whitelist:
stage: publish
<<: *no_git
only: *releaseable_branches
except:
variables:
- $SCHEDULE_TAG == "nightly"
cache: {}
dependencies:
- build-windows
script:
- scripts/gitlab/publish-av-whitelists.sh
tags:
- linux-docker
291 changes: 156 additions & 135 deletions CHANGELOG.md

Large diffs are not rendered by default.

151 changes: 41 additions & 110 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Parity Ethereum client"
name = "parity-ethereum"
# NOTE Make sure to update util/version/Cargo.toml as well
version = "2.6.0"
version = "2.6.1"
license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"]

Expand Down
128 changes: 128 additions & 0 deletions docs/CHANGELOG-2.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
## Parity-Ethereum [v2.4.9](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.9)

Parity Ethereum v2.4.9-stable is a security update which addresses servo/rust-smallvec#148

The full list of included changes:

* cargo update -p smallvec ([#10822](https://github.com/paritytech/parity-ethereum/pull/10822))

## Parity-Ethereum [v2.4.8](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.8)

Parity-Ethereum 2.4.8-stable is a bugfix release that improves performance and stability.

* Blockchain: fix reset chain
* State tests: treat empty accounts the same as non-existant accounts (EIP 1052)
* Aura: fix Timestamp Overflow
* Networking: support discovery-only peers (geth bootnodes)
* Snapshotting: fix unclean shutdown while snappshotting is under way

The full list of included changes:

* ethcore/res: activate atlantis classic hf on block 8772000 ([#10766](https://github.com/paritytech/parity-ethereum/pull/10766))
* fix docker tags for publishing ([#10741](https://github.com/paritytech/parity-ethereum/pull/10741))
* Reset blockchain properly ([#10669](https://github.com/paritytech/parity-ethereum/pull/10669))
* adds rpc error message for --no-ancient-blocks ([#10608](https://github.com/paritytech/parity-ethereum/pull/10608))
* Treat empty account the same as non-exist accounts in EIP-1052 ([#10775](https://github.com/paritytech/parity-ethereum/pull/10775))
* fix: aura don't add `SystemTime::now()` ([#10720](https://github.com/paritytech/parity-ethereum/pull/10720))
* DevP2p: Get node IP address and udp port from Socket, if not included in PING packet ([#10705](https://github.com/paritytech/parity-ethereum/pull/10705))
* Revert "fix: aura don't add `SystemTime::now()` ([#10720](https://github.com/paritytech/parity-ethereum/pull/10720))"
* Add a way to signal shutdown to snapshotting threads ([#10744](https://github.com/paritytech/parity-ethereum/pull/10744))

## Parity-Ethereum [v2.4.7](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.7)

Parity-Ethereum 2.4.7-stable is a bugfix release that improves performance and stability.

Among others, it enables the _Atlantis_ hardfork on **Morden** and **Kotti** Classic networks.

The full list of included changes:

* [CI] allow cargo audit to fail ([#10676](https://github.com/paritytech/parity-ethereum/pull/10676))
* new image ([#10673](https://github.com/paritytech/parity-ethereum/pull/10673))
* Update publishing ([#10644](https://github.com/paritytech/parity-ethereum/pull/10644))
* enable lto for release builds ([#10717](https://github.com/paritytech/parity-ethereum/pull/10717))
* Use RUSTFLAGS to set the optimization level ([#10719](https://github.com/paritytech/parity-ethereum/pull/10719))
* ethcore: enable ECIP-1054 for classic ([#10731](https://github.com/paritytech/parity-ethereum/pull/10731))

## Parity-Ethereum [v2.4.6](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.6)

Parity-Ethereum 2.4.6-stable is a bugfix release that improves performance and stability.

Among others, it enables the Petersburg hardfork on **Rinkeby** and **POA-Core** Network, as well as the **Kovan** Network community hardfork.

The full list of included changes:

* ci: publish docs debug ([#10638](https://github.com/paritytech/parity-ethereum/pull/10638))

## Parity-Ethereum [v2.4.5](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.5)

Parity-Ethereum 2.4.5-stable is a bugfix release that improves performance and stability. This release improves memory optimizations around timestamp handling and stabilizes the 2.4 release branch.

As of today, Parity-Ethereum 2.3 reaches end of life and everyone is encouraged to upgrade.

## Parity-Ethereum [v2.4.4](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.4)

Parity-Ethereum 2.4.4-beta is a bugfix release that improves performance and stability. This patch release removes the dead chain configs for Easthub and Ethereum Social.

The full list of included changes:

* fix(rpc-types): replace uint and hash with `ethereum_types v0.4` ([#10217](https://github.com/paritytech/parity-ethereum/pull/10217))
* chore(bump ethereum-types) ([#10396](https://github.com/paritytech/parity-ethereum/pull/10396))
* fix(light eth_gasPrice): ask network if not in cache ([#10535](https://github.com/paritytech/parity-ethereum/pull/10535))
* fix(light account response): update `tx_queue` ([#10545](https://github.com/paritytech/parity-ethereum/pull/10545))
* fix(bump dependencies) ([#10540](https://github.com/paritytech/parity-ethereum/pull/10540))
* tx-pool: check transaction readiness before replacing ([#10526](https://github.com/paritytech/parity-ethereum/pull/10526))
* fix #10390 ([#10391](https://github.com/paritytech/parity-ethereum/pull/10391))
* private-tx: replace error_chain ([#10510](https://github.com/paritytech/parity-ethereum/pull/10510))

## Parity-Ethereum [v2.4.3](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.3)

Parity-Ethereum 2.4.3-beta is a bugfix release that improves performance and stability. This patch release contains a critical bug fix where serving light clients previously led to client crashes. Upgrading is highly recommended.

The full list of included changes:

* Add additional request tests ([#10503](https://github.com/paritytech/parity-ethereum/pull/10503))

## Parity-Ethereum [v2.4.2](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.2)

Parity-Ethereum 2.4.2-beta is a bugfix release that improves performance and stability.

The full list of included changes:

* Сaching through docker volume ([#10477](https://github.com/paritytech/parity-ethereum/pull/10477))
* fix win&mac build ([#10486](https://github.com/paritytech/parity-ethereum/pull/10486))
* fix(extract `timestamp_checked_add` as lib) ([#10383](https://github.com/paritytech/parity-ethereum/pull/10383))

## Parity-Ethereum [v2.4.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.1)

Parity-Ethereum 2.4.1-beta is a bugfix release that improves performance and stability.

The full list of included changes:

* Implement parity_versionInfo & parity_setChain on LC; fix parity_setChain ([#10312](https://github.com/paritytech/parity-ethereum/pull/10312))
* CI publish to aws ([#10446](https://github.com/paritytech/parity-ethereum/pull/10446))
* CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))
* Revert "CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))" (#10456)
* Revert "CI aws git checkout ([#10451](https://github.com/paritytech/parity-ethereum/pull/10451))"
* Tests parallelized ([#10452](https://github.com/paritytech/parity-ethereum/pull/10452))
* Ensure static validator set changes are recognized ([#10467](https://github.com/paritytech/parity-ethereum/pull/10467))

## Parity-Ethereum [v2.4.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.4.0)

Parity-Ethereum 2.4.0-beta is our trifortnightly minor version release coming with a lot of new features as well as bugfixes and performance improvements.

Notable changes:
- Account management is now deprecated ([#10213](https://github.com/paritytech/parity-ethereum/pull/10213))
- Local accounts can now be specified via CLI ([#9960](https://github.com/paritytech/parity-ethereum/pull/9960))
- Chains can now be reset to a particular block via CLI ([#9782](https://github.com/paritytech/parity-ethereum/pull/9782))
- Ethash now additionally implements ProgPoW ([#9762](https://github.com/paritytech/parity-ethereum/pull/9762))
- The `eip1283DisableTransition` flag was added to revert EIP-1283 ([#10214](https://github.com/paritytech/parity-ethereum/pull/10214))

The full list of included changes:

* revert some changes, could be buggy ([#10399](https://github.com/paritytech/parity-ethereum/pull/10399))
* 10000 > 5000 ([#10422](https://github.com/paritytech/parity-ethereum/pull/10422))
* fix panic when logging directory does not exist, closes #10420 ([#10424](https://github.com/paritytech/parity-ethereum/pull/10424))
* fix underflow in pip, closes #10419 ([#10423](https://github.com/paritytech/parity-ethereum/pull/10423))
* ci: clean up gitlab-ci.yml leftovers from previous merge ([#10429](https://github.com/paritytech/parity-ethereum/pull/10429))
* Update hardcoded headers for Foundation, Ropsten, Kovan and Classic ([#10417](https://github.com/paritytech/parity-ethereum/pull/10417))

4 changes: 2 additions & 2 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ansi_term = "0.11"
blooms-db = { path = "../util/blooms-db", optional = true }
bn = { git = "https://github.com/paritytech/bn", default-features = false }
common-types = { path = "types" }
crossbeam = "0.4"
crossbeam-utils = "0.6"
derive_more = "0.14.0"
env_logger = { version = "0.5", optional = true }
ethabi = "8.0"
Expand Down Expand Up @@ -57,7 +57,7 @@ pod-account = { path = "pod-account" }
trie-db = "0.12.4"
patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" }
rand = "0.6"
rayon = "1.0"
rayon = "1.1"
rlp = "0.4.0"
rlp_derive = { path = "../util/rlp-derive" }
rustc-hex = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion ethcore/blockchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kvdb = "0.1"
log = "0.4"
parity-bytes = "0.1"
parking_lot = "0.7"
rayon = "1.0"
rayon = "1.1"
rlp = "0.4.0"
rlp_compress = { path = "../../util/rlp-compress" }
rlp_derive = { path = "../../util/rlp-derive" }
Expand Down
56 changes: 29 additions & 27 deletions ethcore/evm/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ enum InstructionResult<Gas> {
Trap(TrapKind),
}

enum Never {}

/// ActionParams without code, so that it can be feed into CodeReader.
#[derive(Debug)]
struct InterpreterParams {
Expand Down Expand Up @@ -168,12 +166,6 @@ pub enum InterpreterResult {
Trap(TrapKind),
}

impl From<vm::Error> for InterpreterResult {
fn from(error: vm::Error) -> InterpreterResult {
InterpreterResult::Done(Err(error))
}
}

/// Intepreter EVM implementation
pub struct Interpreter<Cost: CostType> {
mem: Vec<u8>,
Expand Down Expand Up @@ -306,7 +298,7 @@ impl<Cost: CostType> Interpreter<Cost> {
} else if self.reader.len() == 0 {
InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_ref().expect("Gasometer None case is checked above; qed").current_gas.as_u256())))
} else {
self.step_inner(ext).err().expect("step_inner never returns Ok(()); qed")
self.step_inner(ext)
};

if let &InterpreterResult::Done(_) = &result {
Expand All @@ -318,7 +310,7 @@ impl<Cost: CostType> Interpreter<Cost> {

/// Inner helper function for step.
#[inline(always)]
fn step_inner(&mut self, ext: &mut vm::Ext) -> Result<Never, InterpreterResult> {
fn step_inner(&mut self, ext: &mut dyn vm::Ext) -> InterpreterResult {
let result = match self.resume_result.take() {
Some(result) => result,
None => {
Expand All @@ -333,22 +325,28 @@ impl<Cost: CostType> Interpreter<Cost> {

let instruction = match instruction {
Some(i) => i,
None => return Err(InterpreterResult::Done(Err(vm::Error::BadInstruction {
None => return InterpreterResult::Done(Err(vm::Error::BadInstruction {
instruction: opcode
}))),
})),
};

let info = instruction.info();
self.last_stack_ret_len = info.ret;
self.verify_instruction(ext, instruction, info)?;
if let Err(e) = self.verify_instruction(ext, instruction, info) {
return InterpreterResult::Done(Err(e));
};

// Calculate gas cost
let requirements = self.gasometer.as_mut().expect(GASOMETER_PROOF).requirements(ext, instruction, info, &self.stack, self.mem.size())?;
let requirements = match self.gasometer.as_mut().expect(GASOMETER_PROOF).requirements(ext, instruction, info, &self.stack, self.mem.size()) {
Ok(t) => t,
Err(e) => return InterpreterResult::Done(Err(e)),
};
if self.do_trace {
ext.trace_prepare_execute(self.reader.position - 1, opcode, requirements.gas_cost.as_u256(), Self::mem_written(instruction, &self.stack), Self::store_written(instruction, &self.stack));
}

self.gasometer.as_mut().expect(GASOMETER_PROOF).verify_gas(&requirements.gas_cost)?;
if let Err(e) = self.gasometer.as_mut().expect(GASOMETER_PROOF).verify_gas(&requirements.gas_cost) {
return InterpreterResult::Done(Err(e));
}
self.mem.expand(requirements.memory_required_size);
self.gasometer.as_mut().expect(GASOMETER_PROOF).current_mem_gas = requirements.memory_total_gas;
self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas = self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas - requirements.gas_cost;
Expand All @@ -357,18 +355,19 @@ impl<Cost: CostType> Interpreter<Cost> {

// Execute instruction
let current_gas = self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas;
let result = self.exec_instruction(
let result = match self.exec_instruction(
current_gas, ext, instruction, requirements.provide_gas
)?;

) {
Err(x) => return InterpreterResult::Done(Err(x)),
Ok(x) => x,
};
evm_debug!({ self.informant.after_instruction(instruction) });

result
},
};

if let InstructionResult::Trap(trap) = result {
return Err(InterpreterResult::Trap(trap));
return InterpreterResult::Trap(trap);
}

if let InstructionResult::UnusedGas(ref gas) = result {
Expand All @@ -390,28 +389,31 @@ impl<Cost: CostType> Interpreter<Cost> {
self.valid_jump_destinations = Some(self.cache.jump_destinations(&self.params.code_hash, &self.reader.code));
}
let jump_destinations = self.valid_jump_destinations.as_ref().expect("jump_destinations are initialized on first jump; qed");
let pos = self.verify_jump(position, jump_destinations)?;
let pos = match self.verify_jump(position, jump_destinations) {
Ok(x) => x,
Err(e) => return InterpreterResult::Done(Err(e))
};
self.reader.position = pos;
},
InstructionResult::StopExecutionNeedsReturn {gas, init_off, init_size, apply} => {
let mem = mem::replace(&mut self.mem, Vec::new());
return Err(InterpreterResult::Done(Ok(GasLeft::NeedsReturn {
return InterpreterResult::Done(Ok(GasLeft::NeedsReturn {
gas_left: gas.as_u256(),
data: mem.into_return_data(init_off, init_size),
apply_state: apply
})));
}));
},
InstructionResult::StopExecution => {
return Err(InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256()))));
return InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256())));
},
_ => {},
}

if self.reader.position >= self.reader.len() {
return Err(InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256()))));
return InterpreterResult::Done(Ok(GasLeft::Known(self.gasometer.as_mut().expect(GASOMETER_PROOF).current_gas.as_u256())));
}

Err(InterpreterResult::Continue)
InterpreterResult::Continue
}

fn verify_instruction(&self, ext: &vm::Ext, instruction: Instruction, info: &InstructionInfo) -> vm::Result<()> {
Expand Down
Loading