Skip to main content

MAX_PAGES_PER_ACCESS

Constant MAX_PAGES_PER_ACCESS 

Source
pub const MAX_PAGES_PER_ACCESS: u64 = 2;
Expand description

Max consensus 4 KiB pages a single scalar access can span.

Invariant, not a tunable. The widest PVM2 memory access is an 8-byte scalar (ld/sd) and 8 < 4096, so a (possibly misaligned, via Zicclsm) access touches at most ceil(8 / 4096) + 1 = 2 consensus pages. Adding a wider access (e.g. a vector load/store) MUST revisit this constant, or the worst-case-#3 reserve undercounts.