New database trait (#5549)

* Introduce trait

* The trait

* Generic

* Basic impls.

* Remove unneeded bounds

* Minor changes

* Switch over to the new DB trait

* Integrated parity-db and added CLI for db selection

* Default impl.

* Fix logs.

* Started integrating subdb

* Apply suggestions from code review

Co-Authored-By: Cecile Tonglet <cecile@parity.io>

* Apply suggestions from code review

Co-Authored-By: Nikolay Volf <nikvolf@gmail.com>

* Enable subdb

* Bump parity-db

* Fixed CLI macro

* Fixed browser build

* Fixed features

* Sort out features

* Use parity-db from crates.io

* Typo

Co-authored-by: arkpar <arkady.paronyan@gmail.com>
Co-authored-by: Cecile Tonglet <cecile@parity.io>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
Gavin Wood
2020-04-15 14:38:39 +02:00
committed by GitHub
parent 3426d662f7
commit 91af5b6fcc
43 changed files with 1036 additions and 579 deletions
+4
View File
@@ -21,6 +21,7 @@ linked-hash-map = "0.5.2"
hash-db = "0.15.2"
parity-util-mem = { version = "0.6.0", default-features = false, features = ["std"] }
codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] }
blake2-rfc = "0.2.18"
sc-client-api = { version = "2.0.0-dev", path = "../api" }
sp-core = { version = "2.0.0-dev", path = "../../primitives/core" }
@@ -32,6 +33,9 @@ sc-state-db = { version = "0.8.0-dev", path = "../state-db" }
sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" }
sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" }
sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" }
sp-database = { version = "2.0.0-dev", path = "../../primitives/database" }
parity-db = { version = "0.1", optional = true }
subdb = { git = "https://github.com/paritytech/subdb", optional = true }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0-dev", path = "../../utils/prometheus" }
[dev-dependencies]