-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dp/feature/add-NumEntries-trait
* master: Bump fixed-hash to 0.3.2 (#134) Use EntropyRng instead of OsRng (#130) Bump parity-crypto to 0.3.1 (#132) rust-crypto dependency removal (#85) Use newly stablized TryFrom trait for primitive-types (#127) change dependencies of `keccak-hash`and `trie-standardmap` (#111) bring appveyor back (#118) Extract `should_replace` from Scoring and supply pooled txs from same sender (#116)
- Loading branch information
Showing
30 changed files
with
699 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
[![Build Status travis][travis-image]][travis-url] | ||
[![Build Status appveyor][appveyor-image]][appveyor-url] | ||
|
||
[travis-image]: https://travis-ci.org/paritytech/parity-common.svg?branch=master | ||
[travis-url]: https://travis-ci.org/paritytech/parity-common | ||
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/paritytech/parity-common/branch/master?svg=true | ||
[appveyor-url]: https://ci.appveyor.com/project/paritytech/parity-common/branch/master | ||
|
||
# parity-common | ||
Collection of crates used in [Parity Technologies](https://www.paritytech.io/) projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
environment: | ||
matrix: | ||
- FEATURES: "" | ||
|
||
platform: | ||
- x86_64-pc-windows-msvc | ||
|
||
# avoid running tests twice | ||
branches: | ||
only: | ||
- master | ||
|
||
install: | ||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/ | ||
- rustup-init.exe -y --default-host %PLATFORM% | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- rustc -vV | ||
- cargo -vV | ||
|
||
build_script: | ||
- cargo check --tests --features "%FEATURES%" | ||
- cargo build --all --features "%FEATURES%" | ||
|
||
test_script: | ||
- cargo test --all --features "%FEATURES%" --exclude uint --exclude fixed-hash | ||
- cd fixed-hash/ && cargo test --all-features && cd .. | ||
- cd uint/ && cargo test --features=std,quickcheck --release && cd .. | ||
- cd plain_hasher/ && cargo test --no-default-features && cd .. | ||
- cd parity-util-mem/ && cargo test --features=estimate-heapsize && cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
[package] | ||
name = "keccak-hash" | ||
version = "0.1.2" | ||
version = "0.1.3" | ||
description = "`keccak-hash` is a set of utility functions to facilitate working with Keccak hashes (256/512 bits long)." | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
repository = "https://github.com/paritytech/parity-common" | ||
readme = "README.md" | ||
license = "GPL-3.0" | ||
|
||
[dependencies] | ||
ethereum-types = "0.4" | ||
tiny-keccak = "1.4" | ||
primitive-types = { path = "../primitive-types", version = "0.2" } | ||
|
||
[dev-dependencies] | ||
tempdir = "0.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
[package] | ||
name = "parity-crypto" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
repository = "https://github.com/paritytech/parity-common" | ||
description = "Crypto utils used by ethstore and network." | ||
license = "GPL-3.0" | ||
autobenches = false | ||
|
||
[[bench]] | ||
name = "bench" | ||
harness = false | ||
|
||
|
||
[dependencies] | ||
quick-error = "1.2.2" | ||
ring = "0.14.3" | ||
rust-crypto = "0.2.36" | ||
tiny-keccak = "1.4" | ||
scrypt = { version = "0.1.1", default-features = false } | ||
ripemd160 = "0.8.0" | ||
sha2 = "0.8.0" | ||
digest = "0.8" | ||
aes = "0.3.2" | ||
aes-ctr = "0.3.0" | ||
block-modes = "0.3.3" | ||
ring = "0.14.6" | ||
|
||
[dev-dependencies] | ||
criterion = "0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright 2015-2018 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity. | ||
|
||
// Parity is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Parity is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Parity. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
extern crate parity_crypto; | ||
|
||
#[macro_use] | ||
extern crate criterion; | ||
|
||
use criterion::{Criterion, Bencher}; | ||
|
||
criterion_group!(benches, input_len); | ||
|
||
criterion_main!(benches); | ||
|
||
/// general benches for multiple input size | ||
fn input_len(c: &mut Criterion) { | ||
|
||
c.bench_function_over_inputs("ripemd", | ||
|b: &mut Bencher, size: &usize| { | ||
let data = vec![0u8; *size]; | ||
b.iter(|| parity_crypto::digest::ripemd160(&data[..])); | ||
}, | ||
vec![100, 500, 1_000, 10_000, 100_000] | ||
); | ||
|
||
c.bench_function_over_inputs("aes_ctr", | ||
|b: &mut Bencher, size: &usize| { | ||
let data = vec![0u8; *size]; | ||
let mut dest = vec![0; *size]; | ||
let k = [0; 16]; | ||
let iv = [0; 16]; | ||
|
||
b.iter(||{ | ||
parity_crypto::aes::encrypt_128_ctr(&k[..], &iv[..], &data[..], &mut dest[..]).unwrap(); | ||
// same as encrypt but add it just in case | ||
parity_crypto::aes::decrypt_128_ctr(&k[..], &iv[..], &data[..], &mut dest[..]).unwrap(); | ||
}); | ||
}, | ||
vec![100, 500, 1_000, 10_000, 100_000] | ||
); | ||
|
||
} |
Oops, something went wrong.