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

Commit

Permalink
Merge branch 'master' into dp/chore/move-more-types-out-of-ethcore
Browse files Browse the repository at this point in the history
* master:
  whisper is no longer a part of parity-ethereum repo (#10855)
  [ethash] remove mem::uninitialized (#10861)
  Docker images renaming (#10863)
  Move the substate module into ethcore/executive (#10867)
  • Loading branch information
dvdplm committed Jul 12, 2019
2 parents 8a0d3db + cfe826f commit 8e88f2e
Show file tree
Hide file tree
Showing 52 changed files with 189 additions and 4,520 deletions.
18 changes: 9 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,14 +310,14 @@ 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:
Expand Down
77 changes: 0 additions & 77 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ parity-runtime = { path = "util/runtime" }
parity-rpc = { path = "rpc" }
parity-updater = { path = "updater" }
parity-version = { path = "util/version" }
parity-whisper = { path = "whisper" }
parity-path = "0.1"
dir = { path = "util/dir" }
panic_hook = { path = "util/panic-hook" }
Expand Down Expand Up @@ -134,7 +133,6 @@ members = [
"ethcore/wasm/run",
"evmbin",
"parity-clib",
"whisper/cli",
"util/triehash-ethereum",
"util/keccak-hasher",
"util/patricia-trie-ethereum",
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ We recommend installing Rust through [rustup](https://www.rustup.rs/). If you do

`clang` is required. It comes with Xcode command line tools or can be installed with homebrew.

- Windows:
- Windows:
Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the `rustup` installer from
https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the `msvc` toolchain:
```bash
Expand Down Expand Up @@ -320,10 +320,6 @@ Caching, Importing Blocks, and Block Information
patricia-trie-ethereum registrar rlp_compress rlp_derive parity-runtime stats
time-utils triehash-ethereum unexpected parity-version
```
* Parity Whisper Protocol Implementation
```bash
parity-whisper whisper-cli
```

</p></details>

Expand Down Expand Up @@ -360,10 +356,10 @@ In addition to the Parity Ethereum client, there are additional tools in this re
- [evmbin](./evmbin) - Parity Ethereum EVM Implementation.
- [ethstore](./accounts/ethstore) - Parity Ethereum Key Management.
- [ethkey](./accounts/ethkey) - Parity Ethereum Keys Generator.
- [whisper](./whisper) - Parity Ethereum Whisper-v2 PoC Implementation.

The following tool is available in a separate repository:
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum Encoding of Function Calls. [Docs here](https://crates.io/crates/ethabi)
- [whisper](https://github.com/paritytech/whisper) - Parity Ethereum Whisper-v2 PoC Implementation.

## 7. Community <a id="chapter-007"></a>

Expand Down
2 changes: 1 addition & 1 deletion accounts/ethkey/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ _This project is a part of the Parity Ethereum toolchain._
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
- [whisper](https://github.com/paritytech/whisper) - Implementation of Whisper-v2 PoC.
2 changes: 1 addition & 1 deletion accounts/ethstore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,4 @@ _This project is a part of the Parity Ethereum toolchain._
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
- [whisper](https://github.com/paritytech/whisper) - Implementation of Whisper-v2 PoC.
63 changes: 46 additions & 17 deletions ethash/benches/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,39 @@ extern crate ethash;
use criterion::Criterion;
use ethash::{NodeCacheBuilder, OptimizeFor};

const HASH: [u8; 32] = [0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b, 0x5b, 0xf2, 0xbe,
0xe4, 0x0a, 0xb3, 0x35, 0x8a, 0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f,
0x5e, 0x59, 0x5e, 0xab, 0x55, 0x94, 0x05, 0x52, 0x7d, 0x72];
const HASH: [u8; 32] = [
0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b,
0x5b, 0xf2, 0xbe, 0xe4, 0x0a, 0xb3, 0x35, 0x8a,
0xa6, 0x87, 0x73, 0xa8, 0xd0, 0x9f, 0x5e, 0x59,
0x5e, 0xab, 0x55, 0x94, 0x05, 0x52, 0x7d, 0x72,
];
const MIX_HASH: [u8; 32] = [
0x1f, 0xff, 0x04, 0xce, 0xc9, 0x41, 0x73, 0xfd,
0x59, 0x1e, 0x3d, 0x89, 0x60, 0xce, 0x6b, 0xdf,
0x8b, 0x19, 0x71, 0x04, 0x8c, 0x71, 0xff, 0x93,
0x7b, 0xb2, 0xd3, 0x2a, 0x64, 0x31, 0xab, 0x6d,
];
const NONCE: u64 = 0xd7b3ac70a301a249;

criterion_group!(
basic,
bench_light_compute_memmap,
bench_light_compute_memory,
bench_light_new_round_trip_memmap,
bench_light_new_round_trip_memory,
bench_light_from_file_round_trip_memory,
bench_light_from_file_round_trip_memmap
);
criterion_group! {
name = basic;
config = dont_take_an_eternity_to_run();
targets = bench_light_compute_memmap,
bench_light_compute_memory,
bench_light_new_round_trip_memmap,
bench_light_new_round_trip_memory,
bench_light_from_file_round_trip_memory,
bench_light_from_file_round_trip_memmap,
bench_quick_get_difficulty,
}
criterion_main!(basic);

fn dont_take_an_eternity_to_run() -> Criterion {
Criterion::default().nresamples(1_000)
.without_plots()
.sample_size(10)
}

fn bench_light_compute_memmap(b: &mut Criterion) {
use std::env;

Expand All @@ -52,13 +69,13 @@ fn bench_light_compute_memory(b: &mut Criterion) {
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu, u64::max_value());
let light = builder.light(&env::temp_dir(), 486382);

b.bench_function("bench_light_compute_memmap", move |b| b.iter(|| light.compute(&HASH, NONCE, u64::max_value())));
b.bench_function("bench_light_compute_memory", move |b| b.iter(|| light.compute(&HASH, NONCE, u64::max_value())));
}

fn bench_light_new_round_trip_memmap(b: &mut Criterion) {
use std::env;

b.bench_function("bench_light_compute_memmap", move |b| b.iter(|| {
b.bench_function("bench_light_new_round_trip_memmap", move |b| b.iter(|| {
let builder = NodeCacheBuilder::new(OptimizeFor::Memory, u64::max_value());
let light = builder.light(&env::temp_dir(), 486382);
light.compute(&HASH, NONCE, u64::max_value());
Expand All @@ -68,7 +85,7 @@ fn bench_light_new_round_trip_memmap(b: &mut Criterion) {
fn bench_light_new_round_trip_memory(b: &mut Criterion) {
use std::env;

b.bench_function("bench_light_compute_memmap", move |b| b.iter(|| {
b.bench_function("bench_light_new_round_trip_memory", move |b| b.iter(|| {
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu, u64::max_value());
let light = builder.light(&env::temp_dir(), 486382);
light.compute(&HASH, NONCE, u64::max_value());
Expand All @@ -86,7 +103,7 @@ fn bench_light_from_file_round_trip_memory(b: &mut Criterion) {
dummy.to_file().unwrap();
}

b.bench_function("bench_light_compute_memmap", move |b| b.iter(|| {
b.bench_function("bench_light_from_file_round_trip_memory", move |b| b.iter(|| {
let builder = NodeCacheBuilder::new(OptimizeFor::Cpu, u64::max_value());
let light = builder.light_from_file(&dir, 486382).unwrap();
light.compute(&HASH, NONCE, u64::max_value());
Expand All @@ -105,9 +122,21 @@ fn bench_light_from_file_round_trip_memmap(b: &mut Criterion) {
dummy.to_file().unwrap();
}

b.bench_function("bench_light_compute_memmap", move |b| b.iter(|| {
b.bench_function("bench_light_from_file_round_trip_memmap", move |b| b.iter(|| {
let builder = NodeCacheBuilder::new(OptimizeFor::Memory, u64::max_value());
let light = builder.light_from_file(&dir, 486382).unwrap();
light.compute(&HASH, NONCE, u64::max_value());
}));
}

fn bench_quick_get_difficulty(b: &mut Criterion) {
b.bench_function("bench_quick_get_difficulty", move |b| b.iter(|| {
let d = ethash::quick_get_difficulty(&HASH, NONCE, &MIX_HASH, false);
let boundary_good = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0x9b, 0x6c, 0x69, 0xbc, 0x2c, 0xe2, 0xa2,
0x4a, 0x8e, 0x95, 0x69, 0xef, 0xc7, 0xd7, 0x1b, 0x33, 0x35, 0xdf, 0x36, 0x8c, 0x9a,
0xe9, 0x7e, 0x53, 0x84,
];
assert_eq!(d[..], boundary_good[..]);
}));
}
Loading

0 comments on commit 8e88f2e

Please sign in to comment.