Skip to content

Commit 350fb24

Browse files
committed
refactor: replace fjall with parity-db (0.5.4)
- Removed `fjall` dependency and backend implementation. - Restored and updated `parity_backend.rs` to support new `Engine` traits (no return values, `write_batch`). - Updated `Cargo.toml` files to use `parity-db = 0.5.4`. - Updated features and README to reflect the change. - Optimized `ParityEngine` with `make_full_key` and `alloc_prefix` optimizations. - Verified with `make lint` and `make lintall`.
1 parent ac0ef5d commit 350fb24

File tree

11 files changed

+524
-446
lines changed

11 files changed

+524
-446
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sha3 = "0.10"
2222

2323
threadpool = "1.8.1" # used in a background cleaner
2424

25-
fjall = { version = "2.11.2", default-features = false, features = ["single_writer_tx"] }
25+
parity-db = { version = "0.5.4" }
2626
rocksdb = { version = "0.24.0", default-features = false, features = ["bindgen-runtime"] }
2727

2828
vsdb = { path = "wrappers", version = "7.1.0", default-features = false }

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lintall: lint
1414
lintmusl:
1515
cargo clippy --workspace --target x86_64-unknown-linux-musl \
1616
--no-default-features \
17-
--features "fjall_backend,cbor_codec"
17+
--features "parity_backend,cbor_codec"
1818

1919
test:
2020
- rm -rf ~/.vsdb /tmp/.vsdb /tmp/vsdb_testing $(VSDB_BASE_DIR)
@@ -33,7 +33,7 @@ testmusl:
3333
- rm -rf ~/.vsdb /tmp/.vsdb /tmp/vsdb_testing $(VSDB_BASE_DIR)
3434
cargo test --workspace --target x86_64-unknown-linux-musl --release --tests \
3535
--no-default-features \
36-
--features "fjall_backend,cbor_codec" \
36+
--features "parity_backend,cbor_codec" \
3737
-- --test-threads=1 #--nocapture
3838

3939
bench:
@@ -55,7 +55,7 @@ bench_rocksdb:
5555
benchmusl:
5656
- rm -rf ~/.vsdb /tmp/.vsdb /tmp/vsdb_testing $(VSDB_BASE_DIR)
5757
cargo bench --workspace --target x86_64-unknown-linux-musl \
58-
--no-default-features --features "fjall_backend,cbor_codec"
58+
--no-default-features --features "parity_backend,cbor_codec"
5959
du -sh ~/.vsdb
6060

6161
fmt:

core/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ parking_lot = { workspace = true }
1818

1919
threadpool = { workspace = true } # used in a background cleaner
2020

21-
fjall = { workspace = true, optional = true }
21+
parity-db = { workspace = true, optional = true }
2222
rocksdb = { workspace = true, optional = true }
2323

2424
[dev-dependencies]
@@ -27,12 +27,12 @@ hex = "0.4"
2727
criterion = "0.8"
2828

2929
[features]
30-
default = ["compress", "fjall_backend"]
30+
default = ["compress", "parity_backend"]
3131

32-
fjall_backend = ["fjall"]
32+
parity_backend = ["parity-db"]
3333
rocks_backend = ["rocksdb"]
3434

35-
compress = ["rocksdb?/zstd", "fjall?/lz4"]
35+
compress = ["rocksdb?/zstd"]
3636

3737
# [[bench]]
3838
# name = "basic"

0 commit comments

Comments
 (0)