Merge pull request #6478 from Hawstein/trie-separated-from-util
separate trie from util and make its dependencies into libs
This commit is contained in:
commit
d69dd17d3c
87
Cargo.lock
generated
87
Cargo.lock
generated
@ -352,6 +352,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bloomable 0.1.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.0",
|
||||
"ethjson 0.1.0",
|
||||
"hash 0.1.0",
|
||||
@ -559,6 +560,7 @@ dependencies = [
|
||||
"ethash 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bloom-journal 0.1.0",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
@ -574,6 +576,7 @@ dependencies = [
|
||||
"futures 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hardware-wallet 1.8.0",
|
||||
"hash 0.1.0",
|
||||
"hashdb 0.1.0",
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.10.0-a.0 (git+https://github.com/paritytech/hyper)",
|
||||
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -581,10 +584,12 @@ dependencies = [
|
||||
"linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memorydb 0.1.0",
|
||||
"native-contracts 0.1.0",
|
||||
"num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"patricia_trie 0.1.0",
|
||||
"price-info 1.7.0",
|
||||
"rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -624,6 +629,10 @@ dependencies = [
|
||||
"siphasher 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-bytes"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-devtools"
|
||||
version = "1.8.0"
|
||||
@ -693,6 +702,7 @@ dependencies = [
|
||||
name = "ethcore-ipc-tests"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
@ -710,6 +720,7 @@ dependencies = [
|
||||
"bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
@ -722,7 +733,9 @@ dependencies = [
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memorydb 0.1.0",
|
||||
"parking_lot 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"patricia_trie 0.1.0",
|
||||
"rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rlp 0.2.0",
|
||||
"rlp_derive 0.1.0",
|
||||
@ -758,6 +771,7 @@ dependencies = [
|
||||
"bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
@ -790,6 +804,7 @@ dependencies = [
|
||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
@ -852,14 +867,20 @@ dependencies = [
|
||||
"eth-secp256k1 0.5.6 (git+https://github.com/paritytech/rust-secp256k1)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bloom-journal 0.1.0",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"hash 0.1.0",
|
||||
"hashdb 0.1.0",
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memorydb 0.1.0",
|
||||
"nibbleslice 0.1.0",
|
||||
"nibblevec 0.1.0",
|
||||
"parking_lot 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"patricia_trie 0.1.0",
|
||||
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rlp 0.2.0",
|
||||
"rocksdb 0.4.5 (git+https://github.com/paritytech/rust-rocksdb)",
|
||||
@ -965,6 +986,7 @@ dependencies = [
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
@ -1017,6 +1039,7 @@ dependencies = [
|
||||
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.0",
|
||||
"ethjson 0.1.0",
|
||||
"evm 0.1.0",
|
||||
@ -1147,6 +1170,14 @@ dependencies = [
|
||||
"tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashdb"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heapsize"
|
||||
version = "0.4.1"
|
||||
@ -1545,6 +1576,19 @@ dependencies = [
|
||||
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memorydb"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bigint 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"hash 0.1.0",
|
||||
"hashdb 0.1.0",
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rlp 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.2.6"
|
||||
@ -1711,12 +1755,28 @@ dependencies = [
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nibbleslice"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nibblevec"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nibbleslice 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "node-filter"
|
||||
version = "1.8.0"
|
||||
dependencies = [
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-network 1.8.0",
|
||||
"ethcore-util 1.8.0",
|
||||
@ -1929,6 +1989,7 @@ dependencies = [
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
@ -1992,6 +2053,7 @@ dependencies = [
|
||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-util 1.8.0",
|
||||
"fetch 0.1.0",
|
||||
@ -2041,6 +2103,7 @@ version = "1.8.0"
|
||||
dependencies = [
|
||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.0",
|
||||
"fetch 0.1.0",
|
||||
"futures 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2062,6 +2125,7 @@ dependencies = [
|
||||
"cid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.0",
|
||||
"jsonrpc-http-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
|
||||
"mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2102,6 +2166,7 @@ dependencies = [
|
||||
"ethash 1.8.0",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
@ -2218,6 +2283,7 @@ dependencies = [
|
||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-util 1.8.0",
|
||||
@ -2307,6 +2373,25 @@ dependencies = [
|
||||
name = "path"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "patricia_trie"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"hash 0.1.0",
|
||||
"hashdb 0.1.0",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memorydb 0.1.0",
|
||||
"nibbleslice 0.1.0",
|
||||
"nibblevec 0.1.0",
|
||||
"rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rlp 0.2.0",
|
||||
"triehash 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "1.0.0"
|
||||
@ -3372,12 +3457,14 @@ dependencies = [
|
||||
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"common-types 0.1.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.0",
|
||||
"ethjson 0.1.0",
|
||||
"evmjit 1.8.0",
|
||||
"hash 0.1.0",
|
||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"patricia_trie 0.1.0",
|
||||
"rlp 0.2.0",
|
||||
]
|
||||
|
||||
|
@ -35,6 +35,7 @@ jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "pa
|
||||
ethsync = { path = "sync" }
|
||||
ethcore = { path = "ethcore" }
|
||||
ethcore-util = { path = "util" }
|
||||
ethcore-bytes = { path = "util/bytes" }
|
||||
ethcore-bigint = { path = "util/bigint" }
|
||||
ethcore-io = { path = "util/io" }
|
||||
ethcore-devtools = { path = "devtools" }
|
||||
|
@ -32,6 +32,7 @@ jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git", branc
|
||||
|
||||
ethcore-util = { path = "../util" }
|
||||
ethcore-bigint = { path = "../util/bigint" }
|
||||
ethcore-bytes = { path = "../util/bytes" }
|
||||
fetch = { path = "../util/fetch" }
|
||||
node-health = { path = "./node-health" }
|
||||
parity-hash-fetch = { path = "../hash-fetch" }
|
||||
|
@ -261,7 +261,7 @@ impl<R: URLHint + 'static, F: Fetch> Fetcher for ContentFetcher<F, R> {
|
||||
mod tests {
|
||||
use std::env;
|
||||
use std::sync::Arc;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use fetch::{Fetch, Client};
|
||||
use futures::{future, Future, BoxFuture};
|
||||
use hash_fetch::urlhint::{URLHint, URLHintResult};
|
||||
|
@ -39,6 +39,7 @@ extern crate jsonrpc_http_server;
|
||||
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate fetch;
|
||||
extern crate node_health;
|
||||
extern crate parity_dapps_glue as parity_dapps;
|
||||
|
@ -21,7 +21,8 @@ use rustc_hex::FromHex;
|
||||
|
||||
use hash_fetch::urlhint::ContractClient;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address, ToPretty};
|
||||
use util::Address;
|
||||
use bytes::{Bytes, ToPretty};
|
||||
use parking_lot::Mutex;
|
||||
|
||||
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
|
||||
|
@ -23,6 +23,10 @@ env_logger = "0.4"
|
||||
ethabi = "2.0"
|
||||
ethash = { path = "../ethash" }
|
||||
ethcore-bloom-journal = { path = "../util/bloom" }
|
||||
ethcore-bytes = { path = "../util/bytes" }
|
||||
hashdb = { path = "../util/hashdb" }
|
||||
memorydb = { path = "../util/memorydb" }
|
||||
patricia_trie = { path = "../util/patricia_trie" }
|
||||
ethcore-devtools = { path = "../devtools" }
|
||||
ethcore-io = { path = "../util/io" }
|
||||
ethcore-ipc = { path = "../ipc/rpc" }
|
||||
|
@ -15,6 +15,9 @@ log = "0.3"
|
||||
ethcore = { path = ".."}
|
||||
ethcore-util = { path = "../../util" }
|
||||
ethcore-bigint = { path = "../../util/bigint" }
|
||||
ethcore-bytes = { path = "../../util/bytes" }
|
||||
memorydb = { path = "../../util/memorydb" }
|
||||
patricia_trie = { path = "../../util/patricia_trie" }
|
||||
ethcore-network = { path = "../../util/network" }
|
||||
ethcore-io = { path = "../../util/io" }
|
||||
ethcore-ipc = { path = "../../ipc/rpc", optional = true }
|
||||
|
@ -23,8 +23,9 @@
|
||||
use ethcore::ids::BlockId;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, HashDB, MemoryDB};
|
||||
use util::trie::{self, TrieMut, TrieDBMut, Trie, TrieDB, Recorder};
|
||||
use util::{HashDB, MemoryDB};
|
||||
use bytes::Bytes;
|
||||
use trie::{self, TrieMut, TrieDBMut, Trie, TrieDB, Recorder};
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
|
||||
// encode a key.
|
||||
|
@ -71,11 +71,14 @@ extern crate ethcore_io as io;
|
||||
extern crate ethcore_network as network;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate ethcore;
|
||||
extern crate evm;
|
||||
extern crate heapsize;
|
||||
extern crate futures;
|
||||
extern crate itertools;
|
||||
extern crate memorydb;
|
||||
extern crate patricia_trie as trie;
|
||||
extern crate rand;
|
||||
extern crate rlp;
|
||||
extern crate parking_lot;
|
||||
|
@ -33,9 +33,10 @@ use rlp::{RlpStream, UntrustedRlp};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::Mutex;
|
||||
use util::{Address, Bytes, DBValue, HashDB};
|
||||
use util::memorydb::MemoryDB;
|
||||
use util::trie::{Trie, TrieDB, TrieError};
|
||||
use util::{Address, DBValue, HashDB};
|
||||
use bytes::Bytes;
|
||||
use memorydb::MemoryDB;
|
||||
use trie::{Trie, TrieDB, TrieError};
|
||||
|
||||
const SUPPLIED_MATCHES: &'static str = "supplied responses always match produced requests; enforced by `check_response`; qed";
|
||||
|
||||
@ -896,8 +897,8 @@ mod tests {
|
||||
use bigint::hash::H256;
|
||||
use util::{MemoryDB, Address};
|
||||
use parking_lot::Mutex;
|
||||
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
||||
use util::trie::recorder::Recorder;
|
||||
use trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
||||
use trie::recorder::Recorder;
|
||||
use hash::keccak;
|
||||
|
||||
use ethcore::client::{BlockChainClient, TestBlockChainClient, EachBlockWith};
|
||||
|
@ -789,7 +789,7 @@ pub mod header_proof {
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Potentially incomplete header proof request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@ -1120,7 +1120,7 @@ pub mod account {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Potentially incomplete request for an account proof.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@ -1220,7 +1220,7 @@ pub mod account {
|
||||
pub mod storage {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Potentially incomplete request for an storage proof.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@ -1329,7 +1329,7 @@ pub mod storage {
|
||||
pub mod contract_code {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Potentially incomplete contract code request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@ -1417,7 +1417,8 @@ pub mod execution {
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address, DBValue};
|
||||
use util::{Address, DBValue};
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Potentially incomplete execution proof request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@ -1541,7 +1542,7 @@ pub mod epoch_signal {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Potentially incomplete epoch signal request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -10,6 +10,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
ethcore = { path = ".."}
|
||||
ethcore-util = { path = "../../util" }
|
||||
ethcore-bigint = { path = "../../util/bigint" }
|
||||
ethcore-bytes = { path = "../../util/bytes" }
|
||||
ethcore-io = { path = "../../util/io" }
|
||||
ethcore-network = { path = "../../util/network" }
|
||||
native-contracts = { path = "../native_contracts" }
|
||||
|
@ -19,6 +19,7 @@
|
||||
extern crate ethcore;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate ethcore_network as network;
|
||||
extern crate native_contracts;
|
||||
extern crate futures;
|
||||
@ -32,7 +33,8 @@ use native_contracts::PeerSet as Contract;
|
||||
use network::{NodeId, ConnectionFilter, ConnectionDirection};
|
||||
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use parking_lot::Mutex;
|
||||
use futures::Future;
|
||||
|
||||
|
@ -25,7 +25,8 @@ use triehash::ordered_trie_root;
|
||||
use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
|
||||
use basic_types::{LogBloom, Seal};
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use header::BlockNumber;
|
||||
|
||||
/// Best block info.
|
||||
|
@ -25,6 +25,7 @@ use heapsize::HeapSizeOf;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::{H256, H2048};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use bytes::Bytes;
|
||||
use util::*;
|
||||
use rlp::*;
|
||||
use header::*;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use rlp::*;
|
||||
use bigint::hash::{H256, H2048};
|
||||
use util::bytes::Bytes;
|
||||
use bytes::Bytes;
|
||||
use header::Header;
|
||||
use transaction::SignedTransaction;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use bigint::hash::H256;
|
||||
use util::bytes::Bytes;
|
||||
use bytes::Bytes;
|
||||
use views::BlockView;
|
||||
|
||||
#[derive(Default, Clone)]
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H2048;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use header::BlockNumber;
|
||||
use transaction::SignedTransaction;
|
||||
use super::fork::Fork;
|
||||
|
@ -26,7 +26,7 @@ use num::{BigUint, Zero, One};
|
||||
use hash::keccak;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::BytesRef;
|
||||
use bytes::BytesRef;
|
||||
use ethkey::{Signature, recover as ec_recover};
|
||||
use ethjson;
|
||||
|
||||
@ -509,7 +509,7 @@ mod tests {
|
||||
use super::{Builtin, Linear, ethereum_builtin, Pricer, Modexp, modexp as me};
|
||||
use ethjson;
|
||||
use bigint::prelude::U256;
|
||||
use util::BytesRef;
|
||||
use bytes::BytesRef;
|
||||
use rustc_hex::FromHex;
|
||||
use num::{BigUint, Zero, One};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use ipc::IpcConfig;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Represents what has to be handled by actor listening to chain events
|
||||
#[ipc]
|
||||
|
@ -25,11 +25,10 @@ use itertools::Itertools;
|
||||
// util
|
||||
use hash::keccak;
|
||||
use timer::PerfTimer;
|
||||
use util::UtilError;
|
||||
use util::Bytes;
|
||||
use util::{journaldb, DBValue, TrieFactory, Trie};
|
||||
use util::Address;
|
||||
use util::trie::TrieSpec;
|
||||
use bytes::Bytes;
|
||||
use util::{journaldb, DBValue};
|
||||
use util::{Address, UtilError};
|
||||
use trie::{TrieSpec, TrieFactory, Trie};
|
||||
use util::kvdb::*;
|
||||
|
||||
// other
|
||||
|
@ -17,7 +17,7 @@
|
||||
use util::UtilError;
|
||||
use std::fmt::{Display, Formatter, Error as FmtError};
|
||||
|
||||
use util::trie::TrieError;
|
||||
use trie::TrieError;
|
||||
|
||||
/// Client configuration errors.
|
||||
#[derive(Debug)]
|
||||
|
@ -20,7 +20,9 @@ use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{self, journaldb, trie};
|
||||
use util::journaldb;
|
||||
use trie;
|
||||
use bytes;
|
||||
use util::kvdb::{self, KeyValueDB};
|
||||
use {state, state_db, client, executive, trace, transaction, db, spec, pod_state};
|
||||
use factory::Factories;
|
||||
@ -31,7 +33,7 @@ use vm::{self, ActionParams};
|
||||
#[derive(Debug)]
|
||||
pub enum EvmTestError {
|
||||
/// Trie integrity error.
|
||||
Trie(util::TrieError),
|
||||
Trie(trie::TrieError),
|
||||
/// EVM error.
|
||||
Evm(vm::Error),
|
||||
/// Initialization error.
|
||||
@ -179,7 +181,7 @@ impl<'a> EvmTestClient<'a> {
|
||||
let (gas_left, _) = executive.call(
|
||||
params,
|
||||
&mut substate,
|
||||
util::BytesRef::Flexible(&mut output),
|
||||
bytes::BytesRef::Flexible(&mut output),
|
||||
&mut tracer,
|
||||
vm_tracer,
|
||||
).map_err(EvmTestError::Evm)?;
|
||||
|
@ -27,6 +27,7 @@ use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::RwLock;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use rlp::*;
|
||||
use ethkey::{Generator, Random};
|
||||
use devtools::*;
|
||||
|
@ -36,8 +36,9 @@ use verification::queue::QueueInfo as BlockQueueInfo;
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::hashdb::DBValue;
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use hashdb::DBValue;
|
||||
|
||||
use types::ids::*;
|
||||
use types::basic_account::BasicAccount;
|
||||
|
@ -48,6 +48,7 @@ use semantic_version::SemanticVersion;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
|
||||
mod finality;
|
||||
|
||||
|
@ -59,6 +59,7 @@ use bigint::hash::H256;
|
||||
use semantic_version::SemanticVersion;
|
||||
use util::*;
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Default EIP-210 contrat code.
|
||||
/// As defined in https://github.com/ethereum/EIPs/pull/210/commits/9df24a3714af42e3bf350265bdc75b486c909d7f#diff-e02a92c2fb96c1a1bfb05e4c6e2ef5daR49
|
||||
@ -420,6 +421,7 @@ pub mod common {
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::{Bytes, BytesRef};
|
||||
use super::Engine;
|
||||
|
||||
/// Execute a call as the system address.
|
||||
|
@ -20,6 +20,7 @@ use std::cmp;
|
||||
use hash::keccak;
|
||||
use bigint::hash::{H256, H520};
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use super::{Height, View, BlockHash, Step};
|
||||
use error::Error;
|
||||
use header::Header;
|
||||
|
@ -36,6 +36,7 @@ use parking_lot::RwLock;
|
||||
use util::*;
|
||||
use unexpected::{OutOfBounds, Mismatch};
|
||||
use client::EngineClient;
|
||||
use bytes::Bytes;
|
||||
use error::{Error, BlockError};
|
||||
use header::{Header, BlockNumber};
|
||||
use builtin::Builtin;
|
||||
@ -775,6 +776,7 @@ mod tests {
|
||||
use std::str::FromStr;
|
||||
use rustc_hex::FromHex;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use block::*;
|
||||
use error::{Error, BlockError};
|
||||
use header::Header;
|
||||
|
@ -21,6 +21,7 @@ use std::sync::Weak;
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::RwLock;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
|
||||
use futures::Future;
|
||||
use native_contracts::ValidatorReport as Provider;
|
||||
@ -139,6 +140,7 @@ mod tests {
|
||||
use hash::keccak;
|
||||
use bigint::hash::H520;
|
||||
use util::*;
|
||||
use bytes::ToPretty;
|
||||
use rlp::encode;
|
||||
use spec::Spec;
|
||||
use header::Header;
|
||||
|
@ -26,7 +26,8 @@ mod multi;
|
||||
use std::sync::Weak;
|
||||
use ids::BlockId;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use ethjson::spec::ValidatorSet as ValidatorSpec;
|
||||
use client::EngineClient;
|
||||
use header::{Header, BlockNumber};
|
||||
|
@ -21,7 +21,8 @@ use std::sync::Weak;
|
||||
use engines::{Call, Engine};
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::RwLock;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use ids::BlockId;
|
||||
use header::{BlockNumber, Header};
|
||||
use client::EngineClient;
|
||||
|
@ -26,6 +26,7 @@ use bigint::hash::{H160, H256};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use util::cache::MemoryLruCache;
|
||||
use unexpected::Mismatch;
|
||||
use rlp::{UntrustedRlp, RlpStream};
|
||||
|
@ -21,7 +21,8 @@ use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
|
||||
use heapsize::HeapSizeOf;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
|
||||
use engines::{Call, Engine};
|
||||
use header::{Header, BlockNumber};
|
||||
|
@ -22,6 +22,7 @@ use std::hash::Hash;
|
||||
use bigint::hash::{H256, H520};
|
||||
use parking_lot:: RwLock;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use rlp::{Encodable, RlpStream};
|
||||
|
||||
pub trait Message: Clone + PartialEq + Eq + Hash + Encodable + Debug {
|
||||
|
@ -21,6 +21,7 @@ use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use trie::TrieError;
|
||||
use io::*;
|
||||
use header::BlockNumber;
|
||||
use basic_types::LogBloom;
|
||||
|
@ -17,7 +17,9 @@
|
||||
//! Transaction execution format module.
|
||||
|
||||
use bigint::prelude::{U256, U512};
|
||||
use util::{Bytes, Address, trie};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use trie;
|
||||
use vm;
|
||||
use trace::{VMTrace, FlatTrace};
|
||||
use log_entry::LogEntry;
|
||||
|
@ -21,6 +21,7 @@ use hash::keccak;
|
||||
use bigint::prelude::{U256, U512};
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::{Bytes, BytesRef};
|
||||
use state::{Backend as StateBackend, State, Substate, CleanupMode};
|
||||
use engines::Engine;
|
||||
use vm::EnvInfo;
|
||||
@ -680,7 +681,7 @@ mod tests {
|
||||
use bigint::prelude::{U256, U512};
|
||||
use bigint::hash::H256;
|
||||
use util::Address;
|
||||
use util::bytes::BytesRef;
|
||||
use bytes::BytesRef;
|
||||
use vm::{ActionParams, ActionValue, CallType, EnvInfo, CreateContractAddress};
|
||||
use evm::{Factory, VMType};
|
||||
use error::ExecutionError;
|
||||
|
@ -20,6 +20,7 @@ use std::sync::Arc;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::{Bytes, BytesRef};
|
||||
use state::{Backend as StateBackend, State, Substate, CleanupMode};
|
||||
use engines::Engine;
|
||||
use executive::*;
|
||||
|
@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use util::trie::TrieFactory;
|
||||
use trie::TrieFactory;
|
||||
use evm::Factory as EvmFactory;
|
||||
use account_db::Factory as AccountFactory;
|
||||
|
||||
@ -27,4 +27,4 @@ pub struct Factories {
|
||||
pub trie: TrieFactory,
|
||||
/// factory for account databases.
|
||||
pub accountdb: AccountFactory,
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ use heapsize::HeapSizeOf;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use basic_types::{LogBloom, ZERO_LOGBLOOM};
|
||||
use time::get_time;
|
||||
use rlp::*;
|
||||
|
@ -30,6 +30,8 @@ use tests::helpers::*;
|
||||
use ethjson;
|
||||
use trace::{Tracer, NoopTracer};
|
||||
use trace::{VMTracer, NoopVMTracer};
|
||||
use bytes::{Bytes, BytesRef};
|
||||
use trie;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
struct CallCreate {
|
||||
|
@ -15,9 +15,9 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use ethjson;
|
||||
use util::trie::{TrieFactory, TrieSpec};
|
||||
use trie::{TrieFactory, TrieSpec};
|
||||
use bigint::hash::H256;
|
||||
use util::memorydb::MemoryDB;
|
||||
use memorydb::MemoryDB;
|
||||
|
||||
fn test_trie(json: &[u8], trie: TrieSpec) -> Vec<String> {
|
||||
let tests = ethjson::trie::Test::load(json).unwrap();
|
||||
@ -49,7 +49,7 @@ fn test_trie(json: &[u8], trie: TrieSpec) -> Vec<String> {
|
||||
}
|
||||
|
||||
mod generic {
|
||||
use util::trie::TrieSpec;
|
||||
use trie::TrieSpec;
|
||||
|
||||
fn do_json_test(json: &[u8]) -> Vec<String> {
|
||||
super::test_trie(json, TrieSpec::Generic)
|
||||
@ -60,7 +60,7 @@ mod generic {
|
||||
}
|
||||
|
||||
mod secure {
|
||||
use util::trie::TrieSpec;
|
||||
use trie::TrieSpec;
|
||||
|
||||
fn do_json_test(json: &[u8]) -> Vec<String> {
|
||||
super::test_trie(json, TrieSpec::Secure)
|
||||
|
@ -86,12 +86,14 @@ extern crate ethcore_devtools as devtools;
|
||||
extern crate ethcore_io as io;
|
||||
extern crate ethcore_ipc_nano as nanoipc;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate ethcore_logger;
|
||||
extern crate ethcore_stratum;
|
||||
extern crate ethjson;
|
||||
extern crate ethkey;
|
||||
extern crate futures;
|
||||
extern crate hardware_wallet;
|
||||
extern crate hashdb;
|
||||
extern crate hyper;
|
||||
extern crate itertools;
|
||||
extern crate linked_hash_map;
|
||||
@ -106,6 +108,8 @@ extern crate rayon;
|
||||
extern crate rlp;
|
||||
extern crate hash;
|
||||
extern crate heapsize;
|
||||
extern crate memorydb;
|
||||
extern crate patricia_trie as trie;
|
||||
extern crate triehash;
|
||||
extern crate ansi_term;
|
||||
extern crate semantic_version;
|
||||
|
@ -20,7 +20,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use util::kvdb::Database;
|
||||
use util::migration::{Batch, Config, Error, Migration, SimpleMigration, Progress};
|
||||
use hash::keccak;
|
||||
|
@ -19,13 +19,13 @@
|
||||
use std::sync::Arc;
|
||||
use db::{COL_EXTRA, COL_HEADERS, COL_STATE};
|
||||
use state_db::{ACCOUNT_BLOOM_SPACE, DEFAULT_ACCOUNT_PRESET, StateDB};
|
||||
use util::trie::TrieDB;
|
||||
use trie::TrieDB;
|
||||
use views::HeaderView;
|
||||
use bloom_journal::Bloom;
|
||||
use util::migration::{Error, Migration, Progress, Batch, Config};
|
||||
use util::journaldb;
|
||||
use bigint::hash::H256;
|
||||
use util::Trie;
|
||||
use trie::Trie;
|
||||
use util::{Database, DBTransaction};
|
||||
|
||||
/// Account bloom upgrade routine. If bloom already present, does nothing.
|
||||
|
@ -22,6 +22,7 @@ use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use timer::PerfTimer;
|
||||
use using_queue::{UsingQueue, GetAction};
|
||||
use account_provider::{AccountProvider, SignError as AccountError};
|
||||
|
@ -63,7 +63,8 @@ pub use self::stratum::{Stratum, Error as StratumError, Options as StratumOption
|
||||
use std::collections::BTreeMap;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use client::{MiningBlockChainClient};
|
||||
use block::ClosedBlock;
|
||||
use header::BlockNumber;
|
||||
|
@ -22,6 +22,8 @@ use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use triehash::sec_trie_root;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use trie::TrieFactory;
|
||||
use state::Account;
|
||||
use ethjson;
|
||||
use types::account_diff::*;
|
||||
|
@ -20,6 +20,7 @@ use std::sync::Arc;
|
||||
use std::path::Path;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use io::*;
|
||||
use spec::Spec;
|
||||
use error::*;
|
||||
|
@ -23,8 +23,9 @@ use hash::{KECCAK_EMPTY, KECCAK_NULL_RLP};
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, HashDB};
|
||||
use util::trie::{TrieDB, Trie};
|
||||
use util::HashDB;
|
||||
use bytes::Bytes;
|
||||
use trie::{TrieDB, Trie};
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
|
||||
use std::collections::HashSet;
|
||||
@ -151,7 +152,7 @@ pub fn from_fat_rlp(
|
||||
rlp: UntrustedRlp,
|
||||
mut storage_root: H256,
|
||||
) -> Result<(BasicAccount, Option<Bytes>), Error> {
|
||||
use util::{TrieDBMut, TrieMut};
|
||||
use trie::{TrieDBMut, TrieMut};
|
||||
|
||||
// check for special case of empty account.
|
||||
if rlp.is_empty() {
|
||||
|
@ -23,7 +23,7 @@ use hash::keccak;
|
||||
use views::BlockView;
|
||||
use rlp::{DecoderError, RlpStream, UntrustedRlp};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use triehash::ordered_trie_root;
|
||||
|
||||
const HEADER_FIELDS: usize = 8;
|
||||
@ -140,7 +140,8 @@ mod tests {
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
|
||||
fn encode_block(b: &Block) -> Bytes {
|
||||
b.rlp_bytes(::basic_types::Seal::With)
|
||||
|
@ -34,7 +34,8 @@ use snapshot::{Error, ManifestData};
|
||||
use itertools::{Position, Itertools};
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, KeyValueDB};
|
||||
use util::KeyValueDB;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Snapshot creation and restoration for PoA chains.
|
||||
/// Chunk format:
|
||||
|
@ -31,7 +31,8 @@ use engines::Engine;
|
||||
use snapshot::{Error, ManifestData};
|
||||
use snapshot::block::AbridgedBlock;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, KeyValueDB};
|
||||
use util::KeyValueDB;
|
||||
use bytes::Bytes;
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
use rand::OsRng;
|
||||
|
||||
|
@ -21,7 +21,7 @@ use std::fmt;
|
||||
use ids::BlockId;
|
||||
|
||||
use bigint::hash::H256;
|
||||
use util::trie::TrieError;
|
||||
use trie::TrieError;
|
||||
use rlp::DecoderError;
|
||||
|
||||
/// Snapshot-related errors.
|
||||
|
@ -25,7 +25,7 @@ use std::io::{self, Read, Seek, SeekFrom, Write};
|
||||
use std::fs::{self, File};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use bigint::hash::H256;
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
|
||||
|
@ -32,11 +32,12 @@ use ids::BlockId;
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, HashDB, DBValue, snappy};
|
||||
use util::{HashDB, DBValue, snappy};
|
||||
use bytes::Bytes;
|
||||
use parking_lot::Mutex;
|
||||
use util::journaldb::{self, Algorithm, JournalDB};
|
||||
use util::kvdb::KeyValueDB;
|
||||
use util::trie::{TrieDB, TrieDBMut, Trie, TrieMut};
|
||||
use trie::{TrieDB, TrieDBMut, Trie, TrieMut};
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
use bloom_journal::Bloom;
|
||||
|
||||
|
@ -37,7 +37,8 @@ use io::IoChannel;
|
||||
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::{Mutex, RwLock, RwLockReadGuard};
|
||||
use util::{Bytes, UtilError};
|
||||
use util::UtilError;
|
||||
use bytes::Bytes;
|
||||
use util::journaldb::Algorithm;
|
||||
use util::kvdb::{Database, DatabaseConfig};
|
||||
use util::snappy;
|
||||
@ -161,7 +162,7 @@ impl Restoration {
|
||||
|
||||
// finish up restoration.
|
||||
fn finalize(mut self, engine: &Engine) -> Result<(), Error> {
|
||||
use util::trie::TrieError;
|
||||
use trie::TrieError;
|
||||
|
||||
if !self.is_done() { return Ok(()) }
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use super::{ManifestData, RestorationStatus};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use ipc::IpcConfig;
|
||||
|
||||
/// The interface for a snapshot network service.
|
||||
|
@ -33,10 +33,10 @@ use rand::Rng;
|
||||
|
||||
use util::{DBValue, KeyValueDB};
|
||||
use bigint::hash::H256;
|
||||
use util::hashdb::HashDB;
|
||||
use hashdb::HashDB;
|
||||
use util::journaldb;
|
||||
use util::trie::{Alphabet, StandardMap, SecTrieDBMut, TrieMut, ValueMode};
|
||||
use util::trie::{TrieDB, TrieDBMut, Trie};
|
||||
use trie::{Alphabet, StandardMap, SecTrieDBMut, TrieMut, ValueMode};
|
||||
use trie::{TrieDB, TrieDBMut, Trie};
|
||||
|
||||
// the proportion of accounts we will alter each tick.
|
||||
const ACCOUNT_CHURN: f32 = 0.01;
|
||||
|
@ -28,7 +28,7 @@ use rand::{XorShiftRng, SeedableRng};
|
||||
use bigint::hash::H256;
|
||||
use util::journaldb::{self, Algorithm};
|
||||
use util::kvdb::{Database, DatabaseConfig};
|
||||
use util::memorydb::MemoryDB;
|
||||
use memorydb::MemoryDB;
|
||||
use parking_lot::Mutex;
|
||||
use devtools::RandomTempPath;
|
||||
|
||||
@ -99,7 +99,7 @@ fn get_code_from_prev_chunk() {
|
||||
use rlp::RlpStream;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::HashDB;
|
||||
use hashdb::HashDB;
|
||||
|
||||
use account_db::{AccountDBMut, AccountDB};
|
||||
|
||||
|
@ -23,7 +23,7 @@ use service::ClientIoMessage;
|
||||
|
||||
use io::IoChannel;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -43,6 +43,7 @@ use bigint::prelude::U256;
|
||||
use bigint::hash::{H256, H2048};
|
||||
use parking_lot::RwLock;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Parameters common to ethereum-like blockchains.
|
||||
/// NOTE: when adding bugfix hard-fork parameters,
|
||||
|
@ -23,6 +23,9 @@ use hash::{KECCAK_EMPTY, KECCAK_NULL_RLP, keccak};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::{Bytes, ToPretty};
|
||||
use trie;
|
||||
use trie::{SecTrieDB, Trie, TrieFactory, TrieError};
|
||||
use pod_account::*;
|
||||
use rlp::*;
|
||||
use lru_cache::LruCache;
|
||||
@ -450,8 +453,8 @@ impl Account {
|
||||
/// `storage_key` is the hash of the desired storage key, meaning
|
||||
/// this will only work correctly under a secure trie.
|
||||
pub fn prove_storage(&self, db: &HashDB, storage_key: H256) -> Result<(Vec<Bytes>, H256), Box<TrieError>> {
|
||||
use util::trie::{Trie, TrieDB};
|
||||
use util::trie::recorder::Recorder;
|
||||
use trie::{Trie, TrieDB};
|
||||
use trie::recorder::Recorder;
|
||||
|
||||
let mut recorder = Recorder::new();
|
||||
|
||||
@ -475,6 +478,7 @@ impl fmt::Debug for Account {
|
||||
mod tests {
|
||||
use rlp::{UntrustedRlp, RlpType, Compressible};
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use super::*;
|
||||
use account_db::*;
|
||||
|
||||
|
@ -28,7 +28,7 @@ use state::Account;
|
||||
use bigint::hash::H256;
|
||||
use parking_lot::Mutex;
|
||||
use util::{Address, MemoryDB};
|
||||
use util::hashdb::{AsHashDB, HashDB, DBValue};
|
||||
use hashdb::{AsHashDB, HashDB, DBValue};
|
||||
|
||||
/// State backend. See module docs for more details.
|
||||
pub trait Backend: Send {
|
||||
|
@ -45,9 +45,12 @@ use evm::{Factory as EvmFactory};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
|
||||
use trie;
|
||||
use trie::{Trie, TrieError, TrieDB};
|
||||
use trie::recorder::Recorder;
|
||||
|
||||
use util::trie;
|
||||
use util::trie::recorder::Recorder;
|
||||
|
||||
mod account;
|
||||
mod substate;
|
||||
|
@ -21,7 +21,7 @@ use util::cache::MemoryLruCache;
|
||||
use util::journaldb::JournalDB;
|
||||
use util::kvdb::KeyValueDB;
|
||||
use bigint::hash::H256;
|
||||
use util::hashdb::HashDB;
|
||||
use hashdb::HashDB;
|
||||
use state::{self, Account};
|
||||
use header::BlockNumber;
|
||||
use hash::keccak;
|
||||
|
@ -14,6 +14,7 @@ use rustc_hex::FromHex;
|
||||
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::BytesRef;
|
||||
|
||||
evm_test!{test_blockhash_eip210: test_blockhash_eip210_jit, test_blockhash_eip210_int}
|
||||
fn test_blockhash_eip210(factory: Factory) {
|
||||
|
@ -23,6 +23,7 @@ use client::{BlockChainClient, Client, ClientConfig};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use spec::*;
|
||||
use account_provider::AccountProvider;
|
||||
use state_db::StateDB;
|
||||
|
@ -17,7 +17,8 @@
|
||||
//! Simple executive tracer.
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use vm::ActionParams;
|
||||
use trace::trace::{Call, Create, Action, Res, CreateResult, CallResult, VMTrace, VMOperation, VMExecutedOperation, MemoryDiff, StorageDiff, Suicide, Reward, RewardType};
|
||||
use trace::{Tracer, VMTracer, FlatTrace, TraceError};
|
||||
|
@ -39,7 +39,8 @@ pub use self::types::filter::{Filter, AddressesFilter};
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address, DBTransaction};
|
||||
use util::{Address, DBTransaction};
|
||||
use bytes::Bytes;
|
||||
use self::trace::{Call, Create};
|
||||
use vm::ActionParams;
|
||||
use header::BlockNumber;
|
||||
|
@ -17,7 +17,8 @@
|
||||
//! Nonoperative tracer.
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use vm::ActionParams;
|
||||
use trace::{Tracer, VMTracer, FlatTrace, TraceError};
|
||||
use trace::trace::{Call, Create, VMTrace, RewardType};
|
||||
|
@ -17,7 +17,8 @@
|
||||
//! Tracing datatypes.
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use hash::keccak;
|
||||
use bloomable::Bloomable;
|
||||
use rlp::*;
|
||||
|
@ -22,7 +22,8 @@ use hash::keccak;
|
||||
use heapsize::HeapSizeOf;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use ethkey::{Signature, Secret, Public, recover, public_to_address, Error as EthkeyError};
|
||||
use error::*;
|
||||
use evm::Schedule;
|
||||
|
@ -22,7 +22,8 @@ use std::collections::hash_map::Entry;
|
||||
use bigint::hash::H256;
|
||||
use native_contracts::TransactAcl as Contract;
|
||||
use client::{EngineClient, BlockId, ChainNotify};
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use futures::{self, Future};
|
||||
use spec::CommonParams;
|
||||
|
@ -77,7 +77,7 @@ pub mod blocks {
|
||||
use heapsize::HeapSizeOf;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// A mode for verifying blocks.
|
||||
pub struct Blocks;
|
||||
|
@ -26,8 +26,8 @@ use hash::keccak;
|
||||
use triehash::ordered_trie_root;
|
||||
use heapsize::HeapSizeOf;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use bytes::Bytes;
|
||||
use engines::Engine;
|
||||
use error::{BlockError, Error};
|
||||
use blockchain::*;
|
||||
@ -276,7 +276,7 @@ mod tests {
|
||||
use bigint::hash::{H256, H2048};
|
||||
use triehash::ordered_trie_root;
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use ethkey::{Random, Generator};
|
||||
use header::*;
|
||||
use verification::*;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
use hash::keccak;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use header::*;
|
||||
use transaction::*;
|
||||
use super::{TransactionView, HeaderView};
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
use hash::keccak;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use header::*;
|
||||
use transaction::*;
|
||||
use super::{TransactionView, HeaderView};
|
||||
|
@ -19,7 +19,8 @@
|
||||
use hash::keccak;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::{H256, H2048};
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use rlp::Rlp;
|
||||
use header::BlockNumber;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
//! View onto transaction rlp
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
use hash::keccak;
|
||||
use rlp::Rlp;
|
||||
|
||||
|
@ -7,6 +7,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
rlp = { path = "../../util/rlp" }
|
||||
rlp_derive = { path = "../../util/rlp_derive" }
|
||||
ethcore-bytes = { path = "../../util/bytes" }
|
||||
ethcore-util = { path = "../../util" }
|
||||
ethcore-bigint = { path = "../../util/bigint" }
|
||||
ethjson = { path = "../../json" }
|
||||
|
@ -21,7 +21,7 @@ use std::fmt;
|
||||
use std::collections::BTreeMap;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
/// Diff type for specifying a change (or not).
|
||||
@ -114,7 +114,7 @@ fn interpreted_hash(u: &H256) -> String {
|
||||
|
||||
impl fmt::Display for AccountDiff {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
use util::bytes::ToPretty;
|
||||
use bytes::ToPretty;
|
||||
|
||||
match self.nonce {
|
||||
Diff::Born(ref x) => write!(f, " non {}", x)?,
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate ethjson;
|
||||
extern crate rlp;
|
||||
#[macro_use]
|
||||
|
@ -19,7 +19,8 @@
|
||||
use std::ops::Deref;
|
||||
use hash::keccak;
|
||||
use heapsize::HeapSizeOf;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use bigint::hash::H256;
|
||||
use bloomable::Bloomable;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
use bigint::hash::H256;
|
||||
use rlp::*;
|
||||
use util::Bytes;
|
||||
use bytes::Bytes;
|
||||
|
||||
/// Manifest data.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -6,7 +6,9 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
byteorder = "1.0"
|
||||
ethcore-util = { path = "../../util" }
|
||||
ethcore-bytes = { path = "../../util/bytes" }
|
||||
ethcore-bigint = { path = "../../util/bigint" }
|
||||
patricia_trie = { path = "../../util/patricia_trie" }
|
||||
log = "0.3"
|
||||
common-types = { path = "../types" }
|
||||
evmjit = { path = "../../evmjit", optional = true }
|
||||
|
@ -17,7 +17,8 @@
|
||||
//! Evm input params.
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::{H256};
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use hash::{keccak, KECCAK_EMPTY};
|
||||
use ethjson;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
//! VM errors module
|
||||
|
||||
use util::trie;
|
||||
use trie;
|
||||
use std::fmt;
|
||||
|
||||
/// VM errors.
|
||||
|
@ -20,6 +20,7 @@ use std::sync::Arc;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::*;
|
||||
use bytes::Bytes;
|
||||
use call_type::CallType;
|
||||
use env_info::EnvInfo;
|
||||
use schedule::Schedule;
|
||||
|
@ -18,10 +18,12 @@
|
||||
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate common_types as types;
|
||||
extern crate ethjson;
|
||||
extern crate rlp;
|
||||
extern crate hash;
|
||||
extern crate patricia_trie as trie;
|
||||
|
||||
mod action_params;
|
||||
mod call_type;
|
||||
|
@ -19,7 +19,8 @@ use std::collections::{HashMap, HashSet};
|
||||
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use {
|
||||
CallType, Schedule, EnvInfo,
|
||||
ReturnData, Ext, ContractCreateResult, MessageCallResult,
|
||||
|
@ -17,6 +17,7 @@ ethcore = { path = "../ethcore" }
|
||||
ethjson = { path = "../json" }
|
||||
ethcore-util = { path = "../util" }
|
||||
ethcore-bigint = { path = "../util/bigint" }
|
||||
ethcore-bytes = { path = "../util/bytes" }
|
||||
evm = { path = "../ethcore/evm" }
|
||||
vm = { path = "../ethcore/vm" }
|
||||
panic_hook = { path = "../panic_hook" }
|
||||
|
@ -20,7 +20,7 @@ use ethcore::trace;
|
||||
use std::collections::HashMap;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::ToPretty;
|
||||
use bytes::ToPretty;
|
||||
|
||||
use display;
|
||||
use info as vm;
|
||||
|
@ -17,7 +17,7 @@
|
||||
//! Simple VM output.
|
||||
|
||||
use ethcore::trace;
|
||||
use util::ToPretty;
|
||||
use bytes::ToPretty;
|
||||
|
||||
use display;
|
||||
use info as vm;
|
||||
|
@ -27,6 +27,7 @@ extern crate serde_derive;
|
||||
extern crate docopt;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate vm;
|
||||
extern crate evm;
|
||||
extern crate panic_hook;
|
||||
@ -37,7 +38,8 @@ use std::path::PathBuf;
|
||||
use docopt::Docopt;
|
||||
use rustc_hex::FromHex;
|
||||
use bigint::prelude::U256;
|
||||
use util::{Bytes, Address};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use ethcore::spec;
|
||||
use vm::{ActionParams, CallType};
|
||||
|
||||
|
@ -18,6 +18,7 @@ parking_lot = "0.4"
|
||||
fetch = { path = "../util/fetch" }
|
||||
ethcore-util = { path = "../util" }
|
||||
ethcore-bigint = { path = "../util/bigint" }
|
||||
ethcore-bytes = { path = "../util/bytes" }
|
||||
parity-reactor = { path = "../util/reactor" }
|
||||
native-contracts = { path = "../ethcore/native_contracts" }
|
||||
hash = { path = "../util/hash" }
|
||||
|
@ -26,6 +26,7 @@ extern crate mime;
|
||||
extern crate ethabi;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate futures;
|
||||
extern crate mime_guess;
|
||||
extern crate native_contracts;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user