Skip to content

Commit d81fd61

Browse files
prestwichclaude
andauthored
chore: publish readiness fixes and version bump to 0.1.0 (#16)
Prepare workspace for crates.io publishing: - Fix non-workspace path deps in signet-cold and signet-cold-mdbx - Remove ghost signet-mdbx-hot workspace dependency - Add [package.metadata.docs.rs] to all 6 crates - Bump version from 0.0.1 to 0.1.0 - Add feature flag documentation to all crate lib.rs files - Add rust-toolchain.toml pinning channel 1.92 - Add CHANGELOG.md with initial 0.1.0 entry - Add conformance integration test for signet-cold in-memory backend - Add unified storage integration tests for signet-storage - Remove eprintln! debug output from signet-hot-mdbx test utilities Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8cbc9ca commit d81fd61

File tree

17 files changed

+177
-24
lines changed

17 files changed

+177
-24
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
3+
## 0.1.0
4+
5+
Initial release of the Signet storage workspace.
6+
7+
### Crates
8+
9+
- **signet-storage-types**: Shared primitive types adapted from Reth
10+
- **signet-hot**: Trait-based hot storage abstractions
11+
- **signet-hot-mdbx**: MDBX implementation of hot storage
12+
- **signet-cold**: Append-only cold storage for historical data
13+
- **signet-cold-mdbx**: MDBX table definitions for cold storage
14+
- **signet-storage**: Unified storage interface combining hot and cold backends

Cargo.toml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.0.1"
6+
version = "0.1.0"
77
edition = "2024"
88
rust-version = "1.92"
99
authors = ["init4"]
@@ -35,13 +35,12 @@ incremental = false
3535

3636
[workspace.dependencies]
3737
# internal
38-
signet-hot = { version = "0.0.1", path = "./crates/hot" }
39-
signet-hot-mdbx = { version = "0.0.1", path = "./crates/hot-mdbx" }
40-
signet-mdbx-hot = { version = "0.0.1", path = "./crates/mdbx-hot" }
41-
signet-cold = { version = "0.0.1", path = "./crates/cold" }
42-
signet-cold-mdbx = { version = "0.0.1", path = "./crates/cold-mdbx" }
43-
signet-storage = { version = "0.0.1", path = "./crates/storage" }
44-
signet-storage-types = { version = "0.0.1", path = "./crates/types" }
38+
signet-hot = { version = "0.1.0", path = "./crates/hot" }
39+
signet-hot-mdbx = { version = "0.1.0", path = "./crates/hot-mdbx" }
40+
signet-cold = { version = "0.1.0", path = "./crates/cold" }
41+
signet-cold-mdbx = { version = "0.1.0", path = "./crates/cold-mdbx" }
42+
signet-storage = { version = "0.1.0", path = "./crates/storage" }
43+
signet-storage-types = { version = "0.1.0", path = "./crates/types" }
4544

4645
# External, in-house
4746
signet-libmdbx = { version = "0.8.0" }

crates/cold-mdbx/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ repository.workspace = true
1111
keywords = ["mdbx", "storage", "cold-storage", "blockchain"]
1212
categories = ["database-implementations"]
1313

14+
[package.metadata.docs.rs]
15+
all-features = true
16+
rustdoc-args = ["--cfg", "docsrs"]
17+
1418
[dependencies]
1519
alloy.workspace = true
16-
signet-cold = { version = "0.0.1", path = "../cold" }
20+
signet-cold.workspace = true
1721
signet-hot.workspace = true
1822
signet-hot-mdbx.workspace = true
1923
signet-storage-types.workspace = true

crates/cold-mdbx/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
//! ## Metadata Tables
2020
//!
2121
//! - [`ColdMetadata`]: Storage metadata (latest block, finalized, safe, earliest).
22+
//!
23+
//! # Feature Flags
24+
//!
25+
//! - **`test-utils`**: Propagates `signet-cold/test-utils` for conformance
26+
//! testing against the MDBX backend.
2227
2328
#![warn(
2429
missing_copy_implementations,

crates/cold/Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,23 @@ repository.workspace = true
1111
keywords = ["blockchain", "storage", "cold-storage", "historical"]
1212
categories = ["database-implementations"]
1313

14+
[package.metadata.docs.rs]
15+
all-features = true
16+
rustdoc-args = ["--cfg", "docsrs"]
17+
1418
[dependencies]
1519
alloy.workspace = true
1620
lru.workspace = true
17-
signet-storage-types = { version = "0.0.1", path = "../types" }
21+
signet-storage-types.workspace = true
1822
thiserror.workspace = true
1923
tokio.workspace = true
2024
tokio-util.workspace = true
2125
tracing.workspace = true
2226

27+
[dev-dependencies]
28+
signet-cold = { path = ".", features = ["test-utils"] }
29+
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
30+
2331
[features]
2432
in-memory = []
2533
test-utils = ["in-memory"]

crates/cold/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@
122122
//! ```
123123
//!
124124
//! This is a design sketch; no implementation is provided yet.
125+
//!
126+
//! # Feature Flags
127+
//!
128+
//! - **`in-memory`**: Enables the [`mem`] module, providing an in-memory
129+
//! [`ColdStorage`] backend for testing.
130+
//! - **`test-utils`**: Enables the [`conformance`] module with backend
131+
//! conformance tests. Implies `in-memory`.
125132
126133
#![warn(
127134
missing_copy_implementations,

crates/cold/tests/conformance.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//! Conformance tests for the in-memory cold storage backend.
2+
3+
use signet_cold::{conformance::conformance, mem::MemColdBackend};
4+
5+
#[tokio::test]
6+
async fn mem_backend_conformance() {
7+
let backend = MemColdBackend::new();
8+
conformance(&backend).await.unwrap();
9+
}

crates/hot-mdbx/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ repository.workspace = true
1111
keywords = ["mdbx", "storage", "key-value", "blockchain"]
1212
categories = ["database-implementations"]
1313

14+
[package.metadata.docs.rs]
15+
all-features = true
16+
rustdoc-args = ["--cfg", "docsrs"]
17+
1418
[dependencies]
1519
alloy.workspace = true
1620
bytes.workspace = true

crates/hot-mdbx/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
//!
3232
//! Overall, we do NOT recommend using this to open existing databases that
3333
//! were not created and managed by this implementation.
34+
//!
35+
//! # Feature Flags
36+
//!
37+
//! - **`test-utils`**: Enables the [`test_utils`] module with MDBX test
38+
//! helpers and conformance tests. Adds a `tempfile` dependency.
39+
//! - **`disable-lock`**: Disables the storage lock file, allowing multiple
40+
//! processes to open the same database. Intended for testing scenarios.
3441
3542
#![warn(
3643
missing_copy_implementations,

crates/hot-mdbx/src/test_utils.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,11 +1302,6 @@ mod tests {
13021302
entries.push(next);
13031303
}
13041304
}
1305-
1306-
eprintln!("\nStorageChangeSets entries ({} total):", entries.len());
1307-
for ((bn, addr), slot, val) in &entries {
1308-
eprintln!(" block={}, addr={:?}, slot={}, old_value={}", bn, addr, slot, val);
1309-
}
13101305
}
13111306

13121307
// Count PlainStorageState entries before unwind
@@ -1329,10 +1324,6 @@ mod tests {
13291324
}
13301325
}
13311326

1332-
eprintln!("\nPlainStorageState BEFORE unwind ({} total):", entries.len());
1333-
for (addr, slot, val) in &entries {
1334-
eprintln!(" addr={:?}, slot={}, value={}", addr, slot, val);
1335-
}
13361327
assert_eq!(entries.len(), 7, "Expected 7 storage entries before unwind");
13371328
}
13381329

@@ -1363,11 +1354,6 @@ mod tests {
13631354
}
13641355
}
13651356

1366-
eprintln!("\nPlainStorageState AFTER unwind ({} total):", entries.len());
1367-
for (addr, slot, val) in &entries {
1368-
eprintln!(" addr={:?}, slot={}, value={}", addr, slot, val);
1369-
}
1370-
13711357
// Expected: addr1.slot1=20, addr2.slot1=100 (2 entries)
13721358
assert_eq!(entries.len(), 2, "Expected 2 storage entries after unwind");
13731359

0 commit comments

Comments
 (0)