Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LayerZero-Labs/qmdb
/ functions
Functions
1,374 in github.com/LayerZero-Labs/qmdb
⨍
Functions
1,374
◇
Types & classes
185
↓ 702 callers
Function
new
Creates a new ring buffer channel with a specified size and initial value. # Arguments `size` - Number of items to pre-allocate in the channel `t` -
crates/qmdb/src/utils/ringchannel.rs:42
↓ 209 callers
Method
clone
(&self)
crates/hpfile/src/aligned_buf.rs:258
↓ 120 callers
Method
iter
(&self)
crates/qmdb-common/src/utils/simplemap.rs:224
↓ 120 callers
Method
len
(&self)
crates/qmdb/src/indexer/memidx.rs:61
↓ 99 callers
Method
as_ref
(&self)
crates/qmdb-common/src/utils/hasher.rs:27
↓ 77 callers
Method
insert
Inserts a cache position for a given key. # Arguments `cache_key` - The key to associate with the position `cache_pos` - The position value to store
crates/qmdb/src/utils/bytescache.rs:140
↓ 64 callers
Method
as_bytes
(&self)
crates/qmdb-common/src/utils/hasher.rs:31
↓ 64 callers
Method
len
(&self)
crates/hpfile/src/aligned_buf.rs:109
↓ 61 callers
Function
new
(start: i64, buf_margin: usize)
crates/qmdb/src/entryfile/entrybuffer.rs:105
↓ 54 callers
Method
as_slice
(&self)
crates/qmdb-common/src/entryfile/readbuf.rs:23
↓ 48 callers
Method
get
Retrieves the element at the specified index. # Arguments `idx` - The index of the element to retrieve. # Returns The element at the specified ind
crates/qmdb/src/utils/shortlist.rs:114
↓ 47 callers
Function
merkle_node_hash
(children_level: u8, left: T, right: T)
crates/qmdb-common/src/merkletree/hash.rs:18
↓ 46 callers
Method
extend_from_slice
(&mut self, other: &[u8])
crates/qmdb-common/src/entryfile/readbuf.rs:37
↓ 44 callers
Method
add_kv
(&mut self, k_in: u64, v_in: i64)
crates/qmdb/src/indexer/hybrid/overlay.rs:31
↓ 41 callers
Method
enumerate
Returns an iterator over the list's elements. # Returns An iterator that yields pairs of (index, value) for each element.
crates/qmdb/src/utils/shortlist.rs:183
↓ 40 callers
Method
insert
Insert a value with the given ID. If the slot is occupied by a different ID, the array will be resized. # Note Write operations should be externall
crates/hpfile/src/file_slots.rs:269
↓ 36 callers
Method
len
(&self)
crates/qmdb/src/merkletree/singleproof.rs:42
↓ 34 callers
Method
append
Append a new element and updates 'offsets_idx' When 'offsets_idx' changes, fill a offset of 'elements' into 'offsets'
crates/qmdb/src/indexer/kvlist.rs:254
↓ 34 callers
Function
entry_key_hash
Computes the hash for a key, excluding null and sentry entries.
crates/qmdb-common/src/entryfile/entry.rs:328
↓ 32 callers
Method
clear
Removes all elements from the list. After calling this method, the list will be empty but retain its current storage mode (Array or Vector).
crates/qmdb/src/utils/shortlist.rs:167
↓ 32 callers
Method
send
(self, value: usize)
crates/qmdb/src/entryfile/uring_reader.rs:49
↓ 32 callers
Method
to_vec
Reconstructs the full array from the diff representation. This method expands the compressed diff format back into a full array containing all elemen
crates/qmdb-common/src/merkletree/diffmap.rs:149
↓ 30 callers
Method
is_empty
(&self)
crates/qmdb/src/indexer/kvlist.rs:99
↓ 29 callers
Function
to_k80
(k: &[u8])
crates/qmdb/src/indexer/hybrid/mod.rs:382
↓ 28 callers
Method
read
(&self, key: &[u8], out: &mut ReadBuf)
crates/qmdb/src/seqads.rs:97
↓ 27 callers
Method
add_op
Adds an operation without an old value. # Arguments `op_type` - Type of operation (create, read, write, delete) `shard_id` - ID of the shard this op
crates/qmdb-common/src/utils/changeset.rs:426
↓ 26 callers
Method
len
Returns the total length of the serialized entry.
crates/qmdb-common/src/entryfile/entry.rs:436
↓ 25 callers
Method
store
(&self, id: i64, value: Arc<T>)
crates/hpfile/src/file_slots.rs:146
↓ 23 callers
Method
as_entry_bz
(&self)
crates/qmdb-common/src/entryfile/readbuf.rs:31
↓ 23 callers
Function
byte0_to_shard_id
Maps a byte value to a shard ID. This function distributes keys across shards by mapping the first byte of a key to a shard ID. The mapping ensures a
crates/qmdb-common/src/utils/mod.rs:61
↓ 23 callers
Method
serial_number
Returns the serial number of this entry.
crates/qmdb-common/src/entryfile/entry.rs:533
↓ 22 callers
Method
remove
Removes the integer `value` from the set. # Arguments `value` - The integer to remove from the set. # Returns `true` if the integer was present in
crates/qmdb/src/utils/intset.rs:156
↓ 21 callers
Method
get_mut
(&mut self, key: &K)
crates/qmdb-common/src/utils/simplemap.rs:170
↓ 20 callers
Method
sort
Sorts operations by shard ID, key hash, and operation type. This method also updates the shard start indices and operation counts.
crates/qmdb-common/src/utils/changeset.rs:451
↓ 19 callers
Method
as_ptr
(&self)
crates/hpfile/src/aligned_buf.rs:139
↓ 19 callers
Method
is_empty
Returns whether this `HPFile` is empty.
crates/hpfile/src/lib.rs:138
↓ 19 callers
Method
read
Submits a read request and waits for completion (async version for tokio tasks). # Returns - `Ok(0)`: Error (I/O failure or insufficient bytes for he
crates/qmdb/src/entryfile/uring_reader.rs:269
↓ 19 callers
Method
write
Writes a batch of operations (corresponding to one transaction). # Important - Each key should appear at most once in the batch (later inserts overw
crates/qmdb/src/seqads.rs:126
↓ 18 callers
Method
contains
Checks if the list contains a specific element. # Arguments `elem` - The element to search for. # Returns `true` if the element is found in the li
crates/qmdb/src/utils/shortlist.rs:80
↓ 18 callers
Method
write
(&mut self, buf: &[u8])
crates/qmdb/src/indexer/hybrid/tempfile.rs:41
↓ 17 callers
Method
append
(&mut self, elem: i64)
crates/qmdb-common/src/indexer/utils/poslist.rs:43
↓ 17 callers
Function
get_shard_idx_and_key
Calculates the shard index and key for a given twig ID This function is used for sharding twig data across multiple storage locations to improve conc
crates/qmdb/src/merkletree/tree.rs:1143
↓ 17 callers
Method
get_uint32
(&mut self)
crates/qmdb/src/test_helper/randsrc.rs:117
↓ 17 callers
Method
len
(&self)
crates/qmdb-common/src/utils/simplemap.rs:184
↓ 17 callers
Method
read_entry
(&self, file_pos: i64, buf: &mut ReadBuf)
crates/qmdb/src/entryfile/entryfile.rs:278
↓ 16 callers
Method
add
( buf: &mut Vec<u8>, op_type: u8, key_hash: &[u8; 32], key: &[u8], val
crates/qmdb-common/src/utils/changeset.rs:57
↓ 16 callers
Method
append
(&mut self, entry: &Entry, deactived_serial_num_list: &[u64])
crates/qmdb/src/entryfile/entrybuffer.rs:65
↓ 16 callers
Function
entry_to_bytes
Serializes an entry to bytes for testing purposes. This is a convenience function that combines entry serialization with buffer management for testin
crates/qmdb-common/src/entryfile/entry.rs:378
↓ 16 callers
Method
get_bits
Gets a slice of bytes for a specific page (for hashing) # Arguments `page_num` - The page number to get `page_size` - The size of each page in bytes
crates/qmdb-common/src/merkletree/activebits.rs:81
↓ 16 callers
Method
get_change_sets
(&self)
crates/qmdb/src/tasks/helpers.rs:30
↓ 16 callers
Function
join_task_id
(height: i64, idx: usize, end_block: bool)
crates/qmdb-common/src/task/taskid.rs:62
↓ 16 callers
Method
set
(&self, n: usize)
crates/qmdb/src/utils/activebits.rs:32
↓ 15 callers
Function
assert_zero
(tree: &Tree, pos: tree::NodePos)
crates/qmdb/tests/test_tree.rs:591
↓ 15 callers
Function
create_temp_file
()
crates/hpfile/src/file_slots.rs:650
↓ 15 callers
Method
for_each_op
(&self, mut access: F)
crates/qmdb-common/src/utils/changeset.rs:489
↓ 15 callers
Method
log_sample
(&mut self, sample_name: &str, value: f64)
bench/src/speed/results.rs:221
↓ 15 callers
Method
read_at
Read data from file at `offset` to fill `bz` # Parameters - `offset`: the start position of a byteslice that was written before # Returns A `Resul
crates/hpfile/src/lib.rs:450
↓ 14 callers
Method
dump
Serializes this entry into the provided buffer. # Arguments `b` - The buffer to write the serialized entry to. `deactived_sn_list` - List of deactiv
crates/qmdb-common/src/entryfile/entry.rs:131
↓ 14 callers
Method
get_node
(&self, pos: NodePos)
crates/qmdb/src/merkletree/tree.rs:262
↓ 14 callers
Method
key
Returns a reference to the key bytes of this entry.
crates/qmdb-common/src/entryfile/entry.rs:481
↓ 14 callers
Method
key_hash
(&self, buf: &'a [u8])
crates/qmdb-common/src/utils/changeset.rs:142
↓ 14 callers
Method
next_key_hash
Returns a reference to the next key hash bytes.
crates/qmdb-common/src/entryfile/entry.rs:505
↓ 13 callers
Method
append
Append a byteslice to the file. This byteslice may be temporarily held in `buffer` before flushing. # Parameters - `bz`: the byteslice to append. It
crates/hpfile/src/lib.rs:650
↓ 13 callers
Method
get
(&self, id: i64)
crates/hpfile/src/file_slots.rs:229
↓ 13 callers
Method
get
(&self, key: K)
bench/src/speed/rocksdb.rs:69
↓ 13 callers
Method
is_empty
(&self)
crates/qmdb/src/merkletree/tree.rs:215
↓ 13 callers
Method
len
(&self)
crates/qmdb/src/indexer/hybrid/ref_unit.rs:49
↓ 12 callers
Method
for_each_adjacent_value
( &mut self, height: i64, warmup: bool, k: u64, k80: &[u8; 10],
crates/qmdb/src/indexer/hybrid/unit.rs:236
↓ 12 callers
Method
read_at
(&self, buf: &mut [u8], off: u64)
crates/qmdb/src/indexer/hybrid/tempfile.rs:34
↓ 12 callers
Function
split_task_id
(mut task_id: i64)
crates/qmdb-common/src/task/taskid.rs:50
↓ 11 callers
Method
clear
(&mut self)
crates/qmdb/src/indexer/hybrid/overlay.rs:104
↓ 11 callers
Method
insert
(&mut self, key: K, value: V)
crates/qmdb-common/src/utils/simplemap.rs:123
↓ 11 callers
Method
len
(&self)
crates/qmdb-common/src/merkletree/singleproof.rs:42
↓ 11 callers
Method
resize
(&mut self, size: usize)
crates/qmdb-common/src/entryfile/readbuf.rs:61
↓ 11 callers
Method
set_bit
Sets a bit to active (1) at the specified offset # Arguments `offset` - The bit position to set (0-2047) # Panics Panics if offset is greater than L
crates/qmdb-common/src/merkletree/activebits.rs:25
↓ 11 callers
Method
sync_mt_for_youngest_twig
Synchronizes the Merkle tree for the youngest twig # Arguments `recover_mode` - Whether to run in recovery mode
crates/qmdb/src/merkletree/tree.rs:918
↓ 10 callers
Method
build
(&self)
crates/qmdb-common/src/entryfile/helpers.rs:38
↓ 10 callers
Method
debug_get_kv
(&self, k_in: u64)
crates/qmdb/src/indexer/memidx.rs:443
↓ 10 callers
Method
end_block
(&mut self)
crates/qmdb/src/seqads.rs:155
↓ 10 callers
Method
fill
Fills a buffer with the provided bytes and returns its position. This method handles buffer allocation and management automatically, creating new buf
crates/qmdb/src/utils/bytescache.rs:156
↓ 10 callers
Function
get_null_twig_box
()
crates/qmdb-common/src/merkletree/twig.rs:25
↓ 10 callers
Method
get_serialized_len
Calculates the total serialized length of this entry. # Arguments `deactived_sn_count` - Number of deactivated serial numbers to include. # Returns
crates/qmdb-common/src/entryfile/entry.rs:112
↓ 10 callers
Method
largest_id
(&self)
crates/hpfile/src/file_slots.rs:245
↓ 10 callers
Function
new_test_entry
Creates a new test entry.
crates/qmdb/src/updater.rs:1209
↓ 10 callers
Function
new_updater
Creates a new Updater instance for testing. # Arguments `prefix` - Prefix for temporary directory name # Returns A tuple containing: - Temporary dir
crates/qmdb/src/updater.rs:1167
↓ 10 callers
Method
next
(&mut self, overlay: &Overlay)
crates/qmdb/src/indexer/hybrid/file_reader.rs:70
↓ 10 callers
Method
value
(&self)
crates/qmdb-common/src/utils/hasher.rs:39
↓ 9 callers
Method
append
Appends a new element to the list if it's not already present. If the list is in array mode and adding the element would exceed the array capacity (2
crates/qmdb/src/utils/shortlist.rs:135
↓ 9 callers
Function
get_u128
16b-idx, 64b-k, 48b-v
crates/qmdb/src/indexer/hybrid/ref_unit.rs:13
↓ 9 callers
Method
next
Advances the LFSR by one step and returns the new state. This method: 1. Checks if the lowest bit is set 2. If set, XORs the state with the tap posit
crates/qmdb/src/utils/lfsr.rs:131
↓ 9 callers
Method
nth
Returns the node index at this level
crates/qmdb/src/merkletree/tree.rs:105
↓ 9 callers
Method
remove
Remove a value from the slot.
crates/hpfile/src/file_slots.rs:346
↓ 9 callers
Method
sync_l1
Synchronizes a level 1 (level 8 if seeing the tree from the left) node in the active bits Merkle tree # Arguments `pos` - Position of the node to syn
crates/qmdb-common/src/merkletree/twig.rs:123
↓ 9 callers
Method
sync_upper_nodes
( &mut self, mut n_list: Vec<u64>, youngest_twig_id: u64, )
crates/qmdb/src/merkletree/tree.rs:358
↓ 8 callers
Method
add_task
Adds a task to be processed. # Arguments `task_id` - ID of the task to add
crates/qmdb/src/lib.rs:837
↓ 8 callers
Method
append
(&self, e: &EntryBz, tmp: &mut Vec<u8>, buffer: &mut Vec<u8>)
crates/qmdb/src/entryfile/entryfile.rs:316
↓ 8 callers
Method
as_mut_ptr
(&mut self)
crates/hpfile/src/aligned_buf.rs:145
↓ 8 callers
Method
build_and_dump
(&self, dsn_list: &[u64])
crates/qmdb-common/src/entryfile/helpers.rs:48
↓ 8 callers
Function
check_mt
Verifies the consistency of a Merkle tree within a twig This function checks that each parent node correctly hashes its children throughout the tree,
crates/qmdb/src/merkletree/check.rs:38
↓ 8 callers
Method
clear
(&self)
crates/qmdb/src/entryfile/entrycache.rs:27
next →
1–100 of 1,374, ranked by callers