Expand description
Program entrypoint ownership for Hopper Native.
This file is the only raw program-entry boundary owner in Hopper Native.
Loader input parsing lives in crate::raw_input, while the public macros
below own the raw entrypoint(input: *mut u8) boundary and delegate into
Hopper callbacks.
Structs§
- Bump
Allocator - A bump allocator over the SVM heap region.
- Heap
Mark - A position of the heap cursor, taken with
BumpAllocator::mark.
Constants§
- HEAP_
LENGTH - Default Solana heap region length (32 KiB).
- HEAP_
RUNTIME_ RESERVED - Bytes of the heap’s BOTTOM reserved as Hopper runtime scratch, starting
right after the
BumpAllocatorcursor word: the byte range[HEAP_START + 8, HEAP_START + 8 + HEAP_RUNTIME_RESERVED). - HEAP_
START_ ADDRESS - Canonical Solana heap region start address (
0x3_0000_0000). - MAX_
HEAP_ LENGTH - The largest heap a transaction can request with
ComputeBudgetInstruction::RequestHeapFrame(256 KiB). - PANIC_
REPORTS_ LOCATION - Whether a panic reports where it happened (
panic-location). - PANIC_
REPORTS_ MESSAGE - Whether a panic logs its message (
panic-message). - RENT_
CACHE_ BYTES - Bytes at the top of the reserved scratch that hold the per-invocation
Rent cache (
hopper_runtime::rent::live_rent): the rate, the threshold bits, and a loaded flag. All-zero is the empty cache, so the VM’s zeroed heap needs no initialization, exactly like the gate store below it. The gate store and the touch log assert that they end beforeRENT_CACHE_HEAP_OFFSET. - RENT_
CACHE_ HEAP_ OFFSET - Heap offset of the Rent cache, relative to
HEAP_START_ADDRESS.
Functions§
- err_
to_ u64 - Convert a handler’s
ProgramErrorinto the Solana runtime’s u64 return code. - process_
entrypoint ⚠ - Process the BPF entrypoint input.