From a894cfc8398ca9ab1b4cfe155bc16c4930e33497 Mon Sep 17 00:00:00 2001 From: Gautham Date: Mon, 13 Mar 2023 17:15:53 +0530 Subject: [PATCH] Replace with fork of trie --- Cargo.lock | 79 +++++++++++++++++++++++++++----------- primitives/trie/Cargo.toml | 8 ++-- 2 files changed, 60 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a63e25b4878c..2ea3a77215af8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -532,7 +532,7 @@ version = "4.0.0-dev" dependencies = [ "array-bytes", "env_logger 0.9.3", - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "log", "sp-core", "sp-runtime", @@ -2860,6 +2860,11 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +[[package]] +name = "hash-db" +version = "0.15.2" +source = "git+https://github.com/Polkadex-Substrate/trie.git?branch=master#3d3c306d92a37e9a3773ba5f2762f270607c5962" + [[package]] name = "hash256-std-hasher" version = "0.15.2" @@ -3488,7 +3493,7 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711adba9940a039f4374fc5724c0a5eaca84a2d558cce62256bfe26f0dbef05e" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher", "tiny-keccak", ] @@ -4458,10 +4463,18 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.12.3", ] +[[package]] +name = "memory-db" +version = "0.31.0" +source = "git+https://github.com/Polkadex-Substrate/trie.git?branch=master#3d3c306d92a37e9a3773ba5f2762f270607c5962" +dependencies = [ + "hash-db 0.15.2 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", +] + [[package]] name = "memory_units" version = "0.4.0" @@ -4821,7 +4834,7 @@ dependencies = [ "derive_more", "fs_extra", "futures", - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "kitchensink-runtime", "kvdb", "kvdb-rocksdb", @@ -8259,7 +8272,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "criterion", - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "kitchensink-runtime", "kvdb", "kvdb-memorydb", @@ -9900,7 +9913,7 @@ dependencies = [ name = "sp-api" version = "4.0.0-dev" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parity-scale-codec", "sp-api-proc-macro", @@ -10175,7 +10188,7 @@ dependencies = [ "dyn-clonable", "ed25519-zebra", "futures", - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher", "impl-serde", "lazy_static", @@ -10545,7 +10558,7 @@ version = "0.13.0" dependencies = [ "array-bytes", "assert_matches", - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10560,7 +10573,7 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-db", + "trie-db 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -10645,10 +10658,10 @@ dependencies = [ "ahash 0.8.3", "array-bytes", "criterion", - "hash-db", + "hash-db 0.15.2 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", "hashbrown 0.12.3", "lazy_static", - "memory-db", + "memory-db 0.31.0 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", @@ -10660,8 +10673,8 @@ dependencies = [ "thiserror", "tracing", "trie-bench", - "trie-db", - "trie-root", + "trie-db 0.26.0 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", + "trie-root 0.17.0 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", "trie-standardmap", ] @@ -10964,7 +10977,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-trie", - "trie-db", + "trie-db 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -11002,7 +11015,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "futures", "log", - "memory-db", + "memory-db 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-babe", "pallet-beefy-mmr", "pallet-timestamp", @@ -11036,7 +11049,7 @@ dependencies = [ "sp-version", "substrate-test-runtime-client", "substrate-wasm-builder", - "trie-db", + "trie-db 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -11615,12 +11628,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2b7695feb8041efc0adaa09ed3a692ca7b7c997395954fdc838b5b078346f6" dependencies = [ "criterion", - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher", - "memory-db", + "memory-db 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec", - "trie-db", - "trie-root", + "trie-db 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-root 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "trie-standardmap", ] @@ -11630,7 +11643,19 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879380c0061b165ba1f036325b7f3478bc1a947814d9fc36d22c5d8e960b11bd" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.13.2", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-db" +version = "0.26.0" +source = "git+https://github.com/Polkadex-Substrate/trie.git?branch=master#3d3c306d92a37e9a3773ba5f2762f270607c5962" +dependencies = [ + "hash-db 0.15.2 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", "hashbrown 0.13.2", "log", "rustc-hex", @@ -11643,7 +11668,15 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trie-root" +version = "0.17.0" +source = "git+https://github.com/Polkadex-Substrate/trie.git?branch=master#3d3c306d92a37e9a3773ba5f2762f270607c5962" +dependencies = [ + "hash-db 0.15.2 (git+https://github.com/Polkadex-Substrate/trie.git?branch=master)", ] [[package]] @@ -11652,7 +11685,7 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3161ba520ab28cd8e6b68e1126f1009f6e335339d1a73b978139011703264c8" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher", ] diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index fae39ec34c0ea..4d7ad60430848 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -21,16 +21,16 @@ harness = false ahash = { version = "0.8.2", optional = true } codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false } hashbrown = { version = "0.12.3", optional = true } -hash-db = { version = "0.15.2", default-features = false } lazy_static = { version = "1.4.0", optional = true } -memory-db = { version = "0.31.0", default-features = false } nohash-hasher = { version = "0.2.0", optional = true } parking_lot = { version = "0.12.1", optional = true } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } thiserror = { version = "1.0.30", optional = true } tracing = { version = "0.1.29", optional = true } -trie-db = { version = "0.26.0", default-features = false } -trie-root = { version = "0.17.0", default-features = false } +hash-db = { git = "https://github.com/Polkadex-Substrate/trie.git", branch ="master", default-features = false } +memory-db = { git = "https://github.com/Polkadex-Substrate/trie.git", branch ="master" , default-features = false } +trie-db = { git = "https://github.com/Polkadex-Substrate/trie.git", branch ="master", default-features = false } +trie-root = { git = "https://github.com/Polkadex-Substrate/trie.git", branch ="master" , default-features = false } sp-core = { version = "7.0.0", default-features = false, path = "../core" } sp-std = { version = "5.0.0", default-features = false, path = "../std" } schnellru = { version = "0.2.1", optional = true }