Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
253ff3f37b | ||
|
|
54c2d6167f |
@@ -1,3 +1,10 @@
|
||||
## Parity-Ethereum [v2.5.13](https://github.com/paritytech/parity-ethereum/releases/tag/v2.5.13)
|
||||
|
||||
Parity Ethereum v2.5.13-stable is a security release. Valid blocks with manipulated transactions (added/replaced) cause the client to stall.
|
||||
|
||||
The full list of included changes:
|
||||
* Make sure to not mark block header hash as invalid if only the body is wrong (#11356)
|
||||
|
||||
## Parity-Ethereum [v2.5.12](https://github.com/paritytech/parity-ethereum/releases/tag/v2.5.12)
|
||||
|
||||
Parity Ethereum v2.5.12-stable is a patch release that adds Istanbul hardfork
|
||||
|
||||
12
Cargo.lock
generated
12
Cargo.lock
generated
@@ -2726,7 +2726,7 @@ dependencies = [
|
||||
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"jni 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"panic_hook 0.1.0",
|
||||
"parity-ethereum 2.5.12",
|
||||
"parity-ethereum 2.5.13",
|
||||
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -2783,7 +2783,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parity-ethereum"
|
||||
version = "2.5.12"
|
||||
version = "2.5.13"
|
||||
dependencies = [
|
||||
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2836,7 +2836,7 @@ dependencies = [
|
||||
"parity-rpc 1.12.0",
|
||||
"parity-runtime 0.1.0",
|
||||
"parity-updater 1.12.0",
|
||||
"parity-version 2.5.12",
|
||||
"parity-version 2.5.13",
|
||||
"parity-whisper 0.1.0",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2982,7 +2982,7 @@ dependencies = [
|
||||
"parity-crypto 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-runtime 0.1.0",
|
||||
"parity-updater 1.12.0",
|
||||
"parity-version 2.5.12",
|
||||
"parity-version 2.5.13",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -3080,7 +3080,7 @@ dependencies = [
|
||||
"parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-hash-fetch 1.12.0",
|
||||
"parity-path 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-version 2.5.12",
|
||||
"parity-version 2.5.13",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -3090,7 +3090,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parity-version"
|
||||
version = "2.5.12"
|
||||
version = "2.5.13"
|
||||
dependencies = [
|
||||
"parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
description = "Parity Ethereum client"
|
||||
name = "parity-ethereum"
|
||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||
version = "2.5.12"
|
||||
version = "2.5.13"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
|
||||
@@ -27,9 +27,12 @@ pub use self::headers::Headers;
|
||||
|
||||
/// Something which can produce a hash and a parent hash.
|
||||
pub trait BlockLike {
|
||||
/// Get the hash of this item.
|
||||
/// Get the hash of this item - i.e. the header hash.
|
||||
fn hash(&self) -> H256;
|
||||
|
||||
/// Get a raw hash of this item - i.e. the hash of the RLP representation.
|
||||
fn raw_hash(&self) -> H256;
|
||||
|
||||
/// Get the hash of this item's parent.
|
||||
fn parent_hash(&self) -> H256;
|
||||
|
||||
@@ -160,6 +163,10 @@ pub mod blocks {
|
||||
self.header.hash()
|
||||
}
|
||||
|
||||
fn raw_hash(&self) -> H256 {
|
||||
hash::keccak(&self.bytes)
|
||||
}
|
||||
|
||||
fn parent_hash(&self) -> H256 {
|
||||
self.header.parent_hash().clone()
|
||||
}
|
||||
@@ -174,6 +181,10 @@ pub mod blocks {
|
||||
self.header.hash()
|
||||
}
|
||||
|
||||
fn raw_hash(&self) -> H256 {
|
||||
hash::keccak(&self.bytes)
|
||||
}
|
||||
|
||||
fn parent_hash(&self) -> H256 {
|
||||
self.header.parent_hash().clone()
|
||||
}
|
||||
@@ -197,6 +208,7 @@ pub mod headers {
|
||||
|
||||
impl BlockLike for Header {
|
||||
fn hash(&self) -> H256 { self.hash() }
|
||||
fn raw_hash(&self) -> H256 { self.hash() }
|
||||
fn parent_hash(&self) -> H256 { self.parent_hash().clone() }
|
||||
fn difficulty(&self) -> U256 { self.difficulty().clone() }
|
||||
}
|
||||
|
||||
@@ -472,13 +472,14 @@ impl<K: Kind> VerificationQueue<K> {
|
||||
/// Add a block to the queue.
|
||||
pub fn import(&self, input: K::Input) -> Result<H256, (K::Input, Error)> {
|
||||
let hash = input.hash();
|
||||
let raw_hash = input.raw_hash();
|
||||
{
|
||||
if self.processing.read().contains_key(&hash) {
|
||||
bail!((input, ErrorKind::Import(ImportErrorKind::AlreadyQueued).into()));
|
||||
}
|
||||
|
||||
let mut bad = self.verification.bad.lock();
|
||||
if bad.contains(&hash) {
|
||||
if bad.contains(&hash) || bad.contains(&raw_hash) {
|
||||
bail!((input, ErrorKind::Import(ImportErrorKind::KnownBad).into()));
|
||||
}
|
||||
|
||||
@@ -505,6 +506,16 @@ impl<K: Kind> VerificationQueue<K> {
|
||||
match err {
|
||||
// Don't mark future blocks as bad.
|
||||
Error(ErrorKind::Block(BlockError::TemporarilyInvalid(_)), _) => {},
|
||||
// If the transaction root or uncles hash is invalid, it doesn't necessarily mean
|
||||
// that the header is invalid. We might have just received a malformed block body,
|
||||
// so we shouldn't put the header hash to `bad`.
|
||||
//
|
||||
// We still put the entire `Item` hash to bad, so that we can early reject
|
||||
// the items that are malformed.
|
||||
Error(ErrorKind::Block(BlockError::InvalidTransactionsRoot(_)), _) |
|
||||
Error(ErrorKind::Block(BlockError::InvalidUnclesHash(_)), _) => {
|
||||
self.verification.bad.lock().insert(raw_hash);
|
||||
},
|
||||
_ => {
|
||||
self.verification.bad.lock().insert(hash);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[package]
|
||||
name = "parity-version"
|
||||
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
|
||||
version = "2.5.12"
|
||||
version = "2.5.13"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
build = "build.rs"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user