Skip to content

Commit 1eb58c8

Browse files
authored
chore(l1): remove redb support (#4103)
**Motivation** #4095 Closes #4095
1 parent 38d96c3 commit 1eb58c8

File tree

19 files changed

+8
-1673
lines changed

19 files changed

+8
-1673
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ loc_report.md
4949
loc_report_slack.txt
5050
loc_report_github.txt
5151
loc_report.json
52-
ethrex.redb
5352

5453
# used by Flamegraph and Samply
5554
cmd/ef_tests/state/levm_perfgraphs

Cargo.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ jsonwebtoken = "9.3.0"
9191
rand = "0.8.5"
9292
cfg-if = "1.0.0"
9393
reqwest = { version = "0.12.7", features = ["json"] }
94-
redb = "=2.4.0"
9594
snap = "1.1.1"
9695
secp256k1 = { version = "0.29.1", default-features = false, features = [
9796
"global-context",

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build: ## 🔨 Build the client
1111
lint: ## 🧹 Linter check
1212
# Note that we are compiling without the "gpu" feature (see #4048 for why)
1313
# To compile with it you can replace '-F' with '--all-features', but you need to have nvcc installed
14-
cargo clippy --all-targets -F debug,redb,risc0,sp1,sync-test \
14+
cargo clippy --all-targets -F debug,risc0,sp1,sync-test \
1515
--workspace --exclude ethrex-replay --exclude ethrex-prover --exclude zkvm_interface --exclude ef_tests-blockchain \
1616
--release -- -D warnings
1717

cmd/ethrex/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ anyhow = "1.0.86"
3535
rand = "0.8.5"
3636
local-ip-address = "0.6"
3737
tokio-util.workspace = true
38-
redb = { workspace = true, optional = true }
3938
lazy_static.workspace = true
4039
secp256k1.workspace = true
4140
keccak-hash.workspace = true
@@ -71,7 +70,6 @@ c-kzg = [
7170
]
7271
metrics = ["ethrex-blockchain/metrics", "ethrex-l2/metrics"]
7372
libmdbx = ["ethrex-storage/libmdbx"]
74-
redb = ["dep:redb", "ethrex-storage/redb"]
7573
blst = ["ethrex-vm/blst"]
7674
rollup_storage_sql = ["ethrex-storage-rollup/sql"]
7775
sync-test = ["ethrex-p2p/sync-test"]

cmd/ethrex/initializers.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@ pub fn open_store(data_dir: &str) -> Store {
102102
cfg_if::cfg_if! {
103103
if #[cfg(feature = "libmdbx")] {
104104
let engine_type = EngineType::Libmdbx;
105-
} else if #[cfg(feature = "redb")] {
106-
let engine_type = EngineType::RedB;
107105
} else {
108-
error!("No database specified. The feature flag `redb` or `libmdbx` should've been set while building.");
106+
error!("No database specified. The feature flag `libmdbx` should've been set while building.");
109107
panic!("Specify the desired database engine.");
110108
}
111109
}

cmd/ethrex/l2/command.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,8 @@ impl Command {
284284
cfg_if::cfg_if! {
285285
if #[cfg(feature = "libmdbx")] {
286286
let store_type = EngineType::Libmdbx;
287-
} else if #[cfg(feature = "redb")] {
288-
let store_type = EngineType::RedB;
289287
} else {
290-
eyre::bail!("Expected one of libmdbx or redb store engine");
288+
eyre::bail!("Expected libmdbx store engine");
291289
}
292290
};
293291
cfg_if::cfg_if! {

crates/storage/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ hex.workspace = true
2121
serde = { version = "1.0.203", features = ["derive"] }
2222
serde_json = "1.0.117"
2323
libmdbx = { workspace = true, optional = true }
24-
redb = { workspace = true, optional = true }
2524
# NOTE: intentionally avoiding the workspace dep as it brings "full" features, breaking the provers
2625
# We only need the runtime for the blocking databases to spawn blocking tasks
27-
tokio = { version = "1.41.1", optional = true, default-features = false, features = ["rt"] }
26+
tokio = { version = "1.41.1", optional = true, default-features = false, features = [
27+
"rt",
28+
] }
2829
bincode = "1.3.3"
2930

3031
[features]
3132
default = []
3233
libmdbx = ["dep:libmdbx", "ethrex-trie/libmdbx", "dep:tokio"]
33-
redb = ["dep:redb", "dep:tokio"]
3434

3535
[dev-dependencies]
3636
hex.workspace = true

crates/storage/error.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use ethrex_rlp::error::RLPDecodeError;
22
use ethrex_trie::TrieError;
3-
#[cfg(feature = "redb")]
4-
use redb::{CommitError, DatabaseError, StorageError, TableError, TransactionError};
53
use thiserror::Error;
64

75
// TODO improve errors
@@ -12,24 +10,6 @@ pub enum StoreError {
1210
#[cfg(feature = "libmdbx")]
1311
#[error("Libmdbx error: {0}")]
1412
LibmdbxError(anyhow::Error),
15-
#[cfg(feature = "redb")]
16-
#[error("Redb Storage error: {0}")]
17-
RedbStorageError(#[from] StorageError),
18-
#[cfg(feature = "redb")]
19-
#[error("Redb Table error: {0}")]
20-
RedbTableError(#[from] TableError),
21-
#[cfg(feature = "redb")]
22-
#[error("Redb Commit error: {0}")]
23-
RedbCommitError(#[from] CommitError),
24-
#[cfg(feature = "redb")]
25-
#[error("Redb Transaction error: {0}")]
26-
RedbTransactionError(#[from] Box<TransactionError>),
27-
#[error("Redb Database error: {0}")]
28-
#[cfg(feature = "redb")]
29-
RedbDatabaseError(#[from] DatabaseError),
30-
#[error("Redb Cast error")]
31-
#[cfg(feature = "redb")]
32-
RedbCastError,
3313
#[error("{0}")]
3414
Custom(String),
3515
#[error(transparent)]

crates/storage/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod api;
22

3-
#[cfg(any(feature = "libmdbx", feature = "redb"))]
3+
#[cfg(feature = "libmdbx")]
44
mod rlp;
55
mod store;
66
mod store_db;

0 commit comments

Comments
 (0)