Skip to main content

rv_kind_reserve

Function rv_kind_reserve 

Source
pub fn rv_kind_reserve(kind: u8) -> u32
Expand description

Per-instruction worst-case category-#3 reserve contribution for a gas kind: store → COW×2 (×2 = MAX_PAGES_PER_ACCESS), else 0. Loads no longer reserve — read-only page-in is charged eagerly at the CALL (gas_const::call_frame_cost), not at a fault, so the only #3 a block can debit mid-flight is a store’s copy-on-write. Both engines accumulate this at every real gas feed, so the block reserve matches bit-for-bit.