Skip to main content

Module entrypoint

Module entrypoint 

Source
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§

BumpAllocator
A bump allocator over the SVM heap region.
HeapMark
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 BumpAllocator cursor 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 before RENT_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 ProgramError into the Solana runtime’s u64 return code.
process_entrypoint⚠
Process the BPF entrypoint input.