rocksdb 0.22 via a patch

patch is removeable once https://github.com/paritytech/parity-common/pull/828
is merged and released.
This commit is contained in:
Luke Parker 2024-02-18 05:32:04 -05:00
parent df85c09435
commit c05c511938
No known key found for this signature in database
5 changed files with 45 additions and 19 deletions

37
Cargo.lock generated
View file

@ -445,17 +445,16 @@ dependencies = [
[[package]] [[package]]
name = "bindgen" name = "bindgen"
version = "0.65.1" version = "0.69.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 2.4.2",
"cexpr", "cexpr",
"clang-sys", "clang-sys",
"itertools",
"lazy_static", "lazy_static",
"lazycell", "lazycell",
"peeking_take_while",
"prettyplease 0.2.16",
"proc-macro2", "proc-macro2",
"quote", "quote",
"regex", "regex",
@ -2955,7 +2954,7 @@ dependencies = [
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project-lite 0.2.13", "pin-project-lite 0.2.13",
"socket2 0.4.10", "socket2 0.5.5",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@ -3432,7 +3431,7 @@ dependencies = [
"num_cpus", "num_cpus",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"regex", "regex",
"rocksdb", "rocksdb 0.21.0",
"smallvec", "smallvec",
] ]
@ -3947,9 +3946,9 @@ dependencies = [
[[package]] [[package]]
name = "librocksdb-sys" name = "librocksdb-sys"
version = "0.11.0+8.1.1" version = "0.16.0+8.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"bzip2-sys", "bzip2-sys",
@ -3959,6 +3958,7 @@ dependencies = [
"libz-sys", "libz-sys",
"lz4-sys", "lz4-sys",
"tikv-jemalloc-sys", "tikv-jemalloc-sys",
"zstd-sys",
] ]
[[package]] [[package]]
@ -4768,7 +4768,7 @@ version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b"
dependencies = [ dependencies = [
"proc-macro-crate 1.3.1", "proc-macro-crate 3.1.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.48", "syn 2.0.48",
@ -5188,12 +5188,6 @@ dependencies = [
"sha2", "sha2",
] ]
[[package]]
name = "peeking_take_while"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]] [[package]]
name = "pem" name = "pem"
version = "1.1.1" version = "1.1.1"
@ -5994,8 +5988,15 @@ dependencies = [
[[package]] [[package]]
name = "rocksdb" name = "rocksdb"
version = "0.21.0" version = "0.21.0"
dependencies = [
"rocksdb 0.22.0",
]
[[package]]
name = "rocksdb"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" checksum = "6bd13e55d6d7b8cd0ea569161127567cd587676c99f4472f779a0279aa60a7a7"
dependencies = [ dependencies = [
"libc", "libc",
"librocksdb-sys", "librocksdb-sys",
@ -7476,7 +7477,7 @@ name = "serai-db"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"parity-db", "parity-db",
"rocksdb", "rocksdb 0.22.0",
] ]
[[package]] [[package]]

View file

@ -3,6 +3,7 @@ resolver = "2"
members = [ members = [
# Version patches # Version patches
"patches/zstd", "patches/zstd",
"patches/rocksdb",
"patches/proc-macro-crate", "patches/proc-macro-crate",
# std patches # std patches
@ -112,6 +113,8 @@ dockertest = { git = "https://github.com/kayabaNerve/dockertest-rs", branch = "a
# wasmtime pulls in an old version for this # wasmtime pulls in an old version for this
zstd = { path = "patches/zstd" } zstd = { path = "patches/zstd" }
# substrate pulls in an old version for this
rocksdb = { path = "patches/rocksdb" }
# proc-macro-crate 2 binds to an old version of toml for msrv so we patch to 3 # proc-macro-crate 2 binds to an old version of toml for msrv so we patch to 3
proc-macro-crate = { path = "patches/proc-macro-crate" } proc-macro-crate = { path = "patches/proc-macro-crate" }

View file

@ -18,7 +18,7 @@ workspace = true
[dependencies] [dependencies]
parity-db = { version = "0.4", default-features = false, optional = true } parity-db = { version = "0.4", default-features = false, optional = true }
rocksdb = { version = "0.21", default-features = false, features = ["lz4"], optional = true } rocksdb = { version = "0.22", default-features = false, features = ["lz4"], optional = true }
[features] [features]
parity-db = ["dep:parity-db"] parity-db = ["dep:parity-db"]

View file

@ -0,0 +1,21 @@
[package]
name = "rocksdb"
version = "0.21.0"
description = "rocksdb which patches to the latest update"
license = "MIT"
repository = "https://github.com/serai-dex/serai/tree/develop/patches/rocksdb"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
keywords = []
edition = "2021"
rust-version = "1.63"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
rocksdb = "0.22"
[features]
jemalloc = ["rocksdb/jemalloc"]
snappy = ["rocksdb/snappy"]

View file

@ -0,0 +1 @@
pub use rocksdb::*;