Merge branch 'master' into fo-6418-dont-export-bigint
# Conflicts: # dapps/src/tests/helpers/registrar.rs # ethcore/evm/src/interpreter/shared_cache.rs # ethcore/light/src/client/header_chain.rs # ethcore/light/src/client/mod.rs # ethcore/light/src/net/mod.rs # ethcore/light/src/on_demand/request.rs # ethcore/light/src/on_demand/tests.rs # ethcore/light/src/provider.rs # ethcore/node_filter/src/lib.rs # ethcore/src/block.rs # ethcore/src/blockchain/blockchain.rs # ethcore/src/client/test_client.rs # ethcore/src/engines/authority_round/mod.rs # ethcore/src/engines/basic_authority.rs # ethcore/src/engines/mod.rs # ethcore/src/engines/tendermint/mod.rs # ethcore/src/engines/validator_set/contract.rs # ethcore/src/engines/validator_set/multi.rs # ethcore/src/engines/validator_set/safe_contract.rs # ethcore/src/engines/vote_collector.rs # ethcore/src/miner/external.rs # ethcore/src/miner/miner.rs # ethcore/src/miner/service_transaction_checker.rs # ethcore/src/miner/work_notify.rs # ethcore/src/pod_account.rs # ethcore/src/pod_state.rs # ethcore/src/snapshot/block.rs # ethcore/src/snapshot/consensus/work.rs # ethcore/src/snapshot/mod.rs # ethcore/src/snapshot/service.rs # ethcore/src/spec/spec.rs # ethcore/src/state/backend.rs # ethcore/src/trace/db.rs # ethcore/src/verification/queue/mod.rs # ethcore/src/verification/verification.rs # parity/informant.rs # rpc/src/v1/helpers/dispatch.rs # rpc/src/v1/helpers/light_fetch.rs # rpc/src/v1/helpers/signing_queue.rs # rpc/src/v1/impls/eth.rs # rpc/src/v1/impls/eth_filter.rs # rpc/src/v1/impls/eth_pubsub.rs # rpc/src/v1/impls/light/eth.rs # rpc/src/v1/impls/signing.rs # rpc/src/v1/tests/helpers/miner_service.rs # rpc/src/v1/tests/helpers/snapshot_service.rs # rpc/src/v1/tests/helpers/sync_provider.rs # rpc/src/v1/tests/mocked/eth.rs # stratum/src/lib.rs # sync/src/blocks.rs # sync/src/chain.rs # sync/src/light_sync/mod.rs # sync/src/tests/helpers.rs # sync/src/tests/snapshot.rs # updater/src/updater.rs # util/src/lib.rs # util/triehash/src/lib.rs
This commit is contained in:
commit
e54784bfeb
33
Cargo.lock
generated
33
Cargo.lock
generated
@ -494,6 +494,7 @@ dependencies = [
|
|||||||
name = "ethcore"
|
name = "ethcore"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bloomable 0.1.0",
|
"bloomable 0.1.0",
|
||||||
"bloomchain 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bloomchain 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -532,17 +533,20 @@ dependencies = [
|
|||||||
"native-contracts 0.1.0",
|
"native-contracts 0.1.0",
|
||||||
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"price-info 1.7.0",
|
"price-info 1.7.0",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.2.0",
|
"rlp 0.2.0",
|
||||||
"rlp_derive 0.1.0",
|
"rlp_derive 0.1.0",
|
||||||
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"semantic_version 0.1.0",
|
||||||
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"stats 0.1.0",
|
"stats 0.1.0",
|
||||||
"table 0.1.0",
|
"table 0.1.0",
|
||||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"transient-hashmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"transient-hashmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"triehash 0.1.0",
|
||||||
"using_queue 0.1.0",
|
"using_queue 0.1.0",
|
||||||
"vm 0.1.0",
|
"vm 0.1.0",
|
||||||
"wasm 0.1.0",
|
"wasm 0.1.0",
|
||||||
@ -665,6 +669,7 @@ dependencies = [
|
|||||||
"heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.2.0",
|
"rlp 0.2.0",
|
||||||
"rlp_derive 0.1.0",
|
"rlp_derive 0.1.0",
|
||||||
@ -673,6 +678,7 @@ dependencies = [
|
|||||||
"smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"stats 0.1.0",
|
"stats 0.1.0",
|
||||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"triehash 0.1.0",
|
||||||
"vm 0.1.0",
|
"vm 0.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -777,6 +783,7 @@ dependencies = [
|
|||||||
"jsonrpc-tcp-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
|
"jsonrpc-tcp-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
|
||||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -810,6 +817,7 @@ dependencies = [
|
|||||||
"target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"triehash 0.1.0",
|
||||||
"vergen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"vergen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -926,6 +934,7 @@ dependencies = [
|
|||||||
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"triehash 0.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -945,6 +954,7 @@ dependencies = [
|
|||||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-wasm 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-wasm 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.2.0",
|
"rlp 0.2.0",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"vm 0.1.0",
|
"vm 0.1.0",
|
||||||
@ -1661,6 +1671,7 @@ dependencies = [
|
|||||||
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"native-contracts 0.1.0",
|
"native-contracts 0.1.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1902,6 +1913,7 @@ dependencies = [
|
|||||||
"parity-rpc-client 1.4.0",
|
"parity-rpc-client 1.4.0",
|
||||||
"parity-updater 1.8.0",
|
"parity-updater 1.8.0",
|
||||||
"parity-whisper 0.1.0",
|
"parity-whisper 0.1.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"path 0.1.0",
|
"path 0.1.0",
|
||||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -1945,6 +1957,7 @@ dependencies = [
|
|||||||
"parity-hash-fetch 1.8.0",
|
"parity-hash-fetch 1.8.0",
|
||||||
"parity-reactor 0.1.0",
|
"parity-reactor 0.1.0",
|
||||||
"parity-ui 1.8.0",
|
"parity-ui 1.8.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -1985,6 +1998,7 @@ dependencies = [
|
|||||||
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"native-contracts 0.1.0",
|
"native-contracts 0.1.0",
|
||||||
"parity-reactor 0.1.0",
|
"parity-reactor 0.1.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -2030,6 +2044,7 @@ dependencies = [
|
|||||||
name = "parity-rpc"
|
name = "parity-rpc"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethash 1.8.0",
|
"ethash 1.8.0",
|
||||||
@ -2064,6 +2079,7 @@ dependencies = [
|
|||||||
"order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-reactor 0.1.0",
|
"parity-reactor 0.1.0",
|
||||||
"parity-updater 1.8.0",
|
"parity-updater 1.8.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.2.0",
|
"rlp 0.2.0",
|
||||||
@ -2092,6 +2108,7 @@ dependencies = [
|
|||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-rpc 1.8.0",
|
"parity-rpc 1.8.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2135,7 +2152,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-ui-precompiled"
|
name = "parity-ui-precompiled"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
source = "git+https://github.com/paritytech/js-precompiled.git#d809723e58bcb36c0f8d2eca5ca94abbb3690544"
|
source = "git+https://github.com/paritytech/js-precompiled.git#f34bdb63272fd59edf2062dda44113831964d800"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -2156,6 +2173,7 @@ dependencies = [
|
|||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-hash-fetch 1.8.0",
|
"parity-hash-fetch 1.8.0",
|
||||||
"parity-reactor 0.1.0",
|
"parity-reactor 0.1.0",
|
||||||
|
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"path 0.1.0",
|
"path 0.1.0",
|
||||||
"target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -2651,6 +2669,10 @@ dependencies = [
|
|||||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "semantic_version"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semver"
|
name = "semver"
|
||||||
version = "0.1.20"
|
version = "0.1.20"
|
||||||
@ -3107,6 +3129,15 @@ dependencies = [
|
|||||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "triehash"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
|
"hash 0.1.0",
|
||||||
|
"rlp 0.2.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typeable"
|
name = "typeable"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
|
@ -17,6 +17,7 @@ number_prefix = "0.2"
|
|||||||
rpassword = "0.2.1"
|
rpassword = "0.2.1"
|
||||||
semver = "0.6"
|
semver = "0.6"
|
||||||
ansi_term = "0.9"
|
ansi_term = "0.9"
|
||||||
|
parking_lot = "0.4"
|
||||||
regex = "0.2"
|
regex = "0.2"
|
||||||
isatty = "0.1"
|
isatty = "0.1"
|
||||||
toml = "0.4"
|
toml = "0.4"
|
||||||
|
@ -13,6 +13,7 @@ futures = "0.1"
|
|||||||
linked-hash-map = "0.3"
|
linked-hash-map = "0.3"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
parity-dapps-glue = "1.7"
|
parity-dapps-glue = "1.7"
|
||||||
|
parking_lot = "0.4"
|
||||||
mime = "0.2"
|
mime = "0.2"
|
||||||
mime_guess = "1.6.1"
|
mime_guess = "1.6.1"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
|
@ -32,7 +32,7 @@ use hyper;
|
|||||||
use hyper::status::StatusCode;
|
use hyper::status::StatusCode;
|
||||||
|
|
||||||
use {Embeddable, SyncStatus, random_filename};
|
use {Embeddable, SyncStatus, random_filename};
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use page::LocalPageEndpoint;
|
use page::LocalPageEndpoint;
|
||||||
use handlers::{ContentHandler, ContentFetcherHandler};
|
use handlers::{ContentHandler, ContentFetcherHandler};
|
||||||
use endpoint::{Endpoint, EndpointPath, Handler};
|
use endpoint::{Endpoint, EndpointPath, Handler};
|
||||||
|
@ -23,7 +23,7 @@ use std::time::{Instant, Duration};
|
|||||||
use fetch::{self, Fetch};
|
use fetch::{self, Fetch};
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
use parity_reactor::Remote;
|
use parity_reactor::Remote;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use hyper::{server, Decoder, Encoder, Next, Method, Control};
|
use hyper::{server, Decoder, Encoder, Next, Method, Control};
|
||||||
use hyper::net::HttpStream;
|
use hyper::net::HttpStream;
|
||||||
|
@ -24,6 +24,7 @@ extern crate futures;
|
|||||||
extern crate itertools;
|
extern crate itertools;
|
||||||
extern crate linked_hash_map;
|
extern crate linked_hash_map;
|
||||||
extern crate mime_guess;
|
extern crate mime_guess;
|
||||||
|
extern crate parking_lot;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rustc_hex;
|
extern crate rustc_hex;
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
@ -74,7 +75,7 @@ use std::collections::HashMap;
|
|||||||
use std::mem;
|
use std::mem;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
|
||||||
use jsonrpc_http_server::{self as http, hyper, Origin};
|
use jsonrpc_http_server::{self as http, hyper, Origin};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
use std::{io, thread, time};
|
use std::{io, thread, time};
|
||||||
use std::sync::{atomic, mpsc, Arc};
|
use std::sync::{atomic, mpsc, Arc};
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use futures::{self, Future};
|
use futures::{self, Future};
|
||||||
use fetch::{self, Fetch};
|
use fetch::{self, Fetch};
|
||||||
|
@ -21,7 +21,8 @@ use rustc_hex::FromHex;
|
|||||||
|
|
||||||
use hash_fetch::urlhint::ContractClient;
|
use hash_fetch::urlhint::ContractClient;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Bytes, Address, Mutex, ToPretty};
|
use util::{Bytes, Address, ToPretty};
|
||||||
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
|
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
|
||||||
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
|
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
|
||||||
|
@ -11,6 +11,7 @@ build = "build.rs"
|
|||||||
"ethcore-ipc-codegen" = { path = "../ipc/codegen" }
|
"ethcore-ipc-codegen" = { path = "../ipc/codegen" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
ansi_term = "0.9"
|
||||||
bit-set = "0.4"
|
bit-set = "0.4"
|
||||||
bloomchain = "0.1"
|
bloomchain = "0.1"
|
||||||
bn = { git = "https://github.com/paritytech/bn" }
|
bn = { git = "https://github.com/paritytech/bn" }
|
||||||
@ -46,6 +47,7 @@ lru-cache = "0.1.0"
|
|||||||
native-contracts = { path = "native_contracts" }
|
native-contracts = { path = "native_contracts" }
|
||||||
num = "0.1"
|
num = "0.1"
|
||||||
num_cpus = "1.2"
|
num_cpus = "1.2"
|
||||||
|
parking_lot = "0.4"
|
||||||
price-info = { path = "../price-info" }
|
price-info = { path = "../price-info" }
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rlp = { path = "../util/rlp" }
|
rlp = { path = "../util/rlp" }
|
||||||
@ -62,6 +64,8 @@ bloomable = { path = "../util/bloomable" }
|
|||||||
vm = { path = "vm" }
|
vm = { path = "vm" }
|
||||||
wasm = { path = "wasm" }
|
wasm = { path = "wasm" }
|
||||||
hash = { path = "../util/hash" }
|
hash = { path = "../util/hash" }
|
||||||
|
triehash = { path = "../util/triehash" }
|
||||||
|
semantic_version = { path = "../util/semantic_version" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
native-contracts = { path = "native_contracts", features = ["test_contracts"] }
|
native-contracts = { path = "native_contracts", features = ["test_contracts"] }
|
||||||
|
@ -17,6 +17,7 @@ log = "0.3"
|
|||||||
rlp = { path = "../../util/rlp" }
|
rlp = { path = "../../util/rlp" }
|
||||||
vm = { path = "../vm" }
|
vm = { path = "../vm" }
|
||||||
parity-wasm = "0.12"
|
parity-wasm = "0.12"
|
||||||
|
parking_lot = "0.4"
|
||||||
ethcore-logger = { path = "../../logger" }
|
ethcore-logger = { path = "../../logger" }
|
||||||
wasm-utils = { git = "https://github.com/paritytech/wasm-utils" }
|
wasm-utils = { git = "https://github.com/paritytech/wasm-utils" }
|
||||||
hash = { path = "../../util/hash" }
|
hash = { path = "../../util/hash" }
|
||||||
|
@ -18,7 +18,7 @@ use std::sync::Arc;
|
|||||||
use hash::KECCAK_EMPTY;
|
use hash::KECCAK_EMPTY;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::cache::MemoryLruCache;
|
use util::cache::MemoryLruCache;
|
||||||
use bit_set::BitSet;
|
use bit_set::BitSet;
|
||||||
use super::super::instructions;
|
use super::super::instructions;
|
||||||
|
@ -24,6 +24,7 @@ extern crate ethcore_bigint as bigint;
|
|||||||
extern crate ethjson;
|
extern crate ethjson;
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
extern crate parity_wasm;
|
extern crate parity_wasm;
|
||||||
|
extern crate parking_lot;
|
||||||
extern crate wasm_utils;
|
extern crate wasm_utils;
|
||||||
extern crate ethcore_logger;
|
extern crate ethcore_logger;
|
||||||
extern crate heapsize;
|
extern crate heapsize;
|
||||||
|
@ -32,8 +32,10 @@ itertools = "0.5"
|
|||||||
bincode = "0.8.0"
|
bincode = "0.8.0"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
|
parking_lot = "0.4"
|
||||||
stats = { path = "../../util/stats" }
|
stats = { path = "../../util/stats" }
|
||||||
hash = { path = "../../util/hash" }
|
hash = { path = "../../util/hash" }
|
||||||
|
triehash = { path = "../../util/triehash" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -132,7 +132,7 @@ pub fn compute_root<I>(cht_num: u64, iterable: I) -> Option<H256>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if v.len() == SIZE as usize {
|
if v.len() == SIZE as usize {
|
||||||
Some(::util::triehash::trie_root(v))
|
Some(::triehash::trie_root(v))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -39,11 +39,10 @@ use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
|
|||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::RwLock;
|
|
||||||
use util::kvdb::{DBTransaction, KeyValueDB};
|
use util::kvdb::{DBTransaction, KeyValueDB};
|
||||||
|
|
||||||
use cache::Cache;
|
use cache::Cache;
|
||||||
use util::Mutex;
|
use parking_lot::{Mutex, RwLock};
|
||||||
|
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
|
||||||
@ -557,7 +556,7 @@ mod tests {
|
|||||||
use cache::Cache;
|
use cache::Cache;
|
||||||
|
|
||||||
use time::Duration;
|
use time::Duration;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
fn make_db() -> Arc<::util::KeyValueDB> {
|
fn make_db() -> Arc<::util::KeyValueDB> {
|
||||||
Arc::new(::util::kvdb::in_memory(0))
|
Arc::new(::util::kvdb::in_memory(0))
|
||||||
|
@ -30,10 +30,10 @@ use ethcore::spec::Spec;
|
|||||||
use ethcore::service::ClientIoMessage;
|
use ethcore::service::ClientIoMessage;
|
||||||
use ethcore::encoded;
|
use ethcore::encoded;
|
||||||
use io::IoChannel;
|
use io::IoChannel;
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
|
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Mutex, RwLock};
|
|
||||||
use util::kvdb::{KeyValueDB, CompactionProfile};
|
use util::kvdb::{KeyValueDB, CompactionProfile};
|
||||||
|
|
||||||
use self::header_chain::{AncestryIter, HeaderChain};
|
use self::header_chain::{AncestryIter, HeaderChain};
|
||||||
|
@ -28,7 +28,7 @@ use io::{IoContext, IoError, IoHandler, IoService};
|
|||||||
use util::kvdb::{Database, DatabaseConfig};
|
use util::kvdb::{Database, DatabaseConfig};
|
||||||
|
|
||||||
use cache::Cache;
|
use cache::Cache;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use super::{Client, Config as ClientConfig};
|
use super::{Client, Config as ClientConfig};
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ mod tests {
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use cache::Cache;
|
use cache::Cache;
|
||||||
use time::Duration;
|
use time::Duration;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn it_works() {
|
fn it_works() {
|
||||||
|
@ -78,6 +78,7 @@ extern crate futures;
|
|||||||
extern crate itertools;
|
extern crate itertools;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
|
extern crate parking_lot;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rlp_derive;
|
extern crate rlp_derive;
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
@ -86,6 +87,7 @@ extern crate stats;
|
|||||||
extern crate time;
|
extern crate time;
|
||||||
extern crate vm;
|
extern crate vm;
|
||||||
extern crate hash;
|
extern crate hash;
|
||||||
|
extern crate triehash;
|
||||||
|
|
||||||
#[cfg(feature = "ipc")]
|
#[cfg(feature = "ipc")]
|
||||||
extern crate ethcore_ipc as ipc;
|
extern crate ethcore_ipc as ipc;
|
||||||
|
@ -32,7 +32,7 @@ use request::{CompleteRequest, Kind};
|
|||||||
|
|
||||||
use bincode;
|
use bincode;
|
||||||
use time;
|
use time;
|
||||||
use util::{RwLock, Mutex};
|
use parking_lot::{RwLock, Mutex};
|
||||||
|
|
||||||
/// Number of time periods samples should be kept for.
|
/// Number of time periods samples should be kept for.
|
||||||
pub const MOVING_SAMPLE_SIZE: usize = 256;
|
pub const MOVING_SAMPLE_SIZE: usize = 256;
|
||||||
|
@ -25,7 +25,8 @@ use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
|
|||||||
use rlp::{RlpStream, UntrustedRlp};
|
use rlp::{RlpStream, UntrustedRlp};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{DBValue, Mutex, RwLock};
|
use util::DBValue;
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
use time::{Duration, SteadyTime};
|
use time::{Duration, SteadyTime};
|
||||||
|
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
@ -288,7 +289,7 @@ pub type PeerMap = HashMap<PeerId, Mutex<Peer>>;
|
|||||||
mod id_guard {
|
mod id_guard {
|
||||||
|
|
||||||
use network::PeerId;
|
use network::PeerId;
|
||||||
use util::RwLockReadGuard;
|
use parking_lot::RwLockReadGuard;
|
||||||
|
|
||||||
use super::{PeerMap, ReqId};
|
use super::{PeerMap, ReqId};
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ fn id_guard() {
|
|||||||
pending_requests.insert(req_id_1, req.clone(), 0.into(), ::time::SteadyTime::now());
|
pending_requests.insert(req_id_1, req.clone(), 0.into(), ::time::SteadyTime::now());
|
||||||
pending_requests.insert(req_id_2, req, 1.into(), ::time::SteadyTime::now());
|
pending_requests.insert(req_id_2, req, 1.into(), ::time::SteadyTime::now());
|
||||||
|
|
||||||
proto.peers.write().insert(peer_id, ::util::Mutex::new(Peer {
|
proto.peers.write().insert(peer_id, ::parking_lot::Mutex::new(Peer {
|
||||||
local_credits: flow_params.create_credits(),
|
local_credits: flow_params.create_credits(),
|
||||||
status: status(provider.client.chain_info()),
|
status: status(provider.client.chain_info()),
|
||||||
capabilities: capabilities.clone(),
|
capabilities: capabilities.clone(),
|
||||||
|
@ -27,7 +27,7 @@ use ethcore::executed::{Executed, ExecutionError};
|
|||||||
use futures::{Async, Poll, Future};
|
use futures::{Async, Poll, Future};
|
||||||
use futures::sync::oneshot::{self, Sender, Receiver, Canceled};
|
use futures::sync::oneshot::{self, Sender, Receiver, Canceled};
|
||||||
use network::PeerId;
|
use network::PeerId;
|
||||||
use util::{RwLock, Mutex};
|
use parking_lot::{RwLock, Mutex};
|
||||||
|
|
||||||
use net::{
|
use net::{
|
||||||
self, Handler, PeerStatus, Status, Capabilities,
|
self, Handler, PeerStatus, Status, Capabilities,
|
||||||
|
@ -32,7 +32,8 @@ use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, O
|
|||||||
use rlp::{RlpStream, UntrustedRlp};
|
use rlp::{RlpStream, UntrustedRlp};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Address, Bytes, DBValue, HashDB, Mutex};
|
use parking_lot::Mutex;
|
||||||
|
use util::{Address, Bytes, DBValue, HashDB};
|
||||||
use util::memorydb::MemoryDB;
|
use util::memorydb::MemoryDB;
|
||||||
use util::trie::{Trie, TrieDB, TrieError};
|
use util::trie::{Trie, TrieDB, TrieError};
|
||||||
|
|
||||||
@ -710,7 +711,7 @@ impl Body {
|
|||||||
pub fn check_response(&self, cache: &Mutex<::cache::Cache>, body: &encoded::Body) -> Result<encoded::Block, Error> {
|
pub fn check_response(&self, cache: &Mutex<::cache::Cache>, body: &encoded::Body) -> Result<encoded::Block, Error> {
|
||||||
// check the integrity of the the body against the header
|
// check the integrity of the the body against the header
|
||||||
let header = self.0.as_ref()?;
|
let header = self.0.as_ref()?;
|
||||||
let tx_root = ::util::triehash::ordered_trie_root(body.rlp().at(0).iter().map(|r| r.as_raw().to_vec()));
|
let tx_root = ::triehash::ordered_trie_root(body.rlp().at(0).iter().map(|r| r.as_raw().to_vec()));
|
||||||
if tx_root != header.transactions_root() {
|
if tx_root != header.transactions_root() {
|
||||||
return Err(Error::WrongTrieRoot(header.transactions_root(), tx_root));
|
return Err(Error::WrongTrieRoot(header.transactions_root(), tx_root));
|
||||||
}
|
}
|
||||||
@ -740,7 +741,7 @@ impl BlockReceipts {
|
|||||||
/// Check a response with receipts against the stored header.
|
/// Check a response with receipts against the stored header.
|
||||||
pub fn check_response(&self, cache: &Mutex<::cache::Cache>, receipts: &[Receipt]) -> Result<Vec<Receipt>, Error> {
|
pub fn check_response(&self, cache: &Mutex<::cache::Cache>, receipts: &[Receipt]) -> Result<Vec<Receipt>, Error> {
|
||||||
let receipts_root = self.0.as_ref()?.receipts_root();
|
let receipts_root = self.0.as_ref()?.receipts_root();
|
||||||
let found_root = ::util::triehash::ordered_trie_root(receipts.iter().map(|r| ::rlp::encode(r).into_vec()));
|
let found_root = ::triehash::ordered_trie_root(receipts.iter().map(|r| ::rlp::encode(r).into_vec()));
|
||||||
|
|
||||||
match receipts_root == found_root {
|
match receipts_root == found_root {
|
||||||
true => {
|
true => {
|
||||||
@ -853,7 +854,8 @@ impl TransactionProof {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{MemoryDB, Address, Mutex};
|
use util::{MemoryDB, Address};
|
||||||
|
use parking_lot::Mutex;
|
||||||
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
||||||
use util::trie::recorder::Recorder;
|
use util::trie::recorder::Recorder;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
@ -937,7 +939,7 @@ mod tests {
|
|||||||
}).collect::<Vec<_>>();
|
}).collect::<Vec<_>>();
|
||||||
|
|
||||||
let mut header = Header::new();
|
let mut header = Header::new();
|
||||||
let receipts_root = ::util::triehash::ordered_trie_root(
|
let receipts_root = ::triehash::ordered_trie_root(
|
||||||
receipts.iter().map(|x| ::rlp::encode(x).into_vec())
|
receipts.iter().map(|x| ::rlp::encode(x).into_vec())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ use futures::Future;
|
|||||||
use network::{PeerId, NodeId};
|
use network::{PeerId, NodeId};
|
||||||
use net::*;
|
use net::*;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use time::Duration;
|
use time::Duration;
|
||||||
use ::request::{self as basic_request, Response};
|
use ::request::{self as basic_request, Response};
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ use ethcore::transaction::PendingTransaction;
|
|||||||
use ethcore::ids::BlockId;
|
use ethcore::ids::BlockId;
|
||||||
use ethcore::encoded;
|
use ethcore::encoded;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
|
||||||
use cht::{self, BlockInfo};
|
use cht::{self, BlockInfo};
|
||||||
use client::{LightChainClient, AsLightClient};
|
use client::{LightChainClient, AsLightClient};
|
||||||
|
@ -15,3 +15,4 @@ ethcore-network = { path = "../../util/network" }
|
|||||||
native-contracts = { path = "../native_contracts" }
|
native-contracts = { path = "../native_contracts" }
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
|
parking_lot = "0.4"
|
||||||
|
@ -22,6 +22,7 @@ extern crate ethcore_bigint as bigint;
|
|||||||
extern crate ethcore_network as network;
|
extern crate ethcore_network as network;
|
||||||
extern crate native_contracts;
|
extern crate native_contracts;
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
|
extern crate parking_lot;
|
||||||
#[cfg(test)] extern crate ethcore_io as io;
|
#[cfg(test)] extern crate ethcore_io as io;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
|
|
||||||
@ -31,7 +32,8 @@ use native_contracts::PeerSet as Contract;
|
|||||||
use network::{NodeId, ConnectionFilter, ConnectionDirection};
|
use network::{NodeId, ConnectionFilter, ConnectionDirection};
|
||||||
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
|
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Mutex, Address, Bytes};
|
use util::{Address, Bytes};
|
||||||
|
use parking_lot::Mutex;
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
|
|
||||||
const MAX_CACHE_SIZE: usize = 4096;
|
const MAX_CACHE_SIZE: usize = 4096;
|
||||||
|
@ -23,7 +23,7 @@ use self::stores::{AddressBook, DappsSettingsStore, NewDappsPolicy};
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::time::{Instant, Duration};
|
use std::time::{Instant, Duration};
|
||||||
use util::{RwLock};
|
use parking_lot::RwLock;
|
||||||
use ethstore::{
|
use ethstore::{
|
||||||
SimpleSecretStore, SecretStore, Error as SSError, EthStore, EthMultiStore,
|
SimpleSecretStore, SecretStore, Error as SSError, EthStore, EthMultiStore,
|
||||||
random_string, SecretVaultRef, StoreAccountRef, OpaqueSecret,
|
random_string, SecretVaultRef, StoreAccountRef, OpaqueSecret,
|
||||||
|
@ -20,11 +20,12 @@ use std::cmp;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use hash::{keccak, KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
use hash::{keccak, KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
||||||
|
use triehash::ordered_trie_root;
|
||||||
|
|
||||||
use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError};
|
use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Bytes, Address, ordered_trie_root};
|
use util::{Bytes, Address};
|
||||||
use util::error::{Mismatch, OutOfBounds};
|
use util::error::{Mismatch, OutOfBounds};
|
||||||
|
|
||||||
use basic_types::{LogBloom, Seal};
|
use basic_types::{LogBloom, Seal};
|
||||||
|
@ -24,6 +24,7 @@ use bloomchain as bc;
|
|||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H256, H2048};
|
use bigint::hash::{H256, H2048};
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use header::*;
|
use header::*;
|
||||||
@ -43,6 +44,7 @@ use db::{self, Writable, Readable, CacheUpdatePolicy};
|
|||||||
use cache_manager::CacheManager;
|
use cache_manager::CacheManager;
|
||||||
use encoded;
|
use encoded;
|
||||||
use engines::epoch::{Transition as EpochTransition, PendingTransition as PendingEpochTransition};
|
use engines::epoch::{Transition as EpochTransition, PendingTransition as PendingEpochTransition};
|
||||||
|
use ansi_term::Colour;
|
||||||
|
|
||||||
const LOG_BLOOMS_LEVELS: usize = 3;
|
const LOG_BLOOMS_LEVELS: usize = 3;
|
||||||
const LOG_BLOOMS_ELEMENTS_PER_INDEX: usize = 16;
|
const LOG_BLOOMS_ELEMENTS_PER_INDEX: usize = 16;
|
||||||
|
@ -269,6 +269,34 @@ impl Impl for Ripemd160 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// calculate modexp: exponentiation by squaring. the `num` crate has pow, but not modular.
|
||||||
|
fn modexp(mut base: BigUint, mut exp: BigUint, modulus: BigUint) -> BigUint {
|
||||||
|
use num::Integer;
|
||||||
|
|
||||||
|
match (base.is_zero(), exp.is_zero()) {
|
||||||
|
(_, true) => return BigUint::one(), // n^0 % m
|
||||||
|
(true, false) => return BigUint::zero(), // 0^n % m, n>0
|
||||||
|
(false, false) if modulus <= BigUint::one() => return BigUint::zero(), // a^b % 1 = 0.
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut result = BigUint::one();
|
||||||
|
base = base % &modulus;
|
||||||
|
|
||||||
|
// fast path for base divisible by modulus.
|
||||||
|
if base.is_zero() { return BigUint::zero() }
|
||||||
|
while !exp.is_zero() {
|
||||||
|
if exp.is_odd() {
|
||||||
|
result = (result * &base) % &modulus;
|
||||||
|
}
|
||||||
|
|
||||||
|
exp = exp >> 1;
|
||||||
|
base = (base.clone() * base) % &modulus;
|
||||||
|
}
|
||||||
|
|
||||||
|
result
|
||||||
|
}
|
||||||
|
|
||||||
impl Impl for ModexpImpl {
|
impl Impl for ModexpImpl {
|
||||||
fn execute(&self, input: &[u8], output: &mut BytesRef) -> Result<(), Error> {
|
fn execute(&self, input: &[u8], output: &mut BytesRef) -> Result<(), Error> {
|
||||||
let mut reader = input.chain(io::repeat(0));
|
let mut reader = input.chain(io::repeat(0));
|
||||||
@ -297,34 +325,6 @@ impl Impl for ModexpImpl {
|
|||||||
let exp = read_num(exp_len);
|
let exp = read_num(exp_len);
|
||||||
let modulus = read_num(mod_len);
|
let modulus = read_num(mod_len);
|
||||||
|
|
||||||
// calculate modexp: exponentiation by squaring. the `num` crate has pow, but not modular.
|
|
||||||
fn modexp(mut base: BigUint, mut exp: BigUint, modulus: BigUint) -> BigUint {
|
|
||||||
use num::Integer;
|
|
||||||
|
|
||||||
match (base.is_zero(), exp.is_zero()) {
|
|
||||||
(_, true) => return BigUint::one(), // n^0 % m
|
|
||||||
(true, false) => return BigUint::zero(), // 0^n % m, n>0
|
|
||||||
(false, false) if modulus <= BigUint::one() => return BigUint::zero(), // a^b % 1 = 0.
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut result = BigUint::one();
|
|
||||||
base = base % &modulus;
|
|
||||||
|
|
||||||
// fast path for base divisible by modulus.
|
|
||||||
if base.is_zero() { return result }
|
|
||||||
while !exp.is_zero() {
|
|
||||||
if exp.is_odd() {
|
|
||||||
result = (result * &base) % &modulus;
|
|
||||||
}
|
|
||||||
|
|
||||||
exp = exp >> 1;
|
|
||||||
base = (base.clone() * base) % &modulus;
|
|
||||||
}
|
|
||||||
|
|
||||||
result
|
|
||||||
}
|
|
||||||
|
|
||||||
// write output to given memory, left padded and same length as the modulus.
|
// write output to given memory, left padded and same length as the modulus.
|
||||||
let bytes = modexp(base, exp, modulus).to_bytes_be();
|
let bytes = modexp(base, exp, modulus).to_bytes_be();
|
||||||
|
|
||||||
@ -506,11 +506,45 @@ impl Impl for Bn128PairingImpl {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{Builtin, Linear, ethereum_builtin, Pricer, Modexp};
|
use super::{Builtin, Linear, ethereum_builtin, Pricer, Modexp, modexp as me};
|
||||||
use ethjson;
|
use ethjson;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::BytesRef;
|
use util::BytesRef;
|
||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
|
use num::{BigUint, Zero, One};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn modexp_func() {
|
||||||
|
// n^0 % m == 1
|
||||||
|
let mut base = BigUint::parse_bytes(b"12345", 10).unwrap();
|
||||||
|
let mut exp = BigUint::zero();
|
||||||
|
let mut modulus = BigUint::parse_bytes(b"789", 10).unwrap();
|
||||||
|
assert_eq!(me(base, exp, modulus), BigUint::one());
|
||||||
|
|
||||||
|
// 0^n % m == 0
|
||||||
|
base = BigUint::zero();
|
||||||
|
exp = BigUint::parse_bytes(b"12345", 10).unwrap();
|
||||||
|
modulus = BigUint::parse_bytes(b"789", 10).unwrap();
|
||||||
|
assert_eq!(me(base, exp, modulus), BigUint::zero());
|
||||||
|
|
||||||
|
// n^m % 1 == 0
|
||||||
|
base = BigUint::parse_bytes(b"12345", 10).unwrap();
|
||||||
|
exp = BigUint::parse_bytes(b"789", 10).unwrap();
|
||||||
|
modulus = BigUint::one();
|
||||||
|
assert_eq!(me(base, exp, modulus), BigUint::zero());
|
||||||
|
|
||||||
|
// if n % d == 0, then n^m % d == 0
|
||||||
|
base = BigUint::parse_bytes(b"12345", 10).unwrap();
|
||||||
|
exp = BigUint::parse_bytes(b"789", 10).unwrap();
|
||||||
|
modulus = BigUint::parse_bytes(b"15", 10).unwrap();
|
||||||
|
assert_eq!(me(base, exp, modulus), BigUint::zero());
|
||||||
|
|
||||||
|
// others
|
||||||
|
base = BigUint::parse_bytes(b"12345", 10).unwrap();
|
||||||
|
exp = BigUint::parse_bytes(b"789", 10).unwrap();
|
||||||
|
modulus = BigUint::parse_bytes(b"97", 10).unwrap();
|
||||||
|
assert_eq!(me(base, exp, modulus), BigUint::parse_bytes(b"55", 10).unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn identity() {
|
fn identity() {
|
||||||
|
@ -23,7 +23,7 @@ use engines::{Engine, EpochVerifier};
|
|||||||
use header::Header;
|
use header::Header;
|
||||||
|
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
|
||||||
// do "heavy" verification on ~1/50 blocks, randomly sampled.
|
// do "heavy" verification on ~1/50 blocks, randomly sampled.
|
||||||
const HEAVY_VERIFY_RATE: f32 = 0.02;
|
const HEAVY_VERIFY_RATE: f32 = 0.02;
|
||||||
|
@ -24,7 +24,8 @@ use itertools::Itertools;
|
|||||||
|
|
||||||
// util
|
// util
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::{Bytes, PerfTimer, Mutex, RwLock, MutexGuard};
|
use timer::PerfTimer;
|
||||||
|
use util::Bytes;
|
||||||
use util::{journaldb, DBValue, TrieFactory, Trie};
|
use util::{journaldb, DBValue, TrieFactory, Trie};
|
||||||
use util::Address;
|
use util::Address;
|
||||||
use util::trie::TrieSpec;
|
use util::trie::TrieSpec;
|
||||||
@ -57,6 +58,7 @@ use io::*;
|
|||||||
use log_entry::LocalizedLogEntry;
|
use log_entry::LocalizedLogEntry;
|
||||||
use miner::{Miner, MinerService, TransactionImportResult};
|
use miner::{Miner, MinerService, TransactionImportResult};
|
||||||
use native_contracts::Registry;
|
use native_contracts::Registry;
|
||||||
|
use parking_lot::{Mutex, RwLock, MutexGuard};
|
||||||
use rand::OsRng;
|
use rand::OsRng;
|
||||||
use receipt::{Receipt, LocalizedReceipt};
|
use receipt::{Receipt, LocalizedReceipt};
|
||||||
use rlp::UntrustedRlp;
|
use rlp::UntrustedRlp;
|
||||||
|
@ -25,6 +25,7 @@ use rustc_hex::FromHex;
|
|||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H256, H2048};
|
use bigint::hash::{H256, H2048};
|
||||||
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use ethkey::{Generator, Random};
|
use ethkey::{Generator, Random};
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use util::{DBTransaction, KeyValueDB, RwLock};
|
use parking_lot::RwLock;
|
||||||
|
use util::{DBTransaction, KeyValueDB};
|
||||||
|
|
||||||
use rlp;
|
use rlp;
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ use itertools::{self, Itertools};
|
|||||||
use rlp::{UntrustedRlp, encode};
|
use rlp::{UntrustedRlp, encode};
|
||||||
use bigint::prelude::{U256, U128};
|
use bigint::prelude::{U256, U128};
|
||||||
use bigint::hash::{H256, H520};
|
use bigint::hash::{H256, H520};
|
||||||
|
use semantic_version::SemanticVersion;
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
mod finality;
|
mod finality;
|
||||||
|
@ -21,6 +21,7 @@ use std::collections::BTreeMap;
|
|||||||
use std::cmp;
|
use std::cmp;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H256, H520};
|
use bigint::hash::{H256, H520};
|
||||||
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use ethkey::{recover, public_to_address, Signature};
|
use ethkey::{recover, public_to_address, Signature};
|
||||||
use account_provider::AccountProvider;
|
use account_provider::AccountProvider;
|
||||||
@ -33,6 +34,7 @@ use evm::Schedule;
|
|||||||
use ethjson;
|
use ethjson;
|
||||||
use header::{Header, BlockNumber};
|
use header::{Header, BlockNumber};
|
||||||
use client::Client;
|
use client::Client;
|
||||||
|
use semantic_version::SemanticVersion;
|
||||||
use super::signer::EngineSigner;
|
use super::signer::EngineSigner;
|
||||||
use super::validator_set::{ValidatorSet, SimpleList, new_validator_set};
|
use super::validator_set::{ValidatorSet, SimpleList, new_validator_set};
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ use transaction::{UnverifiedTransaction, SignedTransaction};
|
|||||||
use ethkey::Signature;
|
use ethkey::Signature;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use semantic_version::SemanticVersion;
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
/// Default EIP-210 contrat code.
|
/// Default EIP-210 contrat code.
|
||||||
|
@ -32,6 +32,7 @@ use hash::keccak;
|
|||||||
use std::cmp;
|
use std::cmp;
|
||||||
use bigint::prelude::{U128, U256};
|
use bigint::prelude::{U128, U256};
|
||||||
use bigint::hash::{H256, H520};
|
use bigint::hash::{H256, H520};
|
||||||
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use client::{Client, EngineClient};
|
use client::{Client, EngineClient};
|
||||||
use error::{Error, BlockError};
|
use error::{Error, BlockError};
|
||||||
@ -50,6 +51,7 @@ use super::transition::TransitionHandler;
|
|||||||
use super::vote_collector::VoteCollector;
|
use super::vote_collector::VoteCollector;
|
||||||
use self::message::*;
|
use self::message::*;
|
||||||
use self::params::TendermintParams;
|
use self::params::TendermintParams;
|
||||||
|
use semantic_version::SemanticVersion;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||||
pub enum Step {
|
pub enum Step {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
use std::sync::Weak;
|
use std::sync::Weak;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
|
@ -20,7 +20,8 @@ use std::collections::BTreeMap;
|
|||||||
use std::sync::Weak;
|
use std::sync::Weak;
|
||||||
use engines::{Call, Engine};
|
use engines::{Call, Engine};
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Bytes, Address, RwLock};
|
use parking_lot::RwLock;
|
||||||
|
use util::{Bytes, Address};
|
||||||
use ids::BlockId;
|
use ids::BlockId;
|
||||||
use header::{BlockNumber, Header};
|
use header::{BlockNumber, Header};
|
||||||
use client::{Client, BlockChainClient};
|
use client::{Client, BlockChainClient};
|
||||||
|
@ -23,6 +23,7 @@ use hash::keccak;
|
|||||||
|
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H160, H256};
|
use bigint::hash::{H160, H256};
|
||||||
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use util::cache::MemoryLruCache;
|
use util::cache::MemoryLruCache;
|
||||||
use rlp::{UntrustedRlp, RlpStream};
|
use rlp::{UntrustedRlp, RlpStream};
|
||||||
@ -354,7 +355,7 @@ impl ValidatorSet for ValidatorSafeContract {
|
|||||||
|
|
||||||
// ensure receipts match header.
|
// ensure receipts match header.
|
||||||
// TODO: optimize? these were just decoded.
|
// TODO: optimize? these were just decoded.
|
||||||
let found_root = ::util::triehash::ordered_trie_root(
|
let found_root = ::triehash::ordered_trie_root(
|
||||||
receipts.iter().map(::rlp::encode).map(|x| x.to_vec())
|
receipts.iter().map(::rlp::encode).map(|x| x.to_vec())
|
||||||
);
|
);
|
||||||
if found_root != *old_header.receipts_root() {
|
if found_root != *old_header.receipts_root() {
|
||||||
|
@ -20,6 +20,7 @@ use std::fmt::Debug;
|
|||||||
use std::collections::{BTreeMap, HashSet, HashMap};
|
use std::collections::{BTreeMap, HashSet, HashMap};
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use bigint::hash::{H256, H520};
|
use bigint::hash::{H256, H520};
|
||||||
|
use parking_lot:: RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::{Encodable, RlpStream};
|
use rlp::{Encodable, RlpStream};
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ use evm::Schedule;
|
|||||||
use ethjson;
|
use ethjson;
|
||||||
use rlp::{self, UntrustedRlp};
|
use rlp::{self, UntrustedRlp};
|
||||||
use vm::LastHashes;
|
use vm::LastHashes;
|
||||||
|
use semantic_version::SemanticVersion;
|
||||||
|
|
||||||
/// Parity tries to round block.gas_limit to multiple of this constant
|
/// Parity tries to round block.gas_limit to multiple of this constant
|
||||||
pub const PARITY_GAS_LIMIT_DETERMINANT: U256 = U256([37, 0, 0, 0]);
|
pub const PARITY_GAS_LIMIT_DETERMINANT: U256 = U256([37, 0, 0, 0]);
|
||||||
|
@ -99,11 +99,15 @@ extern crate lru_cache;
|
|||||||
extern crate native_contracts;
|
extern crate native_contracts;
|
||||||
extern crate num_cpus;
|
extern crate num_cpus;
|
||||||
extern crate num;
|
extern crate num;
|
||||||
|
extern crate parking_lot;
|
||||||
extern crate price_info;
|
extern crate price_info;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
extern crate hash;
|
extern crate hash;
|
||||||
extern crate heapsize;
|
extern crate heapsize;
|
||||||
|
extern crate triehash;
|
||||||
|
extern crate ansi_term;
|
||||||
|
extern crate semantic_version;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rlp_derive;
|
extern crate rlp_derive;
|
||||||
@ -151,6 +155,7 @@ pub mod service;
|
|||||||
pub mod snapshot;
|
pub mod snapshot;
|
||||||
pub mod spec;
|
pub mod spec;
|
||||||
pub mod state;
|
pub mod state;
|
||||||
|
pub mod timer;
|
||||||
pub mod trace;
|
pub mod trace;
|
||||||
pub mod transaction;
|
pub mod transaction;
|
||||||
pub mod verification;
|
pub mod verification;
|
||||||
|
@ -19,7 +19,7 @@ use std::sync::Arc;
|
|||||||
use std::time::{Instant, Duration};
|
use std::time::{Instant, Duration};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
/// External miner interface.
|
/// External miner interface.
|
||||||
pub trait ExternalMinerService: Send + Sync {
|
pub trait ExternalMinerService: Send + Sync {
|
||||||
|
@ -20,7 +20,9 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
|
use timer::PerfTimer;
|
||||||
use using_queue::{UsingQueue, GetAction};
|
use using_queue::{UsingQueue, GetAction};
|
||||||
use account_provider::{AccountProvider, SignError as AccountError};
|
use account_provider::{AccountProvider, SignError as AccountError};
|
||||||
use state::State;
|
use state::State;
|
||||||
@ -42,6 +44,7 @@ use miner::service_transaction_checker::ServiceTransactionChecker;
|
|||||||
use price_info::{Client as PriceInfoClient, PriceInfo};
|
use price_info::{Client as PriceInfoClient, PriceInfo};
|
||||||
use price_info::fetch::Client as FetchClient;
|
use price_info::fetch::Client as FetchClient;
|
||||||
use header::{Header, BlockNumber};
|
use header::{Header, BlockNumber};
|
||||||
|
use ansi_term::Colour;
|
||||||
|
|
||||||
/// Different possible definitions for pending transaction set.
|
/// Different possible definitions for pending transaction set.
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
|
@ -21,7 +21,7 @@ use types::ids::BlockId;
|
|||||||
use futures::{future, Future};
|
use futures::{future, Future};
|
||||||
use native_contracts::ServiceTransactionChecker as Contract;
|
use native_contracts::ServiceTransactionChecker as Contract;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker";
|
const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker";
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ use bigint::prelude::U256;
|
|||||||
use bigint::hash::{H64, H256, clean_0x};
|
use bigint::hash::{H64, H256, clean_0x};
|
||||||
use ethereum::ethash::Ethash;
|
use ethereum::ethash::Ethash;
|
||||||
use ethash::SeedHashCompute;
|
use ethash::SeedHashCompute;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use miner::{self, Miner, MinerService};
|
use miner::{self, Miner, MinerService};
|
||||||
use client::Client;
|
use client::Client;
|
||||||
use block::IsBlock;
|
use block::IsBlock;
|
||||||
|
@ -26,6 +26,7 @@ use ethash::SeedHashCompute;
|
|||||||
use hyper::Url;
|
use hyper::Url;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use parking_lot::Mutex;
|
||||||
use util::*;
|
use util::*;
|
||||||
use ethereum::ethash::Ethash;
|
use ethereum::ethash::Ethash;
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ use itertools::Itertools;
|
|||||||
use hash::{keccak};
|
use hash::{keccak};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use triehash::sec_trie_root;
|
||||||
use util::*;
|
use util::*;
|
||||||
use state::Account;
|
use state::Account;
|
||||||
use ethjson;
|
use ethjson;
|
||||||
|
@ -20,6 +20,7 @@ use std::fmt;
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use triehash::sec_trie_root;
|
||||||
use util::*;
|
use util::*;
|
||||||
use pod_account::{self, PodAccount};
|
use pod_account::{self, PodAccount};
|
||||||
use types::state_diff::StateDiff;
|
use types::state_diff::StateDiff;
|
||||||
|
@ -29,6 +29,7 @@ use miner::Miner;
|
|||||||
use snapshot::ManifestData;
|
use snapshot::ManifestData;
|
||||||
use snapshot::service::{Service as SnapshotService, ServiceParams as SnapServiceParams};
|
use snapshot::service::{Service as SnapshotService, ServiceParams as SnapServiceParams};
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
|
use ansi_term::Colour;
|
||||||
|
|
||||||
#[cfg(feature="ipc")]
|
#[cfg(feature="ipc")]
|
||||||
use nanoipc;
|
use nanoipc;
|
||||||
|
@ -24,7 +24,7 @@ use views::BlockView;
|
|||||||
use rlp::{DecoderError, RlpStream, UntrustedRlp};
|
use rlp::{DecoderError, RlpStream, UntrustedRlp};
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::Bytes;
|
use util::Bytes;
|
||||||
use util::triehash::ordered_trie_root;
|
use triehash::ordered_trie_root;
|
||||||
|
|
||||||
const HEADER_FIELDS: usize = 8;
|
const HEADER_FIELDS: usize = 8;
|
||||||
const BLOCK_FIELDS: usize = 2;
|
const BLOCK_FIELDS: usize = 2;
|
||||||
@ -193,7 +193,7 @@ mod tests {
|
|||||||
b.transactions.push(t2.into());
|
b.transactions.push(t2.into());
|
||||||
|
|
||||||
let receipts_root = b.header.receipts_root().clone();
|
let receipts_root = b.header.receipts_root().clone();
|
||||||
b.header.set_transactions_root(::util::triehash::ordered_trie_root(
|
b.header.set_transactions_root(::triehash::ordered_trie_root(
|
||||||
b.transactions.iter().map(::rlp::encode).map(|out| out.into_vec())
|
b.transactions.iter().map(::rlp::encode).map(|out| out.into_vec())
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ impl Rebuilder for PowRebuilder {
|
|||||||
use views::BlockView;
|
use views::BlockView;
|
||||||
use snapshot::verify_old_block;
|
use snapshot::verify_old_block;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::triehash::ordered_trie_root;
|
use triehash::ordered_trie_root;
|
||||||
|
|
||||||
let rlp = UntrustedRlp::new(chunk);
|
let rlp = UntrustedRlp::new(chunk);
|
||||||
let item_count = rlp.item_count()?;
|
let item_count = rlp.item_count()?;
|
||||||
|
@ -33,7 +33,7 @@ use ids::BlockId;
|
|||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Bytes, HashDB, DBValue, snappy};
|
use util::{Bytes, HashDB, DBValue, snappy};
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::journaldb::{self, Algorithm, JournalDB};
|
use util::journaldb::{self, Algorithm, JournalDB};
|
||||||
use util::kvdb::KeyValueDB;
|
use util::kvdb::KeyValueDB;
|
||||||
use util::trie::{TrieDB, TrieDBMut, Trie, TrieMut};
|
use util::trie::{TrieDB, TrieDBMut, Trie, TrieMut};
|
||||||
|
@ -36,7 +36,8 @@ use service::ClientIoMessage;
|
|||||||
use io::IoChannel;
|
use io::IoChannel;
|
||||||
|
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Bytes, Mutex, RwLock, RwLockReadGuard, UtilError};
|
use parking_lot::{Mutex, RwLock, RwLockReadGuard};
|
||||||
|
use util::{Bytes, UtilError};
|
||||||
use util::journaldb::Algorithm;
|
use util::journaldb::Algorithm;
|
||||||
use util::kvdb::{Database, DatabaseConfig};
|
use util::kvdb::{Database, DatabaseConfig};
|
||||||
use util::snappy;
|
use util::snappy;
|
||||||
|
@ -24,7 +24,8 @@ use blockchain::BlockChain;
|
|||||||
use snapshot::{chunk_secondary, Error as SnapshotError, Progress, SnapshotComponents};
|
use snapshot::{chunk_secondary, Error as SnapshotError, Progress, SnapshotComponents};
|
||||||
use snapshot::io::{PackedReader, PackedWriter, SnapshotReader, SnapshotWriter};
|
use snapshot::io::{PackedReader, PackedWriter, SnapshotReader, SnapshotWriter};
|
||||||
|
|
||||||
use util::{Mutex, snappy};
|
use parking_lot::Mutex;
|
||||||
|
use util::snappy;
|
||||||
use util::kvdb::{self, KeyValueDB, DBTransaction};
|
use util::kvdb::{self, KeyValueDB, DBTransaction};
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -29,7 +29,7 @@ use bigint::hash::H256;
|
|||||||
use util::journaldb::{self, Algorithm};
|
use util::journaldb::{self, Algorithm};
|
||||||
use util::kvdb::{Database, DatabaseConfig};
|
use util::kvdb::{Database, DatabaseConfig};
|
||||||
use util::memorydb::MemoryDB;
|
use util::memorydb::MemoryDB;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use devtools::RandomTempPath;
|
use devtools::RandomTempPath;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! Watcher for snapshot-related chain events.
|
//! Watcher for snapshot-related chain events.
|
||||||
|
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use client::{BlockChainClient, Client, ChainNotify};
|
use client::{BlockChainClient, Client, ChainNotify};
|
||||||
use ids::BlockId;
|
use ids::BlockId;
|
||||||
use service::ClientIoMessage;
|
use service::ClientIoMessage;
|
||||||
|
@ -42,6 +42,7 @@ use state::backend::Basic as BasicBackend;
|
|||||||
use trace::{NoopTracer, NoopVMTracer};
|
use trace::{NoopTracer, NoopVMTracer};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H256, H2048};
|
use bigint::hash::{H256, H2048};
|
||||||
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
/// Parameters common to ethereum-like blockchains.
|
/// Parameters common to ethereum-like blockchains.
|
||||||
|
@ -26,7 +26,8 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use state::Account;
|
use state::Account;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Address, MemoryDB, Mutex};
|
use parking_lot::Mutex;
|
||||||
|
use util::{Address, MemoryDB};
|
||||||
use util::hashdb::{AsHashDB, HashDB, DBValue};
|
use util::hashdb::{AsHashDB, HashDB, DBValue};
|
||||||
|
|
||||||
/// State backend. See module docs for more details.
|
/// State backend. See module docs for more details.
|
||||||
|
@ -25,7 +25,8 @@ use util::hashdb::HashDB;
|
|||||||
use state::{self, Account};
|
use state::{self, Account};
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::{Address, DBTransaction, UtilError, Mutex};
|
use parking_lot::Mutex;
|
||||||
|
use util::{Address, DBTransaction, UtilError};
|
||||||
use bloom_journal::{Bloom, BloomJournal};
|
use bloom_journal::{Bloom, BloomJournal};
|
||||||
use db::COL_ACCOUNT_BLOOM;
|
use db::COL_ACCOUNT_BLOOM;
|
||||||
use byteorder::{LittleEndian, ByteOrder};
|
use byteorder::{LittleEndian, ByteOrder};
|
||||||
|
@ -22,7 +22,8 @@ use bloomchain::{Number, Config as BloomConfig};
|
|||||||
use bloomchain::group::{BloomGroupDatabase, BloomGroupChain, GroupPosition, BloomGroup};
|
use bloomchain::group::{BloomGroupDatabase, BloomGroupChain, GroupPosition, BloomGroup};
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::hash::{H256, H264};
|
use bigint::hash::{H256, H264};
|
||||||
use util::{KeyValueDB, DBTransaction, RwLock};
|
use util::{KeyValueDB, DBTransaction};
|
||||||
|
use parking_lot::RwLock;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use trace::{LocalizedTrace, Config, Filter, Database as TraceDatabase, ImportRequest, DatabaseExtras};
|
use trace::{LocalizedTrace, Config, Filter, Database as TraceDatabase, ImportRequest, DatabaseExtras};
|
||||||
use db::{self, Key, Writable, Readable, CacheUpdatePolicy};
|
use db::{self, Key, Writable, Readable, CacheUpdatePolicy};
|
||||||
|
@ -25,6 +25,7 @@ use std::collections::{VecDeque, HashSet, HashMap};
|
|||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use parking_lot::{Condvar, Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
use io::*;
|
use io::*;
|
||||||
use error::*;
|
use error::*;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use triehash::ordered_trie_root;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
@ -272,6 +273,7 @@ mod tests {
|
|||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H256, H2048};
|
use bigint::hash::{H256, H2048};
|
||||||
|
use triehash::ordered_trie_root;
|
||||||
use util::*;
|
use util::*;
|
||||||
use ethkey::{Random, Generator};
|
use ethkey::{Random, Generator};
|
||||||
use header::*;
|
use header::*;
|
||||||
|
@ -14,6 +14,7 @@ mime = "0.2"
|
|||||||
mime_guess = "1.6.1"
|
mime_guess = "1.6.1"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
|
parking_lot = "0.4"
|
||||||
fetch = { path = "../util/fetch" }
|
fetch = { path = "../util/fetch" }
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
ethcore-bigint = { path = "../util/bigint" }
|
ethcore-bigint = { path = "../util/bigint" }
|
||||||
|
@ -191,7 +191,7 @@ fn random_temp_path() -> PathBuf {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
use std::sync::{Arc, mpsc};
|
use std::sync::{Arc, mpsc};
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use futures::future;
|
use futures::future;
|
||||||
use fetch::{self, Fetch};
|
use fetch::{self, Fetch};
|
||||||
use parity_reactor::Remote;
|
use parity_reactor::Remote;
|
||||||
|
@ -30,6 +30,7 @@ extern crate futures;
|
|||||||
extern crate mime_guess;
|
extern crate mime_guess;
|
||||||
extern crate native_contracts;
|
extern crate native_contracts;
|
||||||
extern crate parity_reactor;
|
extern crate parity_reactor;
|
||||||
|
extern crate parking_lot;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rustc_hex;
|
extern crate rustc_hex;
|
||||||
extern crate hash;
|
extern crate hash;
|
||||||
|
@ -216,7 +216,8 @@ pub mod tests {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use super::guess_mime_type;
|
use super::guess_mime_type;
|
||||||
use util::{Bytes, Address, Mutex, ToPretty};
|
use parking_lot::Mutex;
|
||||||
|
use util::{Bytes, Address, ToPretty};
|
||||||
|
|
||||||
pub struct FakeRegistrar {
|
pub struct FakeRegistrar {
|
||||||
pub calls: Arc<Mutex<Vec<(String, String)>>>,
|
pub calls: Arc<Mutex<Vec<(String, String)>>>,
|
||||||
|
2
js/package-lock.json
generated
2
js/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "parity.js",
|
"name": "parity.js",
|
||||||
"version": "1.8.17",
|
"version": "1.8.18",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "parity.js",
|
"name": "parity.js",
|
||||||
"version": "1.8.17",
|
"version": "1.8.18",
|
||||||
"main": "release/index.js",
|
"main": "release/index.js",
|
||||||
"jsnext:main": "src/index.js",
|
"jsnext:main": "src/index.js",
|
||||||
"author": "Parity Team <admin@parity.io>",
|
"author": "Parity Team <admin@parity.io>",
|
||||||
|
@ -157,6 +157,7 @@ pub fn execute(cmd: BlockchainCmd) -> Result<(), String> {
|
|||||||
fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
|
fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
|
||||||
use light::client::{Service as LightClientService, Config as LightClientConfig};
|
use light::client::{Service as LightClientService, Config as LightClientConfig};
|
||||||
use light::cache::Cache as LightDataCache;
|
use light::cache::Cache as LightDataCache;
|
||||||
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
let timer = Instant::now();
|
let timer = Instant::now();
|
||||||
|
|
||||||
@ -190,7 +191,7 @@ fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
|
|||||||
// create dirs used by parity
|
// create dirs used by parity
|
||||||
cmd.dirs.create_dirs(false, false, false)?;
|
cmd.dirs.create_dirs(false, false, false)?;
|
||||||
|
|
||||||
let cache = Arc::new(::util::Mutex::new(
|
let cache = Arc::new(Mutex::new(
|
||||||
LightDataCache::new(Default::default(), ::time::Duration::seconds(0))
|
LightDataCache::new(Default::default(), ::time::Duration::seconds(0))
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ use bigint::prelude::U256;
|
|||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Bytes, version_data, Address};
|
use util::{Bytes, version_data, Address};
|
||||||
use util::journaldb::Algorithm;
|
use util::journaldb::Algorithm;
|
||||||
use util::Colour;
|
use ansi_term::Colour;
|
||||||
use ethsync::{NetworkConfiguration, is_valid_node_url};
|
use ethsync::{NetworkConfiguration, is_valid_node_url};
|
||||||
use ethcore::ethstore::ethkey::{Secret, Public};
|
use ethcore::ethstore::ethkey::{Secret, Public};
|
||||||
use ethcore::client::{VMType};
|
use ethcore::client::{VMType};
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
extern crate ansi_term;
|
extern crate ansi_term;
|
||||||
use self::ansi_term::Colour::{White, Yellow, Green, Cyan, Blue};
|
use self::ansi_term::Colour::{White, Yellow, Green, Cyan, Blue};
|
||||||
use self::ansi_term::Style;
|
use self::ansi_term::{Colour, Style};
|
||||||
|
|
||||||
use std::sync::{Arc};
|
use std::sync::{Arc};
|
||||||
use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering as AtomicOrdering};
|
use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering as AtomicOrdering};
|
||||||
@ -36,7 +36,8 @@ use number_prefix::{binary_prefix, Standalone, Prefixed};
|
|||||||
use parity_rpc::{is_major_importing};
|
use parity_rpc::{is_major_importing};
|
||||||
use parity_rpc::informant::RpcStats;
|
use parity_rpc::informant::RpcStats;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{RwLock, Mutex, Colour, Bytes};
|
use util::Bytes;
|
||||||
|
use parking_lot::{RwLock, Mutex};
|
||||||
|
|
||||||
/// Format byte counts to standard denominations.
|
/// Format byte counts to standard denominations.
|
||||||
pub fn format_bytes(b: usize) -> String {
|
pub fn format_bytes(b: usize) -> String {
|
||||||
|
@ -31,7 +31,7 @@ use futures::{future, Future};
|
|||||||
|
|
||||||
use parity_reactor::Remote;
|
use parity_reactor::Remote;
|
||||||
|
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
|
||||||
// Attepmt to cull once every 10 minutes.
|
// Attepmt to cull once every 10 minutes.
|
||||||
const TOKEN: TimerToken = 1;
|
const TOKEN: TimerToken = 1;
|
||||||
|
@ -34,6 +34,7 @@ extern crate isatty;
|
|||||||
extern crate jsonrpc_core;
|
extern crate jsonrpc_core;
|
||||||
extern crate num_cpus;
|
extern crate num_cpus;
|
||||||
extern crate number_prefix;
|
extern crate number_prefix;
|
||||||
|
extern crate parking_lot;
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
extern crate rpassword;
|
extern crate rpassword;
|
||||||
|
@ -38,7 +38,7 @@ use parity_rpc::dispatch::{FullDispatcher, LightDispatcher};
|
|||||||
use parity_rpc::informant::{ActivityNotifier, ClientNotifier};
|
use parity_rpc::informant::{ActivityNotifier, ClientNotifier};
|
||||||
use parity_rpc::{Metadata, NetworkSettings};
|
use parity_rpc::{Metadata, NetworkSettings};
|
||||||
use updater::Updater;
|
use updater::Updater;
|
||||||
use util::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Eq, Hash)]
|
#[derive(Debug, PartialEq, Clone, Eq, Hash)]
|
||||||
pub enum Api {
|
pub enum Api {
|
||||||
|
@ -37,7 +37,9 @@ use node_health;
|
|||||||
use parity_reactor::EventLoop;
|
use parity_reactor::EventLoop;
|
||||||
use parity_rpc::{NetworkSettings, informant, is_major_importing};
|
use parity_rpc::{NetworkSettings, informant, is_major_importing};
|
||||||
use updater::{UpdatePolicy, Updater};
|
use updater::{UpdatePolicy, Updater};
|
||||||
use util::{Colour, version, Mutex, Condvar};
|
use ansi_term::Colour;
|
||||||
|
use util::version;
|
||||||
|
use parking_lot::{Condvar, Mutex};
|
||||||
use node_filter::NodeFilter;
|
use node_filter::NodeFilter;
|
||||||
|
|
||||||
use params::{
|
use params::{
|
||||||
@ -170,7 +172,7 @@ impl ::local_store::NodeInfo for FullNodeInfo {
|
|||||||
fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> Result<(bool, Option<String>), String> {
|
fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> Result<(bool, Option<String>), String> {
|
||||||
use light::client as light_client;
|
use light::client as light_client;
|
||||||
use ethsync::{LightSyncParams, LightSync, ManageNetwork};
|
use ethsync::{LightSyncParams, LightSync, ManageNetwork};
|
||||||
use util::RwLock;
|
use parking_lot::{Mutex, RwLock};
|
||||||
|
|
||||||
// load spec
|
// load spec
|
||||||
let spec = cmd.spec.spec(&cmd.dirs.cache)?;
|
let spec = cmd.spec.spec(&cmd.dirs.cache)?;
|
||||||
@ -205,7 +207,7 @@ fn execute_light(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) ->
|
|||||||
|
|
||||||
// TODO: configurable cache size.
|
// TODO: configurable cache size.
|
||||||
let cache = LightDataCache::new(Default::default(), ::time::Duration::minutes(GAS_CORPUS_EXPIRATION_MINUTES));
|
let cache = LightDataCache::new(Default::default(), ::time::Duration::minutes(GAS_CORPUS_EXPIRATION_MINUTES));
|
||||||
let cache = Arc::new(::util::Mutex::new(cache));
|
let cache = Arc::new(Mutex::new(cache));
|
||||||
|
|
||||||
// start client and create transaction queue.
|
// start client and create transaction queue.
|
||||||
let mut config = light_client::Config {
|
let mut config = light_client::Config {
|
||||||
|
@ -8,12 +8,14 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
|||||||
[lib]
|
[lib]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
ansi_term = "0.9"
|
||||||
cid = "0.2"
|
cid = "0.2"
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
futures-cpupool = "0.1"
|
futures-cpupool = "0.1"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
multihash ="0.6"
|
multihash ="0.6"
|
||||||
order-stat = "0.1"
|
order-stat = "0.1"
|
||||||
|
parking_lot = "0.4"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rust-crypto = "0.2"
|
rust-crypto = "0.2"
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#![cfg_attr(feature="dev", feature(plugin))]
|
#![cfg_attr(feature="dev", feature(plugin))]
|
||||||
#![cfg_attr(feature="dev", plugin(clippy))]
|
#![cfg_attr(feature="dev", plugin(clippy))]
|
||||||
|
|
||||||
|
extern crate ansi_term;
|
||||||
extern crate cid;
|
extern crate cid;
|
||||||
extern crate crypto as rust_crypto;
|
extern crate crypto as rust_crypto;
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
@ -27,6 +28,7 @@ extern crate futures_cpupool;
|
|||||||
extern crate itertools;
|
extern crate itertools;
|
||||||
extern crate multihash;
|
extern crate multihash;
|
||||||
extern crate order_stat;
|
extern crate order_stat;
|
||||||
|
extern crate parking_lot;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rustc_hex;
|
extern crate rustc_hex;
|
||||||
extern crate semver;
|
extern crate semver;
|
||||||
|
@ -29,7 +29,8 @@ use rlp;
|
|||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H256, H520};
|
use bigint::hash::{H256, H520};
|
||||||
use util::{Address, Bytes, Mutex, RwLock};
|
use util::{Address, Bytes};
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
use stats::Corpus;
|
use stats::Corpus;
|
||||||
|
|
||||||
use ethkey::Signature;
|
use ethkey::Signature;
|
||||||
|
@ -38,7 +38,8 @@ use light::request::Field;
|
|||||||
|
|
||||||
use ethsync::LightSync;
|
use ethsync::LightSync;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::{Address, Mutex};
|
use util::Address;
|
||||||
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use v1::helpers::{CallRequest as CallRequestHelper, errors, dispatch};
|
use v1::helpers::{CallRequest as CallRequestHelper, errors, dispatch};
|
||||||
use v1::types::{BlockNumber, CallRequest, Log};
|
use v1::types::{BlockNumber, CallRequest, Log};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use http::Origin;
|
use http::Origin;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
use transient_hashmap::TransientHashMap;
|
use transient_hashmap::TransientHashMap;
|
||||||
|
|
||||||
use ethstore::random_string;
|
use ethstore::random_string;
|
||||||
|
@ -20,7 +20,8 @@ use std::sync::Arc;
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use jsonrpc_core;
|
use jsonrpc_core;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::{Mutex, RwLock, Address};
|
use util::Address;
|
||||||
|
use parking_lot::{Mutex, RwLock};
|
||||||
use ethcore::account_provider::DappId;
|
use ethcore::account_provider::DappId;
|
||||||
use v1::helpers::{ConfirmationRequest, ConfirmationPayload};
|
use v1::helpers::{ConfirmationRequest, ConfirmationPayload};
|
||||||
use v1::types::{ConfirmationResponse, H160 as RpcH160, Origin, DappId as RpcDappId};
|
use v1::types::{ConfirmationResponse, H160 as RpcH160, Origin, DappId as RpcDappId};
|
||||||
@ -299,7 +300,8 @@ mod test {
|
|||||||
use std::thread;
|
use std::thread;
|
||||||
use std::sync::{mpsc, Arc};
|
use std::sync::{mpsc, Arc};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::{Address, Mutex};
|
use util::Address;
|
||||||
|
use parking_lot::Mutex;
|
||||||
use v1::helpers::{SigningQueue, ConfirmationsQueue, QueueEvent, FilledTransactionRequest, ConfirmationPayload};
|
use v1::helpers::{SigningQueue, ConfirmationsQueue, QueueEvent, FilledTransactionRequest, ConfirmationPayload};
|
||||||
use v1::types::ConfirmationResponse;
|
use v1::types::ConfirmationResponse;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{self, AtomicBool};
|
use std::sync::atomic::{self, AtomicBool};
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use jsonrpc_core::futures::future::{self, Either};
|
use jsonrpc_core::futures::future::{self, Either};
|
||||||
use jsonrpc_core::futures::sync::mpsc;
|
use jsonrpc_core::futures::sync::mpsc;
|
||||||
|
@ -26,7 +26,7 @@ use time::get_time;
|
|||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::{H64, H160, H256};
|
use bigint::hash::{H64, H160, H256};
|
||||||
use util::Address;
|
use util::Address;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use ethash::SeedHashCompute;
|
use ethash::SeedHashCompute;
|
||||||
use ethcore::account_provider::{AccountProvider, DappId};
|
use ethcore::account_provider::{AccountProvider, DappId};
|
||||||
|
@ -24,7 +24,7 @@ use ethcore::miner::MinerService;
|
|||||||
use ethcore::filter::Filter as EthcoreFilter;
|
use ethcore::filter::Filter as EthcoreFilter;
|
||||||
use ethcore::client::{BlockChainClient, BlockId};
|
use ethcore::client::{BlockChainClient, BlockId};
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use futures::{future, Future, BoxFuture};
|
use futures::{future, Future, BoxFuture};
|
||||||
|
|
||||||
|
@ -40,7 +40,8 @@ use light::on_demand::OnDemand;
|
|||||||
use light::client::{LightChainClient, LightChainNotify};
|
use light::client::{LightChainClient, LightChainNotify};
|
||||||
use parity_reactor::Remote;
|
use parity_reactor::Remote;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{RwLock, Mutex, Bytes};
|
use util::Bytes;
|
||||||
|
use parking_lot::{RwLock, Mutex};
|
||||||
|
|
||||||
type Client = Sink<pubsub::Result>;
|
type Client = Sink<pubsub::Result>;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ use ethsync::LightSync;
|
|||||||
use rlp::UntrustedRlp;
|
use rlp::UntrustedRlp;
|
||||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::{RwLock, Mutex};
|
use parking_lot::{RwLock, Mutex};
|
||||||
|
|
||||||
use futures::{future, Future, BoxFuture, IntoFuture};
|
use futures::{future, Future, BoxFuture, IntoFuture};
|
||||||
use futures::sync::oneshot;
|
use futures::sync::oneshot;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
|
||||||
use futures::{self, BoxFuture, Future, Stream, Sink};
|
use futures::{self, BoxFuture, Future, Stream, Sink};
|
||||||
use jsonrpc_core::{self as core, Error, MetaIoHandler};
|
use jsonrpc_core::{self as core, Error, MetaIoHandler};
|
||||||
|
@ -24,7 +24,7 @@ use ethkey;
|
|||||||
use futures::{future, BoxFuture, Future, IntoFuture};
|
use futures::{future, BoxFuture, Future, IntoFuture};
|
||||||
use parity_reactor::Remote;
|
use parity_reactor::Remote;
|
||||||
use rlp::UntrustedRlp;
|
use rlp::UntrustedRlp;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use jsonrpc_core::{futures, Error};
|
use jsonrpc_core::{futures, Error};
|
||||||
use jsonrpc_pubsub::SubscriptionId;
|
use jsonrpc_pubsub::SubscriptionId;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use transient_hashmap::TransientHashMap;
|
use transient_hashmap::TransientHashMap;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use util::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
use ethcore::account_provider::AccountProvider;
|
use ethcore::account_provider::AccountProvider;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ use futures::Future;
|
|||||||
use futures_cpupool as pool;
|
use futures_cpupool as pool;
|
||||||
use jsonrpc_core as rpc;
|
use jsonrpc_core as rpc;
|
||||||
use order_stat;
|
use order_stat;
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
|
||||||
pub use self::pool::CpuPool;
|
pub use self::pool::CpuPool;
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@ use std::collections::{BTreeMap, HashMap};
|
|||||||
use std::collections::hash_map::Entry;
|
use std::collections::hash_map::Entry;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Address, Bytes, RwLock, Mutex};
|
use util::{Address, Bytes};
|
||||||
|
use parking_lot::{RwLock, Mutex};
|
||||||
use ethcore::error::Error;
|
use ethcore::error::Error;
|
||||||
use ethcore::client::MiningBlockChainClient;
|
use ethcore::client::MiningBlockChainClient;
|
||||||
use ethcore::block::ClosedBlock;
|
use ethcore::block::ClosedBlock;
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
|
|
||||||
use ethcore::snapshot::{ManifestData, RestorationStatus, SnapshotService};
|
use ethcore::snapshot::{ManifestData, RestorationStatus, SnapshotService};
|
||||||
|
|
||||||
use util::{Bytes, Mutex};
|
use util::Bytes;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
/// Mocked snapshot service (used for sync info extensions).
|
/// Mocked snapshot service (used for sync info extensions).
|
||||||
pub struct TestSnapshotService {
|
pub struct TestSnapshotService {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::RwLock;
|
use parking_lot::RwLock;
|
||||||
use ethsync::{SyncProvider, EthProtocolInfo, SyncStatus, SyncState, PeerInfo, TransactionStats};
|
use ethsync::{SyncProvider, EthProtocolInfo, SyncStatus, SyncState, PeerInfo, TransactionStats};
|
||||||
|
|
||||||
/// TestSyncProvider config.
|
/// TestSyncProvider config.
|
||||||
|
@ -24,7 +24,8 @@ use rlp;
|
|||||||
|
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::{Address, Mutex};
|
use util::Address;
|
||||||
|
use parking_lot::Mutex;
|
||||||
use ethkey::Secret;
|
use ethkey::Secret;
|
||||||
use ethcore::account_provider::AccountProvider;
|
use ethcore::account_provider::AccountProvider;
|
||||||
use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId};
|
use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use serde::{Serialize, Serializer};
|
use serde::{Serialize, Serializer};
|
||||||
use util::Colour;
|
use ansi_term::Colour;
|
||||||
use util::bytes::ToPretty;
|
use util::bytes::ToPretty;
|
||||||
|
|
||||||
use v1::types::{U256, TransactionRequest, RichRawTransaction, H160, H256, H520, Bytes, TransactionCondition, Origin};
|
use v1::types::{U256, TransactionRequest, RichRawTransaction, H160, H256, H520, Bytes, TransactionCondition, Origin};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user