Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/base/triedb
/ functions
Functions
627 in github.com/base/triedb
⨍
Functions
627
◇
Types & classes
91
↓ 201 callers
Method
clone
(&self)
src/executor/futures.rs:101
↓ 85 callers
Method
set_values
Applies a set of changes to the trie. This is the main entry point for modifying trie state. It handles: - Empty trie initialization - Cache invalida
src/storage/engine/write.rs:31
↓ 74 callers
Method
as_mut
(&mut self)
src/meta/mod.rs:293
↓ 65 callers
Method
insert
Inserts a key-value pair into the map. # Panics Panics if the key is not 64 bytes long.
src/context.rs:29
↓ 60 callers
Method
len
(&self)
src/meta/mod.rs:621
↓ 56 callers
Method
join
(&self, other: &RawPath)
src/path.rs:119
↓ 55 callers
Method
insert_value
Inserts a value into the page and returns the index of the new value.
src/page/slotted_page.rs:204
↓ 53 callers
Method
iter
Returns an iterator over all changes in the overlay, respecting slice bounds. The paths are adjusted by the prefix_offset.
src/overlay.rs:323
↓ 52 callers
Method
get_value
Get an owned value
src/page/slotted_page.rs:57
↓ 49 callers
Method
len
(&self)
src/path.rs:54
↓ 47 callers
Method
id
(&self)
src/page/page.rs:83
↓ 45 callers
Method
extend
(&mut self, other: &RawPath)
src/path.rs:111
↓ 44 callers
Method
freeze
Freezes the mutable overlay into an immutable sorted overlay. This sorts the changes and deduplicates by path, keeping the last value for each path.
src/overlay.rs:71
↓ 42 callers
Method
get_account
Retrieves an [Account] from the storage engine, identified by the given [AddressPath]. Returns [None] if the path is not found.
src/storage/engine/read.rs:24
↓ 40 callers
Method
set_child
Sets the child of the [Node] at the given index. # Panics This function will panic if the [Node] type does not support children.
src/node.rs:220
↓ 36 callers
Method
try_into
(self)
src/page/subtrie_page.rs:104
↓ 35 callers
Function
create_test_account
(balance: u64, nonce: u64)
src/storage/test_utils.rs:29
↓ 34 callers
Method
commit
Saves the metadata to the storage device, and promotes the dirty slot to the active slot. After calling this method, a new dirty slot is produced wit
src/meta/mod.rs:553
↓ 33 callers
Method
as_ref
(&self)
src/meta/mod.rs:287
↓ 32 callers
Method
slice
(&self, range: impl RangeBounds<usize>)
src/path.rs:93
↓ 30 callers
Function
create_test_engine
(max_pages: u32)
src/storage/test_utils.rs:11
↓ 30 callers
Method
is_empty
Returns `true` if this metadata slot is uninitialized (its byte representation is all zeros). Uninitialized metadata is considered valid, even though
src/meta/mod.rs:243
↓ 30 callers
Method
location
Returns the [Location] wrapped by the [Pointer].
src/pointer.rs:39
↓ 29 callers
Method
insert
Inserts a change into the overlay state. Multiple changes to the same path will keep the latest value.
src/overlay.rs:44
↓ 29 callers
Method
iter
Returns an iterator that yields the IDs of orphan pages.
src/meta/mod.rs:639
↓ 29 callers
Method
push
(&mut self, position: TriePosition<'a>, overlay: OverlayState)
src/storage/overlay_root.rs:62
↓ 26 callers
Method
get_cell_pointer
Returns the cell pointer at the given index.
src/page/slotted_page.rs:76
↓ 25 callers
Method
get
(&self, index: usize)
src/path.rs:80
↓ 25 callers
Method
orphan_pages
(&mut self)
src/meta/mod.rs:602
↓ 24 callers
Method
cell_index
Returns the cell index of the cell if the location is for a cell on the same page, otherwise returns `None`.
src/location.rs:35
↓ 24 callers
Method
write_context
Returns a [`TransactionContext`] valid for writes. The returned context points to the latest uncommitted snapshot.
src/storage/engine/engine.rs:64
↓ 23 callers
Function
compare_overlay_with_committed_root
( db: &Database, context: &mut TransactionContext, overlay: &OverlayState, )
src/storage/overlay_root.rs:614
↓ 22 callers
Method
set_account
( &mut self, address_path: AddressPath, account: Option<Account>, )
src/transaction.rs:155
↓ 21 callers
Method
get_page
Retrieves a read-only [Page] from the underlying [PageManager].
src/storage/engine/page_ops.rs:76
↓ 21 callers
Method
prefix
(&self)
src/page/subtrie_page.rs:78
↓ 20 callers
Method
page_id
(&self)
src/meta/mod.rs:360
↓ 19 callers
Method
begin_rw
(&self)
src/database.rs:231
↓ 19 callers
Function
unpack
()
src/path.rs:419
↓ 18 callers
Method
delete_value
Deletes the value at the given index.
src/page/slotted_page.rs:219
↓ 17 callers
Function
generate_random_address
(rng: &mut StdRng)
benches/benchmark_common.rs:16
↓ 17 callers
Method
kind
(&self)
src/node.rs:147
↓ 17 callers
Method
serialize
Serialize this value into a buffer
src/storage/value.rs:23
↓ 16 callers
Method
get
(&self)
src/executor/futures.rs:71
↓ 16 callers
Method
set_value
Sets the value at the given index.
src/page/slotted_page.rs:171
↓ 15 callers
Method
allocate_page
Allocates a new page from the underlying page manager. If there is an orphaned page available as of the given [SnapshotId], it is reused instead of a
src/storage/engine/page_ops.rs:26
↓ 15 callers
Function
assert_metrics
( context: &TransactionContext, pages_read: u32, pages_allocated: u32, pages_reallocated: u32,
src/storage/test_utils.rs:33
↓ 15 callers
Method
begin_ro
(&self)
src/database.rs:227
↓ 15 callers
Method
to_rlp_node
Returns the embedded RLP encoding of the [Node]. This will typically be a 33 byte prefixed keccak256 hash.
src/node.rs:284
↓ 14 callers
Method
contents
(&self)
src/page/page.rs:111
↓ 14 callers
Method
contents_mut
(&mut self)
src/page/page.rs:266
↓ 14 callers
Method
get_storage
Retrieves a [StorageValue] from the storage engine, identified by the given [StoragePath]. Returns [None] if the path is not found.
src/storage/engine/read.rs:44
↓ 14 callers
Method
len
Returns the number of changes in the overlay.
src/overlay.rs:60
↓ 14 callers
Method
push
Adds a page to the orphan page list, increasing the capacity of the list if necessary.
src/meta/mod.rs:646
↓ 13 callers
Method
allocate
Adds a new page. Returns an error if the memory map is not large enough.
src/page/manager/mmap.rs:227
↓ 13 callers
Function
get_base_database
( fallback_eoa_size: usize, fallback_contract_size: usize, fallback_storage_per_contract: usize, )
benches/benchmark_common.rs:37
↓ 13 callers
Method
num_cells
Returns the number of cells in the page, which may include deleted cells.
src/page/slotted_page.rs:87
↓ 13 callers
Method
push
(&mut self, nibble: u8)
src/path.rs:99
↓ 13 callers
Method
rlp
Returns the [RlpNode] wrapped by the [Pointer].
src/pointer.rs:34
↓ 13 callers
Method
update_stats
(&mut self, new_val: usize)
src/storage/debug.rs:45
↓ 12 callers
Method
nibbles
(&self)
src/path.rs:64
↓ 12 callers
Function
test_account
()
src/overlay.rs:347
↓ 11 callers
Function
copy_files
(from: &BaseDatabase, to: &Path)
benches/crud_benchmarks.rs:47
↓ 11 callers
Method
is_deleted
Returns true if the cell pointer is deleted (all bytes are 0).
src/page/slotted_page/cell_pointer.rs:43
↓ 11 callers
Method
length
Returns the length of the cell pointer, derived from the last 12 bits.
src/page/slotted_page/cell_pointer.rs:38
↓ 10 callers
Method
load
(&self)
src/page/state.rs:68
↓ 10 callers
Function
node_location
Calculates the appropriate location for a node given its page and index. If the node is at index 0 (root of the page), returns a page-based location.
src/storage/engine/helpers.rs:20
↓ 10 callers
Method
offset
Returns the offset of the cell pointer (0-4095), derived from the first 12 bits.
src/page/slotted_page/cell_pointer.rs:33
↓ 10 callers
Method
pack
(&self)
src/path.rs:148
↓ 10 callers
Method
remove_tx
Removes a transaction from the list of open transactions
src/transaction/manager.rs:40
↓ 10 callers
Method
set_storage_slot
( &mut self, storage_path: StoragePath, value: Option<StorageValue>, )
src/transaction.rs:164
↓ 9 callers
Method
active_slot
(&self)
src/meta/mod.rs:422
↓ 9 callers
Method
add_overlay_to_root_builder
(&self, root_builder: &mut RootBuilder, overlay: &OverlayState)
src/storage/overlay_root.rs:530
↓ 9 callers
Method
encode
(&self, out: &mut dyn BufMut)
src/node.rs:557
↓ 9 callers
Method
get_account
( &mut self, address_path: &AddressPath, )
src/transaction.rs:63
↓ 9 callers
Method
open
Opens the database file at the given path.
src/database.rs:105
↓ 9 callers
Method
set_values_in_cloned_page
Applies a set of changes to a cloned page in the trie. This method is the core of the trie modification logic. It handles four main cases: ## Case 1
src/storage/engine/write.rs:161
↓ 9 callers
Method
size
Returns the total number of pages in the storage engine.
src/storage/engine/engine.rs:76
↓ 9 callers
Method
sub_slice
Creates a zero-copy sub-slice of the overlay from the given range. This is useful for recursive traversal where we want to pass a subset of changes to
src/overlay.rs:273
↓ 9 callers
Method
sub_slice_by_prefix
Partitions the overlay into three slices: - before: all changes before the prefix - with_prefix: all changes with the prefix - after: all changes afte
src/overlay.rs:290
↓ 8 callers
Method
as_u32
(&self)
src/page.rs:98
↓ 8 callers
Method
cell_pointers_iter
(&self)
src/page/slotted_page.rs:91
↓ 8 callers
Method
commit
Commits all outstanding data to disk.
src/storage/engine/page_ops.rs:53
↓ 8 callers
Method
split_page
Splits the page into two, moving the largest immediate subtrie of the root node to a new child page. This is called when a page doesn't have enough s
src/storage/engine/page_ops.rs:145
↓ 7 callers
Method
compute_state_root_with_overlay
( &self, context: &TransactionContext, overlay: OverlayState, )
src/storage/overlay_root.rs:131
↓ 7 callers
Method
get_page
Helper function to get a page from the page manager.
src/storage/debug.rs:775
↓ 7 callers
Method
get_slotted_page_and_index
Helper function to get a slotted page and index from a pointer.
src/storage/debug.rs:757
↓ 7 callers
Method
get_unchecked
(&self, index: usize)
src/path.rs:88
↓ 7 callers
Method
read_context
Returns a [`TransactionContext`] valid for reads. The returned context points to the latest committed snapshot.
src/storage/engine/engine.rs:55
↓ 7 callers
Method
remove
Removes the key-value pair associated with the key. # Panics Panics if the key is not 64 bytes long.
src/context.rs:47
↓ 7 callers
Method
size
(&self)
src/node.rs:333
↓ 7 callers
Method
store
(&self, new: PageState)
src/page/state.rs:100
↓ 7 callers
Method
truncate
(&mut self, new_len: usize)
src/path.rs:142
↓ 7 callers
Method
value
(&self)
src/page/subtrie_page.rs:86
↓ 7 callers
Method
wait
(&self)
src/executor/futures.rs:92
↓ 6 callers
Method
begin_ro
(&mut self, snapshot_id: SnapshotId)
src/transaction/manager.rs:35
↓ 6 callers
Method
common_prefix_length
(&self, other: &RawPath)
src/path.rs:133
↓ 6 callers
Method
debugger
Returns a StorageDebugger for examining the internal structure of the storage engine.
src/storage/engine/engine.rs:81
↓ 6 callers
Method
effective_slice
Returns the effective slice of data for this overlay, respecting bounds.
src/overlay.rs:151
↓ 6 callers
Method
enumerate_children
Enumerates the children of the [Node].
src/node.rs:171
↓ 6 callers
Method
get_mut_page
Retrieves a mutable [Page] from the underlying [PageManager].
src/storage/engine/page_ops.rs:65
next →
1–100 of 627, ranked by callers