Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ethexe-db
Storage abstraction and implementation layer for the ethexe node. Defines the low-level
[CASDatabase] and [KVDatabase] backend traits, provides two concrete backends
([RocksDatabase] for persistence and [MemDb] for tests), and composes them into the typed,
domain-aware [Database] that every ethexe service reads and writes.
Role in the stack
ethexe-service owns the single [Database] instance and passes it to every subsystem
(ethexe-observer, ethexe-compute, ethexe-processor, ethexe-consensus, ethexe-rpc).
The storage-role trait definitions live in ethexe-common::db; [Database] implements them
here, plus the runtime Storage trait from ethexe-runtime-common.
Public API
- [
CASDatabase] — Content-addressable backend trait (write(&[u8]) -> H256,read,contains) - [
KVDatabase] — Key-value backend trait (get/put/contains/iter_prefix/take) - [
Database] — Typed domain database; primary handle held by services - [
RawDatabase] — Un-typed{ kv, cas }pairing used during construction - [
RocksDatabase] — Persistent backend (RocksDatabase::open(path)) - [
MemDb] — In-memory backend for tests - [
hash] — Blake2 hash helper; matches the key returned byCASDatabase::write - [
initialize_db] — Versioned DB bring-up and migration entry point - [
dump] — State dump for re-genesis - [
iterator] / [visitor] — Graph traversal over the content-addressed state - [
verifier] — DB integrity verification backingethexe check
Versioned initialization and migrations go through [initialize_db], [GenesisInitializer],
[InitConfig], and [VERSION]. Under feature = "mock", create_initialized_empty_memory_db
constructs a fully-initialized [MemDb]-backed [Database] for integration tests.
Invariants
Database::try_from_rawrejects any backend whose stored version does not match [VERSION]; a mismatch is a hard error requiring migration.KVDatabase::takeisunsafe: removing a key without re-insertion may cause permanent data loss.- Both backends are
Send + Sync; concurrent reads and writes from multiple threads are safe. - CAS round-trip:
write(data)returnshash(data), andread(that_hash)always returns the same bytes.