Skip to content

Commit dc92ac3

Browse files
committed
Merge branch 'master' into ao-type-metadata
* master: (56 commits) primitive-types: add no_std support for serde feature (#385) Add Rocksdb Secondary Instance Api (#384) kvdb-rocksdb: update rocksdb to 0.14 (#379) prepare releases for a few crates (#382) uint: fix UB in uint::from_big_endian (#381) Fix limit prefix delete case (#368) Add arbitrary trait implementation (#378) kvdb-rocksdb: optimize and rename iter_from_prefix (#365) bump parity-util-mem (#376) parity-util-mem: fix for windows (#375) keccak-hash: fix bench and add one for range (#372) [parity-crypto] Release 0.6.1 (#373) keccak-hash: bump version to 0.5.1 (#371) keccak-hash: add keccak256_range and keccak512_range functions (#370) Allow pubkey recovery for all-zero messages (#369) Delete by prefix operator in kvdb (#360) kvdb: no overlay (#313) Ban duplicates of parity-uil-mem from being linked into the same program (#363) Use correct license ID (#362) Memtest example for Rocksdb (#349) ...
2 parents fea273c + 371f17f commit dc92ac3

File tree

169 files changed

+3132
-2598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+3132
-2598
lines changed

.travis.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,23 @@ matrix:
88
rust: stable
99
before_script:
1010
- rustup component add rustfmt
11-
- os: linux
12-
rust: beta
1311
- os: linux
1412
rust: nightly
1513
script:
16-
- cargo check --all --benches
14+
- cargo check --workspace --benches
15+
- os: linux
16+
rust: stable
17+
install:
18+
- cargo install cross
19+
script:
20+
- cross test --target=aarch64-linux-android -p parity-util-mem
1721
- os: osx
18-
osx_image: xcode11.2
22+
osx_image: xcode11.3
1923
addons:
2024
chrome: stable
2125
firefox: latest
2226
install:
23-
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | sh
27+
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | sh
2428
- source ~/.nvm/nvm.sh
2529
- nvm install --lts
2630
- npm install -g chromedriver
@@ -32,12 +36,11 @@ matrix:
3236
install:
3337
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
3438
script:
35-
- if [ "$TRAVIS_RUST_VERSION" == "stable" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
39+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
3640
cargo fmt -- --check;
3741
fi
38-
- cargo check --all --tests
39-
- cargo build --all
40-
- cargo test --all --exclude uint --exclude fixed-hash
42+
- cargo check --workspace --tests --benches
43+
- cargo test --workspace --exclude uint --exclude fixed-hash --exclude parity-crypto
4144
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then
4245
cd contract-address/ && cargo test --features=external_doc && cd ..;
4346
fi
@@ -48,11 +51,14 @@ script:
4851
- cd keccak-hash/ && cargo test --no-default-features && cd ..
4952
- cd plain_hasher/ && cargo test --no-default-features && cargo check --benches && cd ..
5053
- cd parity-bytes/ && cargo test --no-default-features && cd ..
54+
- cd parity-crypto/ && cargo test --all-features && cd ..
5155
- cd parity-util-mem/ && cargo test --features=estimate-heapsize && cd ..
5256
- cd parity-util-mem/ && cargo test --features=jemalloc-global && cd ..
5357
- cd parity-util-mem/ && cargo test --features=mimalloc-global && cd ..
5458
- cd parity-util-mem/ && cargo test --no-default-features --features=dlmalloc-global && cd ..
59+
- cd primitive-types/ && cargo test --all-features && cd ..
60+
- cd primitive-types/ && cargo test --no-default-features --features=serde_no_std && cd ..
5561
- cd rlp/ && cargo test --no-default-features && cargo check --benches && cd ..
5662
- cd triehash/ && cargo check --benches && cd ..
57-
- cd kvdb-web/ && wasm-pack test --headless --chrome --firefox && cd ..
63+
- cd kvdb-web/ && wasm-pack test --headless --firefox && cd ..
5864

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ members = [
1313
"parity-path",
1414
"plain_hasher",
1515
"rlp",
16+
"rlp-derive",
17+
"runtime",
1618
"transaction-pool",
1719
"trace-time",
1820
"triehash",

LICENSE

Lines changed: 0 additions & 674 deletions
This file was deleted.
File renamed without changes.

rlp/LICENSE-MIT renamed to LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015-2017 Parity Technologies
1+
Copyright (c) 2015-2020 Parity Technologies
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[travis-image]: https://travis-ci.org/paritytech/parity-common.svg?branch=master
55
[travis-url]: https://travis-ci.org/paritytech/parity-common
6-
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/paritytech/parity-common/branch/master?svg=true
6+
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/paritytech/parity-common?branch=master&svg=true
77
[appveyor-url]: https://ci.appveyor.com/project/paritytech/parity-common/branch/master
88

99
# parity-common

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ test_script:
2626
- cd fixed-hash/ && cargo test --all-features && cd ..
2727
- cd uint/ && cargo test --features=std,quickcheck --release && cd ..
2828
- cd plain_hasher/ && cargo test --no-default-features && cd ..
29+
- cd parity-util-mem/ && cargo test --no-default-features && cd ..
2930
- cd parity-util-mem/ && cargo test --features=estimate-heapsize && cd ..
31+
- cd parity-util-mem/ && cargo test && cd ..

contract-address/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ The format is based on [Keep a Changelog].
55
[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/
66

77
## [Unreleased]
8+
9+
## [0.9.0] - 2020-03-16
10+
- License changed from MIT to dual MIT/Apache2. [#342](https://github.com/paritytech/parity-common/pull/342)
11+
- Updated dependencies. [#361](https://github.com/paritytech/parity-common/pull/361)

contract-address/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "contract-address"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
authors = ["Parity Technologies <[email protected]>"]
5-
license = "MIT"
5+
license = "MIT OR Apache-2.0"
66
homepage = "https://github.com/paritytech/parity-common"
77
repository = "https://github.com/paritytech/parity-common"
88
description = "A utility crate to create an ethereum contract address"
@@ -11,9 +11,9 @@ edition = "2018"
1111
readme = "README.md"
1212

1313
[dependencies]
14-
ethereum-types = { version = "0.8.0", path = "../ethereum-types" }
14+
ethereum-types = { version = "0.9.0", path = "../ethereum-types" }
1515
rlp = { version = "0.4", path = "../rlp" }
16-
keccak-hash = { version = "0.4", path = "../keccak-hash", default-features = false }
16+
keccak-hash = { version = "0.5", path = "../keccak-hash", default-features = false }
1717

1818
[features]
1919
default = []

contract-address/src/lib.rs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
// Copyright 2019 Parity Technologies (UK) Ltd.
2-
// This file is part of Parity Ethereum.
3-
4-
// Parity Ethereum is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
8-
9-
// Parity Ethereum is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU General Public License for more details.
13-
14-
// You should have received a copy of the GNU General Public License
15-
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
168

179
#![cfg_attr(feature = "external_doc", feature(external_doc))]
1810
#![cfg_attr(feature = "external_doc", doc(include = "../README.md"))]

ethbloom/CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Changelog
22

3-
The format is based on [Keep a Changelog].
3+
The format is based on [Keep a Changelog].
44

55
[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/
66

77
## [Unreleased]
88

9+
## [0.9.1] - 2020-04-27
10+
- Added `arbitrary` feature. [#378](https://github.com/paritytech/parity-common/pull/378)
11+
12+
## [0.9.0] - 2020-03-16
13+
- Removed `libc` feature. [#317](https://github.com/paritytech/parity-common/pull/317)
14+
- License changed from MIT to dual MIT/Apache2. [#342](https://github.com/paritytech/parity-common/pull/342)
15+
916
## [0.8.1] - 2019-10-24
1017
### Dependencies
11-
- Updated dependencies (https://github.com/paritytech/parity-common/pull/239)
18+
- Updated dependencies. [#239](https://github.com/paritytech/parity-common/pull/239)

ethbloom/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "ethbloom"
3-
version = "0.8.1"
3+
version = "0.9.1"
44
authors = ["Parity Technologies <[email protected]>"]
55
description = "Ethereum bloom filter"
6-
license = "MIT"
6+
license = "MIT OR Apache-2.0"
77
documentation = "https://docs.rs/ethbloom"
88
homepage = "https://github.com/paritytech/parity-common"
99
repository = "https://github.com/paritytech/parity-common"
@@ -12,7 +12,7 @@ edition = "2018"
1212
[dependencies]
1313
tiny-keccak = { version = "2.0", features = ["keccak"] }
1414
crunchy = { version = "0.2.2", default-features = false, features = ["limit_256"] }
15-
fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false }
15+
fixed-hash = { path = "../fixed-hash", version = "0.6", default-features = false }
1616
impl-serde = { path = "../primitive-types/impls/serde", version = "0.3", default-features = false, optional = true }
1717
impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false }
1818

@@ -22,11 +22,11 @@ rand = "0.7.2"
2222
hex-literal = "0.2.1"
2323

2424
[features]
25-
default = ["std", "serialize", "libc", "rustc-hex"]
25+
default = ["std", "serialize", "rustc-hex"]
2626
std = ["fixed-hash/std", "crunchy/std"]
2727
serialize = ["std", "impl-serde"]
28-
libc = ["fixed-hash/libc"]
2928
rustc-hex = ["fixed-hash/rustc-hex"]
29+
arbitrary = ["fixed-hash/arbitrary"]
3030

3131
[[bench]]
3232
name = "bloom"

ethbloom/benches/bloom.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
19
use criterion::{criterion_group, criterion_main, Criterion};
210
use ethbloom::{Bloom, Input};
311
use hex_literal::hex;

ethbloom/benches/unrolling.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
19
use criterion::{criterion_group, criterion_main, Criterion};
210
use crunchy::unroll;
311
use rand::RngCore;

ethbloom/src/lib.rs

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,50 @@
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
19
//!
2-
//! ```rust
3-
//! extern crate ethbloom;
4-
//! #[macro_use] extern crate hex_literal;
10+
//! ```
11+
//! use hex_literal::hex;
512
//! use ethbloom::{Bloom, Input};
613
//!
7-
//! fn main() {
8-
//! use std::str::FromStr;
9-
//! let bloom = Bloom::from_str(
10-
//! "00000000000000000000000000000000\
11-
//! 00000000100000000000000000000000\
12-
//! 00000000000000000000000000000000\
13-
//! 00000000000000000000000000000000\
14-
//! 00000000000000000000000000000000\
15-
//! 00000000000000000000000000000000\
16-
//! 00000002020000000000000000000000\
17-
//! 00000000000000000000000800000000\
18-
//! 10000000000000000000000000000000\
19-
//! 00000000000000000000001000000000\
20-
//! 00000000000000000000000000000000\
21-
//! 00000000000000000000000000000000\
22-
//! 00000000000000000000000000000000\
23-
//! 00000000000000000000000000000000\
24-
//! 00000000000000000000000000000000\
25-
//! 00000000000000000000000000000000"
26-
//! ).unwrap();
27-
//! let address = hex!("ef2d6d194084c2de36e0dabfce45d046b37d1106");
28-
//! let topic = hex!("02c69be41d0b7e40352fc85be1cd65eb03d40ef8427a0ca4596b1ead9a00e9fc");
14+
//! use std::str::FromStr;
15+
//! let bloom = Bloom::from_str(
16+
//! "00000000000000000000000000000000\
17+
//! 00000000100000000000000000000000\
18+
//! 00000000000000000000000000000000\
19+
//! 00000000000000000000000000000000\
20+
//! 00000000000000000000000000000000\
21+
//! 00000000000000000000000000000000\
22+
//! 00000002020000000000000000000000\
23+
//! 00000000000000000000000800000000\
24+
//! 10000000000000000000000000000000\
25+
//! 00000000000000000000001000000000\
26+
//! 00000000000000000000000000000000\
27+
//! 00000000000000000000000000000000\
28+
//! 00000000000000000000000000000000\
29+
//! 00000000000000000000000000000000\
30+
//! 00000000000000000000000000000000\
31+
//! 00000000000000000000000000000000"
32+
//! ).unwrap();
33+
//! let address = hex!("ef2d6d194084c2de36e0dabfce45d046b37d1106");
34+
//! let topic = hex!("02c69be41d0b7e40352fc85be1cd65eb03d40ef8427a0ca4596b1ead9a00e9fc");
2935
//!
30-
//! let mut my_bloom = Bloom::default();
31-
//! assert!(!my_bloom.contains_input(Input::Raw(&address)));
32-
//! assert!(!my_bloom.contains_input(Input::Raw(&topic)));
36+
//! let mut my_bloom = Bloom::default();
37+
//! assert!(!my_bloom.contains_input(Input::Raw(&address)));
38+
//! assert!(!my_bloom.contains_input(Input::Raw(&topic)));
3339
//!
34-
//! my_bloom.accrue(Input::Raw(&address));
35-
//! assert!(my_bloom.contains_input(Input::Raw(&address)));
36-
//! assert!(!my_bloom.contains_input(Input::Raw(&topic)));
40+
//! my_bloom.accrue(Input::Raw(&address));
41+
//! assert!(my_bloom.contains_input(Input::Raw(&address)));
42+
//! assert!(!my_bloom.contains_input(Input::Raw(&topic)));
3743
//!
38-
//! my_bloom.accrue(Input::Raw(&topic));
39-
//! assert!(my_bloom.contains_input(Input::Raw(&address)));
40-
//! assert!(my_bloom.contains_input(Input::Raw(&topic)));
41-
//! assert_eq!(my_bloom, bloom);
42-
//! }
44+
//! my_bloom.accrue(Input::Raw(&topic));
45+
//! assert!(my_bloom.contains_input(Input::Raw(&address)));
46+
//! assert!(my_bloom.contains_input(Input::Raw(&topic)));
47+
//! assert_eq!(my_bloom, bloom);
4348
//! ```
4449
//!
4550

ethereum-types/CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# Changelog
22

3-
The format is based on [Keep a Changelog].
3+
The format is based on [Keep a Changelog].
44

55
[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/
66

77
## [Unreleased]
8+
9+
## [0.9.1] - 2020-04-27
10+
- Added `arbitrary` feature. [#378](https://github.com/paritytech/parity-common/pull/378)
11+
12+
## [0.9.0] - 2020-03-16
13+
- License changed from MIT to dual MIT/Apache2. [#342](https://github.com/paritytech/parity-common/pull/342)
14+
- Updated dependencies. [#361](https://github.com/paritytech/parity-common/pull/361)
15+
816
### Added
9-
- uint error type is re-exported (https://github.com/paritytech/parity-common/pull/244)
17+
- Uint error type is re-exported. [#244](https://github.com/paritytech/parity-common/pull/244)

ethereum-types/Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[package]
22
name = "ethereum-types"
3-
version = "0.8.0"
3+
version = "0.9.1"
44
authors = ["Parity Technologies <[email protected]>"]
5-
license = "MIT"
5+
license = "MIT OR Apache-2.0"
66
homepage = "https://github.com/paritytech/parity-common"
77
description = "Ethereum types"
88
edition = "2018"
99

1010
[dependencies]
11-
ethbloom = { path = "../ethbloom", version = "0.8", default-features = false }
12-
fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false, features = ["byteorder", "rustc-hex"] }
11+
ethbloom = { path = "../ethbloom", version = "0.9", default-features = false }
12+
fixed-hash = { path = "../fixed-hash", version = "0.6", default-features = false, features = ["byteorder", "rustc-hex"] }
1313
uint-crate = { path = "../uint", package = "uint", version = "0.8", default-features = false }
14-
primitive-types = { path = "../primitive-types", version = "0.6", features = ["rlp", "byteorder", "rustc-hex"], default-features = false }
14+
primitive-types = { path = "../primitive-types", version = "0.7", features = ["rlp", "byteorder", "rustc-hex"], default-features = false }
1515
impl-serde = { path = "../primitive-types/impls/serde", version = "0.3.0", default-features = false, optional = true }
1616
impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false }
1717

@@ -22,3 +22,4 @@ serde_json = "1.0.41"
2222
default = ["std", "serialize"]
2323
std = ["uint-crate/std", "fixed-hash/std", "ethbloom/std", "primitive-types/std"]
2424
serialize = ["std", "impl-serde", "primitive-types/serde", "ethbloom/serialize"]
25+
arbitrary = ["ethbloom/arbitrary", "fixed-hash/arbitrary", "uint-crate/arbitrary"]

ethereum-types/src/hash.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
19
use crate::{U128, U256, U512, U64};
210
use fixed_hash::*;
311
use impl_rlp::impl_fixed_hash_rlp;

ethereum-types/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
19
#![cfg_attr(not(feature = "std"), no_std)]
210

311
mod hash;

ethereum-types/src/uint.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Copyright 2020 Parity Technologies
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
19
use impl_rlp::impl_uint_rlp;
210
#[cfg(feature = "serialize")]
311
use impl_serde::impl_uint_serde;

0 commit comments

Comments
 (0)