Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/optimism/trie/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use reth_trie::{
BranchNodeCompact, Nibbles,
};

/// Manages reading storage or account trie nodes from [`OpProofsTrieCursor`].
/// Manages reading storage or account trie nodes from [`OpProofsTrieCursorRO`].
#[derive(Debug, Clone, Constructor, From)]
pub struct OpProofsTrieCursor<C: OpProofsTrieCursorRO>(pub C);

Expand Down
6 changes: 3 additions & 3 deletions crates/optimism/trie/src/db/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ where
}
}

/// MDBX implementation of [`OpProofsTrieCursor`].
/// MDBX implementation of [`OpProofsTrieCursorRO`].
#[derive(Debug)]
pub struct MdbxTrieCursor<T: Table + DupSort, Cursor> {
inner: BlockNumberVersionedCursor<T, Cursor>,
Expand Down Expand Up @@ -261,7 +261,7 @@ where
}
}

/// MDBX implementation of [`OpProofsHashedCursor`] for storage state.
/// MDBX implementation of [`OpProofsHashedCursorRO`] for storage state.
#[derive(Debug)]
pub struct MdbxStorageCursor<Cursor> {
inner: BlockNumberVersionedCursor<HashedStorageHistory, Cursor>,
Expand Down Expand Up @@ -294,7 +294,7 @@ where
}
}

/// MDBX implementation of [`OpProofsHashedCursor`] for account state.
/// MDBX implementation of [`OpProofsHashedCursorRO`] for account state.
#[derive(Debug)]
pub struct MdbxAccountCursor<Cursor> {
inner: BlockNumberVersionedCursor<HashedAccountHistory, Cursor>,
Expand Down
4 changes: 2 additions & 2 deletions crates/optimism/trie/src/db/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! MDBX implementation of [`OpProofsStorage`](crate::OpProofsStorage).
//! MDBX implementation of [`OpProofsStore`](crate::OpProofsStore).
//!
//! This module provides a complete MDBX implementation of the
//! [`OpProofsStorage`](crate::OpProofsStorage) trait. It uses the [`reth_db`]
//! [`OpProofsStore`](crate::OpProofsStore) trait. It uses the [`reth_db`]
//! crate for database interactions and defines the necessary tables and models for storing trie
//! branches, accounts, and storage leaves.

Expand Down
4 changes: 2 additions & 2 deletions crates/optimism/trie/src/db/models/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! MDBX implementation of [`OpProofsStorage`](crate::OpProofsStorage).
//! MDBX implementation of [`OpProofsStore`](crate::OpProofsStore).
//!
//! This module provides a complete MDBX implementation of the
//! [`OpProofsStorage`](crate::OpProofsStorage) trait. It uses the [`reth_db`] crate for
//! [`OpProofsStore`](crate::OpProofsStore) trait. It uses the [`reth_db`] crate for
//! database interactions and defines the necessary tables and models for storing trie branches,
//! accounts, and storage leaves.

Expand Down
2 changes: 1 addition & 1 deletion crates/optimism/trie/src/db/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use reth_primitives_traits::Account;
use reth_trie::{BranchNodeCompact, Nibbles, StoredNibbles};
use std::path::Path;

/// MDBX implementation of [`OpProofsStorage`].
/// MDBX implementation of [`OpProofsStore`].
#[derive(Debug)]
pub struct MdbxProofsStorage {
env: DatabaseEnv,
Expand Down
4 changes: 2 additions & 2 deletions crates/optimism/trie/src/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl InMemoryProofsStorage {
}
}

/// In-memory implementation of [`OpProofsTrieCursor`].
/// In-memory implementation of [`OpProofsTrieCursorRO`].
#[derive(Debug)]
pub struct InMemoryTrieCursor {
/// Current position in the iteration (-1 means not positioned yet)
Expand Down Expand Up @@ -250,7 +250,7 @@ impl OpProofsTrieCursorRO for InMemoryTrieCursor {
}
}

/// In-memory implementation of [`OpProofsHashedCursor`] for storage slots
/// In-memory implementation of [`OpProofsHashedCursorRO`] for storage slots
#[derive(Debug)]
pub struct InMemoryStorageCursor {
/// Current position in the iteration (-1 means not positioned yet)
Expand Down
6 changes: 3 additions & 3 deletions crates/optimism/trie/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use strum::{EnumCount, EnumIter, IntoEnumIterator};
/// Alias for [`OpProofsStorageWithMetrics`].
pub type OpProofsStorage<S> = OpProofsStorageWithMetrics<S>;

/// Alias for [`OpProofsTrieCursor`](cursor::OpProofsTrieCursor) with metrics layer.
/// Alias for [`OpProofsTrieCursorRO`](cursor::OpProofsTrieCursor) with metrics layer.
pub type OpProofsTrieCursor<C> = cursor::OpProofsTrieCursor<OpProofsTrieCursorWithMetrics<C>>;

/// Alias for [`OpProofsHashedAccountCursor`](cursor::OpProofsHashedAccountCursor) with metrics
Expand Down Expand Up @@ -217,7 +217,7 @@ pub struct BlockMetrics {
pub hashed_storages_written_total: Counter,
}

/// Wrapper for [`OpProofsTrieCursor`] that records metrics.
/// Wrapper for [`OpProofsTrieCursorRO`] that records metrics.
#[derive(Debug, Constructor, Clone)]
pub struct OpProofsTrieCursorWithMetrics<C> {
cursor: C,
Expand Down Expand Up @@ -275,7 +275,7 @@ impl<C: OpProofsHashedCursorRO> OpProofsHashedCursorRO for OpProofsHashedCursorW
}
}

/// Wrapper around [`OpProofsStorage`] that records metrics for all operations.
/// Wrapper around [`OpProofsStore`] type that records metrics for all operations.
#[derive(Debug, Clone)]
pub struct OpProofsStorageWithMetrics<S> {
storage: S,
Expand Down
2 changes: 1 addition & 1 deletion crates/optimism/trie/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Common test suite for [`OpProofsStorage`] implementations.
//! Common test suite for [`OpProofsStore`] implementations.

use alloy_primitives::{map::HashMap, B256, U256};
use reth_optimism_trie::{
Expand Down
Loading