Skip to content
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions crates/optimism/trie/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ workspace = true
[dependencies]
# reth
reth-trie = { workspace = true, features = ["serde"] }
reth-primitives-traits = { workspace = true, features = ["op"] }
reth-db = { workspace = true, features = ["mdbx", "op"] }
reth-primitives-traits = { workspace = true }
reth-db = { workspace = true, features = ["mdbx"] }
reth-revm = { workspace = true }
reth-provider = { workspace = true }
reth-db-api = { workspace = true }
reth-execution-errors = { workspace = true }

# ethereum
alloy-primitives.workspace = true
Expand Down
5 changes: 5 additions & 0 deletions crates/optimism/trie/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ pub trait OpProofsHashedCursor: Send + Sync {

/// Move the cursor to the next entry and return it.
fn next(&mut self) -> OpProofsStorageResult<Option<(B256, Self::Value)>>;

/// Returns `true` if there are no entries for a given key.
fn is_storage_empty(&mut self) -> OpProofsStorageResult<bool> {
Ok(self.seek(B256::ZERO)?.is_none())
}
}

/// Diff of trie updates and post state for a block.
Expand Down
4 changes: 4 additions & 0 deletions crates/optimism/trie/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ pub use in_memory::{
};

pub mod db;

pub mod proof;

pub mod provider;
Loading
Loading