From dd7a60c7a8e8216f0d797ef0e1dfea229a1fb527 Mon Sep 17 00:00:00 2001 From: Hawstein Date: Wed, 13 Sep 2017 01:23:02 +0800 Subject: [PATCH] rename trie to patricia-trie --- Cargo.lock | 62 +++++++++---------- ethcore/Cargo.toml | 2 +- ethcore/light/Cargo.toml | 2 +- ethcore/light/src/lib.rs | 2 +- ethcore/light/src/types/request/mod.rs | 2 +- ethcore/res/wasm-tests | 2 +- ethcore/src/lib.rs | 2 +- ethcore/vm/Cargo.toml | 2 +- ethcore/vm/src/lib.rs | 2 +- util/Cargo.toml | 2 +- util/benches/trie.rs | 2 +- util/{trie => patricia_trie}/Cargo.toml | 2 +- util/{trie => patricia_trie}/src/fatdb.rs | 0 util/{trie => patricia_trie}/src/fatdbmut.rs | 0 util/{trie => patricia_trie}/src/lib.rs | 0 util/{trie => patricia_trie}/src/lookup.rs | 0 util/{trie => patricia_trie}/src/node.rs | 0 util/{trie => patricia_trie}/src/recorder.rs | 0 util/{trie => patricia_trie}/src/sectriedb.rs | 0 .../src/sectriedbmut.rs | 0 .../src/standardmap.rs | 0 util/{trie => patricia_trie}/src/triedb.rs | 2 +- util/{trie => patricia_trie}/src/triedbmut.rs | 2 +- util/src/lib.rs | 2 +- 24 files changed, 45 insertions(+), 45 deletions(-) rename util/{trie => patricia_trie}/Cargo.toml (95%) rename util/{trie => patricia_trie}/src/fatdb.rs (100%) rename util/{trie => patricia_trie}/src/fatdbmut.rs (100%) rename util/{trie => patricia_trie}/src/lib.rs (100%) rename util/{trie => patricia_trie}/src/lookup.rs (100%) rename util/{trie => patricia_trie}/src/node.rs (100%) rename util/{trie => patricia_trie}/src/recorder.rs (100%) rename util/{trie => patricia_trie}/src/sectriedb.rs (100%) rename util/{trie => patricia_trie}/src/sectriedbmut.rs (100%) rename util/{trie => patricia_trie}/src/standardmap.rs (100%) rename util/{trie => patricia_trie}/src/triedb.rs (99%) rename util/{trie => patricia_trie}/src/triedbmut.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index e3fd78eb9..3c88f0cdb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -576,8 +576,8 @@ dependencies = [ "futures 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "hardware-wallet 1.8.0", "hash 0.1.0", - "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -589,6 +589,7 @@ dependencies = [ "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)", @@ -602,7 +603,6 @@ dependencies = [ "table 0.1.0", "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", "transient-hashmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie 0.1.0", "triehash 0.1.0", "unexpected 0.1.0", "using_queue 0.1.0", @@ -733,9 +733,10 @@ 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)", - "parking_lot 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (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", "serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -743,7 +744,6 @@ dependencies = [ "smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "trie 0.1.0", "triehash 0.1.0", "vm 0.1.0", ] @@ -871,23 +871,23 @@ dependencies = [ "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)", - "parking_lot 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hashdb 0.1.0", "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)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "trie 0.1.0", "triehash 0.1.0", "vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1580,12 +1580,12 @@ dependencies = [ name = "memorydb" version = "0.1.0" dependencies = [ - "bigint 4.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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.0 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.0", ] @@ -2373,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" @@ -3304,25 +3323,6 @@ dependencies = [ "protobuf 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "memorydb 0.1.0", - "nibbleslice 0.1.0", - "nibblevec 0.1.0", - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rlp 0.2.0", - "triehash 0.1.0", -] - [[package]] name = "triehash" version = "0.1.0" @@ -3464,8 +3464,8 @@ dependencies = [ "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", - "trie 0.1.0", ] [[package]] diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 638454aac..9d82efd27 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -26,7 +26,7 @@ ethcore-bloom-journal = { path = "../util/bloom" } ethcore-bytes = { path = "../util/bytes" } hashdb = { path = "../util/hashdb" } memorydb = { path = "../util/memorydb" } -trie = { path = "../util/trie" } +patricia_trie = { path = "../util/patricia_trie" } ethcore-devtools = { path = "../devtools" } ethcore-io = { path = "../util/io" } ethcore-ipc = { path = "../ipc/rpc" } diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index e7cf959ad..477b7077a 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -17,7 +17,7 @@ ethcore-util = { path = "../../util" } ethcore-bigint = { path = "../../util/bigint" } ethcore-bytes = { path = "../../util/bytes" } memorydb = { path = "../../util/memorydb" } -trie = { path = "../../util/trie" } +patricia_trie = { path = "../../util/patricia_trie" } ethcore-network = { path = "../../util/network" } ethcore-io = { path = "../../util/io" } ethcore-ipc = { path = "../../ipc/rpc", optional = true } diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index 4cf0b3e58..09eade4e7 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -78,7 +78,7 @@ extern crate heapsize; extern crate futures; extern crate itertools; extern crate memorydb; -extern crate trie; +extern crate patricia_trie as trie; extern crate rand; extern crate rlp; extern crate parking_lot; diff --git a/ethcore/light/src/types/request/mod.rs b/ethcore/light/src/types/request/mod.rs index c33d8b4cc..d96278c23 100644 --- a/ethcore/light/src/types/request/mod.rs +++ b/ethcore/light/src/types/request/mod.rs @@ -1542,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)] diff --git a/ethcore/res/wasm-tests b/ethcore/res/wasm-tests index 5fd27564f..fcac936bf 160000 --- a/ethcore/res/wasm-tests +++ b/ethcore/res/wasm-tests @@ -1 +1 @@ -Subproject commit 5fd27564f1ab49b25bb419bfc0cc68137e1f12f2 +Subproject commit fcac936bf68cc271a6a6ac088efb458f3a08f38a diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 6edd2261e..689cc67f8 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -109,7 +109,7 @@ extern crate rlp; extern crate hash; extern crate heapsize; extern crate memorydb; -extern crate trie; +extern crate patricia_trie as trie; extern crate triehash; extern crate ansi_term; extern crate semantic_version; diff --git a/ethcore/vm/Cargo.toml b/ethcore/vm/Cargo.toml index 957e6450d..ade675044 100644 --- a/ethcore/vm/Cargo.toml +++ b/ethcore/vm/Cargo.toml @@ -8,7 +8,7 @@ byteorder = "1.0" ethcore-util = { path = "../../util" } ethcore-bytes = { path = "../../util/bytes" } ethcore-bigint = { path = "../../util/bigint" } -trie = { path = "../../util/trie" } +patricia_trie = { path = "../../util/patricia_trie" } log = "0.3" common-types = { path = "../types" } evmjit = { path = "../../evmjit", optional = true } diff --git a/ethcore/vm/src/lib.rs b/ethcore/vm/src/lib.rs index 0bbef3702..56a380597 100644 --- a/ethcore/vm/src/lib.rs +++ b/ethcore/vm/src/lib.rs @@ -23,7 +23,7 @@ extern crate common_types as types; extern crate ethjson; extern crate rlp; extern crate hash; -extern crate trie; +extern crate patricia_trie as trie; mod action_params; mod call_type; diff --git a/util/Cargo.toml b/util/Cargo.toml index cef815099..28d53c6e5 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -31,7 +31,7 @@ ethcore-logger = { path = "../logger" } triehash = { path = "triehash" } error-chain = "0.11.0-rc.2" hashdb = { path = "hashdb" } -trie = { path = "trie" } +patricia_trie = { path = "patricia_trie" } nibbleslice = { path = "nibbleslice" } nibblevec = { path = "nibblevec" } ethcore-bytes = { path = "bytes" } diff --git a/util/benches/trie.rs b/util/benches/trie.rs index 3ec2f9ba0..953c18883 100644 --- a/util/benches/trie.rs +++ b/util/benches/trie.rs @@ -22,7 +22,7 @@ extern crate ethcore_util; extern crate ethcore_bytes; extern crate ethcore_bigint; extern crate memorydb; -extern crate trie; +extern crate patricia_trie as trie; #[macro_use] extern crate log; extern crate hash; diff --git a/util/trie/Cargo.toml b/util/patricia_trie/Cargo.toml similarity index 95% rename from util/trie/Cargo.toml rename to util/patricia_trie/Cargo.toml index f3df821e5..0dcd74e09 100644 --- a/util/trie/Cargo.toml +++ b/util/patricia_trie/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "trie" +name = "patricia_trie" version = "0.1.0" authors = ["Parity Technologies "] diff --git a/util/trie/src/fatdb.rs b/util/patricia_trie/src/fatdb.rs similarity index 100% rename from util/trie/src/fatdb.rs rename to util/patricia_trie/src/fatdb.rs diff --git a/util/trie/src/fatdbmut.rs b/util/patricia_trie/src/fatdbmut.rs similarity index 100% rename from util/trie/src/fatdbmut.rs rename to util/patricia_trie/src/fatdbmut.rs diff --git a/util/trie/src/lib.rs b/util/patricia_trie/src/lib.rs similarity index 100% rename from util/trie/src/lib.rs rename to util/patricia_trie/src/lib.rs diff --git a/util/trie/src/lookup.rs b/util/patricia_trie/src/lookup.rs similarity index 100% rename from util/trie/src/lookup.rs rename to util/patricia_trie/src/lookup.rs diff --git a/util/trie/src/node.rs b/util/patricia_trie/src/node.rs similarity index 100% rename from util/trie/src/node.rs rename to util/patricia_trie/src/node.rs diff --git a/util/trie/src/recorder.rs b/util/patricia_trie/src/recorder.rs similarity index 100% rename from util/trie/src/recorder.rs rename to util/patricia_trie/src/recorder.rs diff --git a/util/trie/src/sectriedb.rs b/util/patricia_trie/src/sectriedb.rs similarity index 100% rename from util/trie/src/sectriedb.rs rename to util/patricia_trie/src/sectriedb.rs diff --git a/util/trie/src/sectriedbmut.rs b/util/patricia_trie/src/sectriedbmut.rs similarity index 100% rename from util/trie/src/sectriedbmut.rs rename to util/patricia_trie/src/sectriedbmut.rs diff --git a/util/trie/src/standardmap.rs b/util/patricia_trie/src/standardmap.rs similarity index 100% rename from util/trie/src/standardmap.rs rename to util/patricia_trie/src/standardmap.rs diff --git a/util/trie/src/triedb.rs b/util/patricia_trie/src/triedb.rs similarity index 99% rename from util/trie/src/triedb.rs rename to util/patricia_trie/src/triedb.rs index 6e46b5a7c..6c1a0da01 100644 --- a/util/trie/src/triedb.rs +++ b/util/patricia_trie/src/triedb.rs @@ -31,7 +31,7 @@ use bytes::{ToPretty, Bytes}; /// /// # Example /// ``` -/// extern crate trie; +/// extern crate patricia_trie as trie; /// extern crate hashdb; /// extern crate memorydb; /// extern crate ethcore_bigint as bigint; diff --git a/util/trie/src/triedbmut.rs b/util/patricia_trie/src/triedbmut.rs similarity index 99% rename from util/trie/src/triedbmut.rs rename to util/patricia_trie/src/triedbmut.rs index 4ec5d78f9..d0e22d2fb 100644 --- a/util/trie/src/triedbmut.rs +++ b/util/patricia_trie/src/triedbmut.rs @@ -261,7 +261,7 @@ impl<'a> Index<&'a StorageHandle> for NodeStorage { /// /// # Example /// ``` -/// extern crate trie; +/// extern crate patricia_trie as trie; /// extern crate hashdb; /// extern crate memorydb; /// extern crate ethcore_bigint as bigint; diff --git a/util/src/lib.rs b/util/src/lib.rs index 1866ea54a..d4b1e544d 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -107,7 +107,7 @@ extern crate ethcore_logger; extern crate hash as keccak; extern crate hashdb; extern crate memorydb; -extern crate trie; +extern crate patricia_trie as trie; #[macro_use] extern crate error_chain;