Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update paritydb and remove dev deps on rocksdb
  • Loading branch information
cheme committed Nov 7, 2022
commit ad6114972da403098b338ad19c15f70742501c7c
45 changes: 13 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ members = [
# This list is ordered alphabetically.
[profile.dev.package]
blake2 = { opt-level = 3 }
blake2-rfc = { opt-level = 3 }
blake2b_simd = { opt-level = 3 }
chacha20poly1305 = { opt-level = 3 }
cranelift-codegen = { opt-level = 3 }
Expand Down
2 changes: 1 addition & 1 deletion bin/node/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fs_extra = "1"
rand = { version = "0.7.2", features = ["small_rng"] }
lazy_static = "1.4.0"
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
parity-db = { version = "0.3" }
parity-db = { version = "0.4" }
sc-transaction-pool = { version = "4.0.0-dev", path = "../../../client/transaction-pool" }
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
futures = { version = "0.3.21", features = ["thread-pool"] }
3 changes: 1 addition & 2 deletions bin/node/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ pallet-asset-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transa
pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
sc-client-db = { version = "0.10.0-dev", features = ["rocksdb"], path = "../../../client/db" }
sc-client-db = { version = "0.10.0-dev", features = [], path = "../../../client/db" }
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
sc-executor = { version = "0.10.0-dev", features = [
"wasmtime",
], path = "../../../client/executor" }
sc-service = { version = "0.10.0-dev", features = [
"test-helpers",
"rocksdb",
], path = "../../../client/service" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-block-builder = { version = "4.0.0-dev", path = "../../../primitives/block-builder" }
Expand Down
3 changes: 1 addition & 2 deletions client/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kvdb-memorydb = "0.12.0"
kvdb-rocksdb = { version = "0.16.0", optional = true }
linked-hash-map = "0.5.4"
log = "0.4.17"
parity-db = "0.3.16"
parity-db = "0.4.2"
parking_lot = "0.12.1"
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sc-state-db = { version = "0.10.0-dev", path = "../state-db" }
Expand All @@ -36,7 +36,6 @@ sp-trie = { version = "6.0.0", path = "../../primitives/trie" }

[dev-dependencies]
criterion = "0.3.3"
kvdb-rocksdb = "0.16.0"
rand = "0.8.4"
tempfile = "3.1.0"
quickcheck = { version = "1.0.3", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mod children;
mod parity_db;
mod record_stats_state;
mod stats;
#[cfg(any(feature = "rocksdb", test))]
#[cfg(feature = "rocksdb")]
mod upgrade;
mod utils;

Expand Down
10 changes: 7 additions & 3 deletions client/db/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ fn open_parity_db<Block: BlockT>(path: &Path, db_type: DatabaseType, create: boo
}
}

#[cfg(any(feature = "rocksdb", test))]
#[cfg(feature = "rocksdb")]
fn open_kvdb_rocksdb<Block: BlockT>(
path: &Path,
db_type: DatabaseType,
Expand Down Expand Up @@ -343,7 +343,7 @@ fn open_kvdb_rocksdb<Block: BlockT>(
Ok(sp_database::as_database(db))
}

#[cfg(not(any(feature = "rocksdb", test)))]
#[cfg(not(feature = "rocksdb"))]
fn open_kvdb_rocksdb<Block: BlockT>(
_path: &Path,
_db_type: DatabaseType,
Expand Down Expand Up @@ -583,10 +583,11 @@ mod tests {
use super::*;
use codec::Input;
use sp_runtime::testing::{Block as RawBlock, ExtrinsicWrapper};
#[cfg(feature = "rocksdb")]
use std::path::PathBuf;
type Block = RawBlock<ExtrinsicWrapper<u32>>;

#[cfg(any(feature = "rocksdb", test))]
#[cfg(feature = "rocksdb")]
#[test]
fn database_type_subdir_migration() {
type Block = RawBlock<ExtrinsicWrapper<u64>>;
Expand Down Expand Up @@ -685,6 +686,7 @@ mod tests {
assert_eq!(joined.remaining_len().unwrap(), Some(0));
}

#[cfg(feature = "rocksdb")]
#[test]
fn test_open_database_auto_new() {
let db_dir = tempfile::TempDir::new().unwrap();
Expand Down Expand Up @@ -730,6 +732,7 @@ mod tests {
}
}

#[cfg(feature = "rocksdb")]
#[test]
fn test_open_database_rocksdb_new() {
let db_dir = tempfile::TempDir::new().unwrap();
Expand Down Expand Up @@ -802,6 +805,7 @@ mod tests {
}

// it should fail to open existing pairtydb database
#[cfg(feature = "rocksdb")]
{
let db_res = open_database::<Block>(
&DatabaseSource::RocksDb { path: rocksdb_path.clone(), cache_size: 128 },
Expand Down
2 changes: 1 addition & 1 deletion client/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[features]
default = ["rocksdb"]
default = []
# The RocksDB feature activates the RocksDB database backend. If it is not activated, and you pass
# a path to a database, an error will be produced at runtime.
rocksdb = ["sc-client-db/rocksdb"]
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ test-linux-stable:
--release
--verbose
--features runtime-benchmarks
--features sc-cli/rocksdb
--features sc-client-db/rocksdb
--manifest-path ./bin/node/cli/Cargo.toml
--exclude node-cli
--partition count:${CI_NODE_INDEX}/${CI_NODE_TOTAL}
Expand Down