Skip to main content

Module optimized_access

Module optimized_access 

Source
Expand description

Optimized access using proven bounds

Uses bounds proven by formal verification to optimize runtime access. This is safe because formal proofs guarantee these bounds hold.

Reference: Formal proofs in transaction.rs, block.rs, mining.rs, pow.rs, etc. These proofs formally verify that certain bounds always hold, allowing us to use optimized access patterns without runtime bounds checks.

Functionsยง

get_proven
Get element with proven bounds check
get_proven_by_
Get element with proven bounds (alias for get_proven for compatibility)
prealloc_block_buffer
Pre-allocate block buffer using proven maximum
prealloc_proven
Pre-allocate buffer using proven maximum size
prealloc_tx_buffer
Pre-allocate transaction buffer using proven maximum