MCPcopy Create free account

hub / github.com/LayerZero-Labs/qmdb / functions

Functions1,374 in github.com/LayerZero-Labs/qmdb

↓ 702 callersFunctionnew
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 callersMethodclone
(&self)
crates/hpfile/src/aligned_buf.rs:258
↓ 120 callersMethoditer
(&self)
crates/qmdb-common/src/utils/simplemap.rs:224
↓ 120 callersMethodlen
(&self)
crates/qmdb/src/indexer/memidx.rs:61
↓ 99 callersMethodas_ref
(&self)
crates/qmdb-common/src/utils/hasher.rs:27
↓ 77 callersMethodinsert
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 callersMethodas_bytes
(&self)
crates/qmdb-common/src/utils/hasher.rs:31
↓ 64 callersMethodlen
(&self)
crates/hpfile/src/aligned_buf.rs:109
↓ 61 callersFunctionnew
(start: i64, buf_margin: usize)
crates/qmdb/src/entryfile/entrybuffer.rs:105
↓ 54 callersMethodas_slice
(&self)
crates/qmdb-common/src/entryfile/readbuf.rs:23
↓ 48 callersMethodget
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 callersFunctionmerkle_node_hash
(children_level: u8, left: T, right: T)
crates/qmdb-common/src/merkletree/hash.rs:18
↓ 46 callersMethodextend_from_slice
(&mut self, other: &[u8])
crates/qmdb-common/src/entryfile/readbuf.rs:37
↓ 44 callersMethodadd_kv
(&mut self, k_in: u64, v_in: i64)
crates/qmdb/src/indexer/hybrid/overlay.rs:31
↓ 41 callersMethodenumerate
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 callersMethodinsert
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 callersMethodlen
(&self)
crates/qmdb/src/merkletree/singleproof.rs:42
↓ 34 callersMethodappend
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 callersFunctionentry_key_hash
Computes the hash for a key, excluding null and sentry entries.
crates/qmdb-common/src/entryfile/entry.rs:328
↓ 32 callersMethodclear
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 callersMethodsend
(self, value: usize)
crates/qmdb/src/entryfile/uring_reader.rs:49
↓ 32 callersMethodto_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 callersMethodis_empty
(&self)
crates/qmdb/src/indexer/kvlist.rs:99
↓ 29 callersFunctionto_k80
(k: &[u8])
crates/qmdb/src/indexer/hybrid/mod.rs:382
↓ 28 callersMethodread
(&self, key: &[u8], out: &mut ReadBuf)
crates/qmdb/src/seqads.rs:97
↓ 27 callersMethodadd_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 callersMethodlen
Returns the total length of the serialized entry.
crates/qmdb-common/src/entryfile/entry.rs:436
↓ 25 callersMethodstore
(&self, id: i64, value: Arc<T>)
crates/hpfile/src/file_slots.rs:146
↓ 23 callersMethodas_entry_bz
(&self)
crates/qmdb-common/src/entryfile/readbuf.rs:31
↓ 23 callersFunctionbyte0_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 callersMethodserial_number
Returns the serial number of this entry.
crates/qmdb-common/src/entryfile/entry.rs:533
↓ 22 callersMethodremove
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 callersMethodget_mut
(&mut self, key: &K)
crates/qmdb-common/src/utils/simplemap.rs:170
↓ 20 callersMethodsort
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 callersMethodas_ptr
(&self)
crates/hpfile/src/aligned_buf.rs:139
↓ 19 callersMethodis_empty
Returns whether this `HPFile` is empty.
crates/hpfile/src/lib.rs:138
↓ 19 callersMethodread
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 callersMethodwrite
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 callersMethodcontains
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 callersMethodwrite
(&mut self, buf: &[u8])
crates/qmdb/src/indexer/hybrid/tempfile.rs:41
↓ 17 callersMethodappend
(&mut self, elem: i64)
crates/qmdb-common/src/indexer/utils/poslist.rs:43
↓ 17 callersFunctionget_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 callersMethodget_uint32
(&mut self)
crates/qmdb/src/test_helper/randsrc.rs:117
↓ 17 callersMethodlen
(&self)
crates/qmdb-common/src/utils/simplemap.rs:184
↓ 17 callersMethodread_entry
(&self, file_pos: i64, buf: &mut ReadBuf)
crates/qmdb/src/entryfile/entryfile.rs:278
↓ 16 callersMethodadd
( buf: &mut Vec<u8>, op_type: u8, key_hash: &[u8; 32], key: &[u8], val
crates/qmdb-common/src/utils/changeset.rs:57
↓ 16 callersMethodappend
(&mut self, entry: &Entry, deactived_serial_num_list: &[u64])
crates/qmdb/src/entryfile/entrybuffer.rs:65
↓ 16 callersFunctionentry_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 callersMethodget_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 callersMethodget_change_sets
(&self)
crates/qmdb/src/tasks/helpers.rs:30
↓ 16 callersFunctionjoin_task_id
(height: i64, idx: usize, end_block: bool)
crates/qmdb-common/src/task/taskid.rs:62
↓ 16 callersMethodset
(&self, n: usize)
crates/qmdb/src/utils/activebits.rs:32
↓ 15 callersFunctionassert_zero
(tree: &Tree, pos: tree::NodePos)
crates/qmdb/tests/test_tree.rs:591
↓ 15 callersFunctioncreate_temp_file
()
crates/hpfile/src/file_slots.rs:650
↓ 15 callersMethodfor_each_op
(&self, mut access: F)
crates/qmdb-common/src/utils/changeset.rs:489
↓ 15 callersMethodlog_sample
(&mut self, sample_name: &str, value: f64)
bench/src/speed/results.rs:221
↓ 15 callersMethodread_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 callersMethoddump
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 callersMethodget_node
(&self, pos: NodePos)
crates/qmdb/src/merkletree/tree.rs:262
↓ 14 callersMethodkey
Returns a reference to the key bytes of this entry.
crates/qmdb-common/src/entryfile/entry.rs:481
↓ 14 callersMethodkey_hash
(&self, buf: &'a [u8])
crates/qmdb-common/src/utils/changeset.rs:142
↓ 14 callersMethodnext_key_hash
Returns a reference to the next key hash bytes.
crates/qmdb-common/src/entryfile/entry.rs:505
↓ 13 callersMethodappend
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 callersMethodget
(&self, id: i64)
crates/hpfile/src/file_slots.rs:229
↓ 13 callersMethodget
(&self, key: K)
bench/src/speed/rocksdb.rs:69
↓ 13 callersMethodis_empty
(&self)
crates/qmdb/src/merkletree/tree.rs:215
↓ 13 callersMethodlen
(&self)
crates/qmdb/src/indexer/hybrid/ref_unit.rs:49
↓ 12 callersMethodfor_each_adjacent_value
( &mut self, height: i64, warmup: bool, k: u64, k80: &[u8; 10],
crates/qmdb/src/indexer/hybrid/unit.rs:236
↓ 12 callersMethodread_at
(&self, buf: &mut [u8], off: u64)
crates/qmdb/src/indexer/hybrid/tempfile.rs:34
↓ 12 callersFunctionsplit_task_id
(mut task_id: i64)
crates/qmdb-common/src/task/taskid.rs:50
↓ 11 callersMethodclear
(&mut self)
crates/qmdb/src/indexer/hybrid/overlay.rs:104
↓ 11 callersMethodinsert
(&mut self, key: K, value: V)
crates/qmdb-common/src/utils/simplemap.rs:123
↓ 11 callersMethodlen
(&self)
crates/qmdb-common/src/merkletree/singleproof.rs:42
↓ 11 callersMethodresize
(&mut self, size: usize)
crates/qmdb-common/src/entryfile/readbuf.rs:61
↓ 11 callersMethodset_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 callersMethodsync_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 callersMethodbuild
(&self)
crates/qmdb-common/src/entryfile/helpers.rs:38
↓ 10 callersMethoddebug_get_kv
(&self, k_in: u64)
crates/qmdb/src/indexer/memidx.rs:443
↓ 10 callersMethodend_block
(&mut self)
crates/qmdb/src/seqads.rs:155
↓ 10 callersMethodfill
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 callersFunctionget_null_twig_box
()
crates/qmdb-common/src/merkletree/twig.rs:25
↓ 10 callersMethodget_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 callersMethodlargest_id
(&self)
crates/hpfile/src/file_slots.rs:245
↓ 10 callersFunctionnew_test_entry
Creates a new test entry.
crates/qmdb/src/updater.rs:1209
↓ 10 callersFunctionnew_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 callersMethodnext
(&mut self, overlay: &Overlay)
crates/qmdb/src/indexer/hybrid/file_reader.rs:70
↓ 10 callersMethodvalue
(&self)
crates/qmdb-common/src/utils/hasher.rs:39
↓ 9 callersMethodappend
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 callersFunctionget_u128
16b-idx, 64b-k, 48b-v
crates/qmdb/src/indexer/hybrid/ref_unit.rs:13
↓ 9 callersMethodnext
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 callersMethodnth
Returns the node index at this level
crates/qmdb/src/merkletree/tree.rs:105
↓ 9 callersMethodremove
Remove a value from the slot.
crates/hpfile/src/file_slots.rs:346
↓ 9 callersMethodsync_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 callersMethodsync_upper_nodes
( &mut self, mut n_list: Vec<u64>, youngest_twig_id: u64, )
crates/qmdb/src/merkletree/tree.rs:358
↓ 8 callersMethodadd_task
Adds a task to be processed. # Arguments `task_id` - ID of the task to add
crates/qmdb/src/lib.rs:837
↓ 8 callersMethodappend
(&self, e: &EntryBz, tmp: &mut Vec<u8>, buffer: &mut Vec<u8>)
crates/qmdb/src/entryfile/entryfile.rs:316
↓ 8 callersMethodas_mut_ptr
(&mut self)
crates/hpfile/src/aligned_buf.rs:145
↓ 8 callersMethodbuild_and_dump
(&self, dsn_list: &[u64])
crates/qmdb-common/src/entryfile/helpers.rs:48
↓ 8 callersFunctioncheck_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 callersMethodclear
(&self)
crates/qmdb/src/entryfile/entrycache.rs:27
next →1–100 of 1,374, ranked by callers