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

Extract spec to own crate #10978

Merged
merged 83 commits into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
ddeef45
Add client-traits crate
dvdplm Aug 6, 2019
0d49c45
New crate `machine`
dvdplm Aug 6, 2019
0465e6b
Use new machine and client-traits crates in ethcore
dvdplm Aug 6, 2019
50ca45a
Use new crates machine and client-traits instead of ethcore where app…
dvdplm Aug 6, 2019
29d4095
Fix tests
dvdplm Aug 6, 2019
cd6e0e2
Don't re-export so many types from ethcore::client
dvdplm Aug 6, 2019
2477cbd
Fixing more fallout from removing re-export
dvdplm Aug 6, 2019
51ba2f4
Merge branch 'master' into dp/chore/move-machine-to-own-crate
dvdplm Aug 6, 2019
c84a01f
fix test
dvdplm Aug 7, 2019
f2497f4
More fallout from not re-exporting types
dvdplm Aug 7, 2019
1e43534
Add some docs
dvdplm Aug 7, 2019
6d83cf2
cleanup
dvdplm Aug 7, 2019
e04d188
import the macro edition style
dvdplm Aug 7, 2019
b6e91de
Merge branch 'master' into dp/chore/move-machine-to-own-crate
dvdplm Aug 7, 2019
bac7268
Tweak docs
dvdplm Aug 7, 2019
978eb88
Add missing import
dvdplm Aug 7, 2019
d6273a7
Merge branch 'master' into dp/chore/move-machine-to-own-crate
dvdplm Aug 8, 2019
18d6a94
remove unused ethabi_derive imports
dvdplm Aug 8, 2019
d5700d9
Use latest ethabi-contract
dvdplm Aug 8, 2019
83bb140
Move many traits from ethcore/client/traits to client-traits crate
dvdplm Aug 9, 2019
d96fff3
Move snapshot related traits to the engine crate (eew)
dvdplm Aug 9, 2019
33aa152
Move a few snapshot related types to common_types
dvdplm Aug 9, 2019
9b70856
fix warning
dvdplm Aug 9, 2019
f76e5ed
Gradually introduce new engine crate: snapshot
dvdplm Aug 9, 2019
5b3a8ca
ethcore typechecks with new engine crate
dvdplm Aug 9, 2019
cecd69c
Sort out types outside ethcore
dvdplm Aug 10, 2019
c5ab534
Add an EpochVerifier to ethash and use that in Engine.epoch_verifier()
dvdplm Aug 10, 2019
45c0497
Document pub members
dvdplm Aug 10, 2019
b11a21f
Sort out tests
dvdplm Aug 10, 2019
af485cc
Add test-helpers feature and move EngineSigner impl to the right place
dvdplm Aug 10, 2019
f617bcb
Sort out tests
dvdplm Aug 10, 2019
64b5c60
Sort out tests and refactor verification types
dvdplm Aug 10, 2019
b1b6b46
Fix missing traits
dvdplm Aug 10, 2019
881b71f
More missing traits
dvdplm Aug 10, 2019
ddca9ee
Fix tests and cleanup
dvdplm Aug 10, 2019
d7d3f4b
cleanup
dvdplm Aug 10, 2019
b2f8be6
Put back needed logger import
dvdplm Aug 10, 2019
8ab2a02
Don't rexport common_types from ethcore/src/client
dvdplm Aug 10, 2019
4aef5f2
Remove files no longer used
dvdplm Aug 10, 2019
951f63e
Get rid of itertools
dvdplm Aug 10, 2019
1c42cc1
Move a few more traits from ethcore to client-traits: BlockChainReset…
dvdplm Aug 10, 2019
07b1c2d
Move ProvingBlockChainClient to client-traits
dvdplm Aug 10, 2019
7e5e4bc
Don't re-export ForkChoice and Transition from ethcore
dvdplm Aug 10, 2019
b244bfb
Address grumbles: sort imports, remove commented out code
dvdplm Aug 13, 2019
37be7b2
Merge branch 'master' into dp/chore/extract-engine-trait
dvdplm Aug 13, 2019
88cfa7f
Fix merge resolution error
dvdplm Aug 13, 2019
f4c9b9c
Extract the Clique engine to own crate
dvdplm Aug 13, 2019
5e307ab
Extract NullEngine and the block_reward module from ethcore
dvdplm Aug 13, 2019
db12d1b
Extract InstantSeal engine to own crate
dvdplm Aug 13, 2019
e9e9d62
Extract remaining engines
dvdplm Aug 14, 2019
0f5e970
Extract executive_state to own crate so it can be used by engine crates
dvdplm Aug 14, 2019
e7ba4a5
Remove snapshot stuff from the engine crate
dvdplm Aug 14, 2019
c9dca59
Put snapshot traits back in ethcore
dvdplm Aug 14, 2019
6e3b365
cleanup
dvdplm Aug 14, 2019
c92751a
Remove stuff from ethcore
dvdplm Aug 14, 2019
61b0dd6
Don't use itertools
dvdplm Aug 14, 2019
c79b7e2
itertools in aura is legit-ish
dvdplm Aug 15, 2019
42e1d57
Merge branch 'master' into dp/chore/extract-clique
dvdplm Aug 15, 2019
663f13e
More post-merge fixes
dvdplm Aug 15, 2019
0bd9176
Re-export less types in client
dvdplm Aug 16, 2019
0bd3713
cleanup
dvdplm Aug 16, 2019
7adcba0
Extract spec to own crate
dvdplm Aug 16, 2019
43206dd
Put back the test-helpers from basic-authority
dvdplm Aug 16, 2019
4f76b1e
Fix ethcore benchmarks
dvdplm Aug 16, 2019
9a53c45
Reduce the public api of ethcore/verification
dvdplm Aug 16, 2019
79e6000
Merge branch 'master' into dp/chore/extract-spec-from-ethcore
dvdplm Aug 20, 2019
fbe0365
Update ethcore/block-reward/Cargo.toml
dvdplm Aug 21, 2019
fdd35c7
Update ethcore/engines/basic-authority/Cargo.toml
dvdplm Aug 21, 2019
0be9f98
Update ethcore/engines/ethash/Cargo.toml
dvdplm Aug 21, 2019
8fc5929
Update ethcore/engines/clique/src/lib.rs
dvdplm Aug 21, 2019
8077b51
signers is already a ref
dvdplm Aug 21, 2019
7f5c4d3
Add an EngineType enum to tighten up Engine.name()
dvdplm Aug 21, 2019
a22870d
Introduce Snapshotting enum to distinguish the type of snapshots a ch…
dvdplm Aug 21, 2019
791e99a
Rename supports_warp to snapshot_mode
dvdplm Aug 21, 2019
77e76f1
Missing import
dvdplm Aug 21, 2019
ad35cb1
Update ethcore/src/snapshot/consensus/mod.rs
dvdplm Aug 21, 2019
081e40e
Merge branch 'master' into dp/chore/extract-clique
dvdplm Aug 21, 2019
792e84e
Merge branch 'master' into dp/chore/extract-clique
dvdplm Aug 22, 2019
70a5f87
Merge branch 'dp/chore/extract-clique' into dp/chore/extract-spec-fro…
dvdplm Aug 22, 2019
94c0a67
missing import
dvdplm Aug 22, 2019
567d96c
Fix import
dvdplm Aug 22, 2019
c49895c
Merge branch 'master' into dp/chore/extract-spec-from-ethcore
dvdplm Aug 22, 2019
b34cfc4
double semi
dvdplm Aug 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 55 additions & 4 deletions Cargo.lock

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

74 changes: 36 additions & 38 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,16 @@ license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
blooms-db = { path = "util/blooms-db" }
log = "0.4"
rustc-hex = "1.0"
docopt = "1.0"
clap = "2"
term_size = "0.3"
textwrap = "0.9"
num_cpus = "1.2"
number_prefix = "0.2"
rpassword = "1.0"
semver = "0.9"
ansi_term = "0.11"
parking_lot = "0.8"
regex = "1.0"
atty = "0.2.8"
toml = "0.4"
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
futures = "0.1"
fdlimit = "0.1"
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
jsonrpc-core = "12.0.0"
parity-bytes = "0.1"
blooms-db = { path = "util/blooms-db" }
clap = "2"
cli-signer= { path = "cli-signer" }
client-traits = { path = "ethcore/client-traits" }
common-types = { path = "ethcore/types" }
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
dir = { path = "util/dir" }
docopt = "1.0"
engine = { path = "ethcore/engine" }
ethcore = { path = "ethcore", features = ["parity"] }
ethcore-accounts = { path = "accounts", optional = true }
Expand All @@ -45,36 +29,50 @@ ethcore-logger = { path = "parity/logger" }
ethcore-miner = { path = "miner" }
ethcore-network = { path = "util/network" }
ethcore-private-tx = { path = "ethcore/private-tx" }
ethcore-secretstore = { path = "secret-store", optional = true }
ethcore-service = { path = "ethcore/service" }
ethcore-sync = { path = "ethcore/sync" }
ethereum-types = "0.6.0"
ethkey = { path = "accounts/ethkey" }
ethstore = { path = "accounts/ethstore" }
fdlimit = "0.1"
futures = "0.1"
journaldb = { path = "util/journaldb" }
jsonrpc-core = "12.0.0"
keccak-hash = "0.2.0"
kvdb = "0.1"
kvdb-rocksdb = "0.1.3"
log = "0.4"
migration-rocksdb = { path = "util/migration-rocksdb" }
node-filter = { path = "ethcore/node-filter" }
rlp = "0.4.0"
cli-signer= { path = "cli-signer" }
num_cpus = "1.2"
number_prefix = "0.2"
panic_hook = { path = "util/panic-hook" }
parity-bytes = "0.1"
parity-daemonize = "0.3"
parity-hash-fetch = { path = "updater/hash-fetch" }
parity-ipfs-api = { path = "ipfs" }
parity-local-store = { path = "miner/local-store" }
parity-runtime = { path = "util/runtime" }
parity-path = "0.1"
parity-rpc = { path = "rpc" }
parity-runtime = { path = "util/runtime" }
parity-updater = { path = "updater" }
parity-util-mem = { version = "0.2.0", features = ["jemalloc-global"] }
parity-version = { path = "util/version" }
parity-path = "0.1"
dir = { path = "util/dir" }
panic_hook = { path = "util/panic-hook" }
keccak-hash = "0.2.0"
migration-rocksdb = { path = "util/migration-rocksdb" }
kvdb = "0.1"
kvdb-rocksdb = "0.1.3"
journaldb = { path = "util/journaldb" }

ethcore-secretstore = { path = "secret-store", optional = true }

parking_lot = "0.8"
regex = "1.0"
registrar = { path = "util/registrar" }

parity-util-mem = { version = "0.2.0", features = ["jemalloc-global"] }
rlp = "0.4.0"
rpassword = "1.0"
rustc-hex = "1.0"
semver = "0.9"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
spec = { path = "ethcore/spec" }
term_size = "0.3"
textwrap = "0.9"
toml = "0.4"

[build-dependencies]
rustc_version = "0.2"
Expand Down
1 change: 1 addition & 0 deletions ethash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "1.12.0"
authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
common-types = { path = "../ethcore/types" }
crunchy = "0.1.0"
either = "1.0.0"
ethereum-types = "0.6.0"
Expand Down
4 changes: 3 additions & 1 deletion ethash/benches/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
#[macro_use]
extern crate criterion;
extern crate ethash;
extern crate common_types;

use criterion::Criterion;
use ethash::{NodeCacheBuilder, OptimizeFor};
use ethash::NodeCacheBuilder;
use common_types::engines::OptimizeFor;

const HASH: [u8; 32] = [
0xf5, 0x7e, 0x6f, 0x3a, 0xcf, 0xc0, 0xdd, 0x4b,
Expand Down
4 changes: 3 additions & 1 deletion ethash/benches/progpow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ extern crate criterion;
extern crate ethash;
extern crate rustc_hex;
extern crate tempdir;
extern crate common_types;

use criterion::Criterion;
use ethash::progpow;

use tempdir::TempDir;
use rustc_hex::FromHex;
use ethash::{NodeCacheBuilder, OptimizeFor};
use ethash::NodeCacheBuilder;
use ethash::compute::light_compute;
use common_types::engines::OptimizeFor;

fn bench_hashimoto_light(c: &mut Criterion) {
let builder = NodeCacheBuilder::new(OptimizeFor::Memory, u64::max_value());
Expand Down
14 changes: 2 additions & 12 deletions ethash/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,9 @@ use std::path::{Path, PathBuf};
use std::slice;
use std::sync::Arc;

type Cache = Either<Vec<Node>, MmapMut>;

#[derive(PartialEq, Eq, Debug, Clone, Copy)]
pub enum OptimizeFor {
Cpu,
Memory,
}
use common_types::engines::OptimizeFor;

impl Default for OptimizeFor {
fn default() -> Self {
OptimizeFor::Cpu
}
}
type Cache = Either<Vec<Node>, MmapMut>;

fn byte_size(cache: &Cache) -> usize {
use self::Either::{Left, Right};
Expand Down
Loading