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
↓ 2 callers
Method
push_overlay
(&mut self, overlay: OverlayState)
src/storage/overlay_root.rs:58
↓ 2 callers
Method
push_within_capacity
Adds a page to the orphan page list if there is enough capacity.
src/meta/mod.rs:656
↓ 2 callers
Function
random_accounts
(count: usize)
src/database.rs:493
↓ 2 callers
Function
random_push_pop_cycle
( manager: &mut MetadataManager, expected: &mut HashSet<OrphanPage>, next_
src/meta/mod.rs:797
↓ 2 callers
Method
remap
Changes the size of the memory map. # Safety `new_len` must be within the size of `self.file`.
src/meta/mod.rs:493
↓ 2 callers
Method
set_page_count
(&mut self, page_count: u32)
src/meta/mod.rs:202
↓ 2 callers
Method
set_root_node_hash
(&mut self, root_node_hash: B256)
src/meta/mod.rs:188
↓ 2 callers
Method
set_root_node_page_id
(&mut self, root_node_page_id: Option<PageId>)
src/meta/mod.rs:194
↓ 2 callers
Method
set_snapshot_id
(&mut self, snapshot_id: SnapshotId)
src/meta/mod.rs:171
↓ 2 callers
Method
size_incr_with_new_child
Returns the size of the [Node] if a new child were to be added.
src/node.rs:294
↓ 2 callers
Method
sync
Syncs pages to the backing file.
src/page/manager/mmap.rs:269
↓ 2 callers
Method
take_pages_read
(&self)
src/metrics.rs:68
↓ 2 callers
Method
try_get
(&self)
src/executor/futures.rs:79
↓ 2 callers
Method
try_poison
(&self)
src/executor/futures.rs:59
↓ 2 callers
Method
unlock
Unlocks any orphaned pages as of the given [SnapshotId] for reuse.
src/storage/engine/engine.rs:71
↓ 2 callers
Method
update_metrics_ro
(&self, context: &TransactionContext)
src/database.rs:243
↓ 2 callers
Function
verify_storage_proof
(proof: &StorageProof, root: B256)
src/storage/proofs.rs:348
↓ 2 callers
Method
wrap
Wraps the given `file` with the options specified by `self`. If `.wrap()` is called, `.create()` and `.create_new()` are ignored.
src/page/manager/options.rs:81
↓ 1 callers
Method
as_usize
(&self)
src/page.rs:105
↓ 1 callers
Function
check_orphans
(manager: &mut MetadataManager, expected: &HashSet<OrphanPage>)
src/meta/mod.rs:818
↓ 1 callers
Function
check_orphans_from_file
(f: &File, expected: &HashSet<OrphanPage>)
src/meta/mod.rs:838
↓ 1 callers
Method
clear
Removes all elements from the map.
src/context.rs:52
↓ 1 callers
Method
clear_cache
(&mut self)
src/context.rs:88
↓ 1 callers
Method
close
Saves the metadata to the storage device and closes the metadata file.
src/meta/mod.rs:596
↓ 1 callers
Method
compact_orphans
(&mut self)
src/meta/mod.rs:520
↓ 1 callers
Method
compute_root_with_overlay
( &self, overlay_state: OverlayState, )
src/transaction.rs:87
↓ 1 callers
Function
consistency_check
( db_path: &str, output_path: Option<String>, )
cli/src/main.rs:326
↓ 1 callers
Method
consistency_check
( &self, buf: impl io::Write, file_path: impl AsRef<Path>, )
src/database.rs:212
↓ 1 callers
Method
consistency_check
Traverses the trie from the given root node page id and returns a list of all reachable PageIds. This method performs several consistency checks: - V
src/storage/debug.rs:605
↓ 1 callers
Method
consistency_check_helper
Recursive helper for consistency checking.
src/storage/debug.rs:632
↓ 1 callers
Method
contains_prefix_of
(&self, path: &RawPath)
src/overlay.rs:334
↓ 1 callers
Function
count_subtrie_nodes
Counts the number of nodes in a subtrie rooted at the given index. This is used during page splitting to determine which subtrie is largest and shoul
src/storage/engine/helpers.rs:82
↓ 1 callers
Method
create_first_storage_node
Creates the first storage node for an account. This is called when an account has no storage trie yet and we need to create the first storage slot.
src/storage/engine/handlers.rs:613
↓ 1 callers
Method
database_consistency_check
This check verifies: 1. All pages are correctly classified as reachable, orphaned, or unreachable 2. No pages are both reachable and orphaned (data in
src/storage/debug.rs:511
↓ 1 callers
Method
debug_account
( &self, output_file: impl std::io::Write, address_path: AddressPath, verbosit
src/transaction.rs:125
↓ 1 callers
Method
debug_statistics
Computes and prints various statistics about the trie structure.
src/storage/debug.rs:378
↓ 1 callers
Method
debug_statistics_helper
Recursive helper for computing trie statistics.
src/storage/debug.rs:405
↓ 1 callers
Method
debug_storage
( &self, output_file: Box<dyn std::io::Write>, storage_path: StoragePath, verb
src/transaction.rs:139
↓ 1 callers
Method
defer
(&self, f: F)
src/executor/inline.rs:9
↓ 1 callers
Method
delete_subtrie
Recursively deletes a subtrie from the page, orphaning any pages that become fully unreferenced as a result. This is used when deleting an account wi
src/storage/engine/page_ops.rs:204
↓ 1 callers
Method
downcast
Transitions the page state from *dirty* to *occupied*, and returns an immutable reference to the page.
src/page/page.rs:284
↓ 1 callers
Function
duplicate_file
(mut f: &File)
src/meta/mod.rs:827
↓ 1 callers
Method
encode_account
(&self, account: &Account)
src/storage/overlay_root.rs:570
↓ 1 callers
Method
encode_account_with_root
(&self, account: &Account, root: B256)
src/storage/overlay_root.rs:581
↓ 1 callers
Method
encode_storage
(&self, storage_value: &U256)
src/storage/overlay_root.rs:592
↓ 1 callers
Method
eq
(&self, other: &u32)
src/page.rs:153
↓ 1 callers
Method
fetch_update
( &self, mut f: impl FnMut(PageState) -> Option<PageState>, )
src/page/state.rs:117
↓ 1 callers
Method
find_available_slot
Finds a free space with length in the page. Returns slotted page offset if found.
src/page/slotted_page.rs:342
↓ 1 callers
Method
find_available_slot_in_remaining_space
( &self, index: u8, length: u16, )
src/page/slotted_page.rs:382
↓ 1 callers
Method
find_available_slot_in_used_space
( &self, index: u8, length: u16, )
src/page/slotted_page.rs:349
↓ 1 callers
Function
find_shortest_common_prefix
Finds the index of the change with the shortest common prefix shared with the node. This function is critical for determining how to navigate the tri
src/storage/engine/helpers.rs:44
↓ 1 callers
Method
get_account_with_proof
( &self, address_path: AddressPath, )
src/transaction.rs:97
↓ 1 callers
Method
get_address
Returns the [ADDRESS_PATH_LENGTH] nibble address portion of the storage path.
src/path.rs:376
↓ 1 callers
Method
get_dirty_pages
Returns all pages that are currently in the Dirty state. This method scans all allocated pages and returns those that are currently being written to
src/storage/debug.rs:741
↓ 1 callers
Method
get_pages_allocated
(&self)
src/metrics.rs:100
↓ 1 callers
Method
get_pages_read
(&self)
src/metrics.rs:90
↓ 1 callers
Method
get_pages_reallocated
(&self)
src/metrics.rs:105
↓ 1 callers
Method
get_pages_split
(&self)
src/metrics.rs:95
↓ 1 callers
Method
get_slot_offset
(&self)
src/path.rs:380
↓ 1 callers
Method
get_storage_with_proof
( &self, storage_path: StoragePath, )
src/transaction.rs:109
↓ 1 callers
Function
get_trie_value
( db_path: &str, identifier: &str, output_path: Option<String>, verbosity_level: u8, )
cli/src/main.rs:238
↓ 1 callers
Method
get_value_with_proof_from_page
Retrieves a [TrieValue] from the given page or any of its descendants. Returns [None] if the path is not found.
src/storage/proofs.rs:86
↓ 1 callers
Method
grow
Grows the size of the underlying file to make room for additional pages. This will increase the file size by a constant factor of 1024 pages, or a re
src/page/manager/mmap.rs:126
↓ 1 callers
Method
grow
Doubles the size of the metadata file.
src/meta/mod.rs:508
↓ 1 callers
Method
grow_if_needed
(&self, min_len: u64)
src/page/manager/mmap.rs:142
↓ 1 callers
Method
handle_account_node_traversal
Handles traversal through an account leaf node with a child pointer. This is used when we're accessing storage for an account - we need to traverse i
src/storage/engine/handlers.rs:536
↓ 1 callers
Method
handle_branch_node_cleanup
Handles cleanup of branch nodes (deletion or merging). After modifications, a branch node may need cleanup: - If it has no children, delete it - If i
src/storage/engine/handlers.rs:282
↓ 1 callers
Method
handle_branch_node_traversal
Handles traversal through a branch node. Partitions changes by which child they should go to (based on the next nibble in their path), then recursive
src/storage/engine/handlers.rs:85
↓ 1 callers
Method
handle_child_node_traversal
Handles traversal to a specific child of a branch node.
src/storage/engine/handlers.rs:137
↓ 1 callers
Method
handle_exact_prefix_match
Handles the case when the path matches the node prefix exactly. This handles updating or deleting the value at the current node.
src/storage/engine/handlers.rs:430
↓ 1 callers
Method
handle_missing_parent_branch
Handles the case when the path does not match the node prefix. This creates a new branch node as the parent of the current node, with children pointi
src/storage/engine/handlers.rs:35
↓ 1 callers
Function
identifier_to_trie_value_path
( identifier: &TrieValueIdentifier, )
cli/src/main.rs:151
↓ 1 callers
Method
inc_cache_storage_read_hit
Increment the cache storage read hit
src/metrics.rs:59
↓ 1 callers
Method
inc_cache_storage_read_miss
Increment the cache storage read miss
src/metrics.rs:64
↓ 1 callers
Method
inc_pages_allocated
(&self)
src/metrics.rs:50
↓ 1 callers
Method
inc_pages_reallocated
(&self)
src/metrics.rs:54
↓ 1 callers
Method
inc_pages_split
(&self)
src/metrics.rs:46
↓ 1 callers
Method
inc_snapshot_id
(&mut self)
src/meta/mod.rs:181
↓ 1 callers
Method
initialize_empty_trie
Handles the case when the trie is empty and we need to insert the first node.
src/storage/engine/write.rs:267
↓ 1 callers
Method
into_kind
(self)
src/node.rs:151
↓ 1 callers
Method
is_branch
Returns whether the [Node] is a branch.
src/node.rs:166
↓ 1 callers
Method
is_dirty
Checks if a page is currently in the Dirty state. This method allows checking if a page is being written to without the overhead of acquiring the pag
src/page/manager/mmap.rs:253
↓ 1 callers
Method
is_hash
Returns true if the contained [RlpNode] is a hash. This will be true in most cases, but not for pointers to storage leaf nodes with a small combined p
src/pointer.rs:49
↓ 1 callers
Method
latest_slot_index
Returns the index of the most up-to-date and consistent metadata slot.
src/meta/mod.rs:306
↓ 1 callers
Method
lower_64_nibbles
(&self)
src/path.rs:182
↓ 1 callers
Method
max_pages
Sets the maximum number of pages that can be allocated.
src/database.rs:89
↓ 1 callers
Method
merge_branch_with_only_child
Merges a branch node with its only child. When a branch has only one child remaining, we can merge them by: 1. Combining their prefixes 2. Replacing
src/storage/engine/handlers.rs:317
↓ 1 callers
Method
merge_with_child_on_different_page
Handles merging a branch with a child on a different page. Reads fresh child node data to avoid stale child pointers.
src/storage/engine/handlers.rs:384
↓ 1 callers
Method
merge_with_child_on_same_page
Handles merging a branch with a child on the same page.
src/storage/engine/handlers.rs:357
↓ 1 callers
Method
meta_path
Specifies the path of the metadata file. By default, the metadata file path is generated by appending `".meta"` to the database file path.
src/database.rs:83
↓ 1 callers
Method
min_snapshot_id
(&self)
src/transaction/manager.rs:21
↓ 1 callers
Function
move_subtrie_nodes
Moves an entire subtrie from one page to another. This function recursively moves all nodes in a subtrie from the source page to the target page, upd
src/storage/engine/helpers.rs:111
↓ 1 callers
Method
next_page_id
Increments the page count and returns the ID for a new page at the end of the file, along with the new page count.
src/page/manager/mmap.rs:173
↓ 1 callers
Method
nibbles_mut
(&mut self)
src/path.rs:69
↓ 1 callers
Method
num_dead_bytes
(&self, num_cells: u8)
src/page/slotted_page.rs:110
↓ 1 callers
Method
num_threads
Sets the maximum number of threads used to CPU-intensive computations (like hashing). By default, the number of threads is selected automatically bas
src/database.rs:99
↓ 1 callers
Method
open
(path: impl AsRef<Path>)
src/page/manager/mmap.rs:31
↓ 1 callers
Method
orphaned_at
(&self)
src/meta/mod.rs:369
↓ 1 callers
Method
page_id
Returns the [PageId] of the page if the location is for a page, otherwise returns `None`.
src/location.rs:25
↓ 1 callers
Function
parse_trie_value_identifier
( identifier: &str, )
cli/src/main.rs:116
← previous
next →
201–300 of 627, ranked by callers