Struct solana_rbpf::vm::Config
source · pub struct Config {Show 18 fields
pub max_call_depth: usize,
pub stack_frame_size: usize,
pub enable_address_translation: bool,
pub enable_stack_frame_gaps: bool,
pub instruction_meter_checkpoint_distance: usize,
pub enable_instruction_meter: bool,
pub enable_instruction_tracing: bool,
pub enable_symbol_and_section_labels: bool,
pub reject_broken_elfs: bool,
pub noop_instruction_rate: u32,
pub sanitize_user_provided_values: bool,
pub external_internal_function_hash_collision: bool,
pub reject_callx_r10: bool,
pub optimize_rodata: bool,
pub new_elf_parser: bool,
pub aligned_memory_mapping: bool,
pub enable_sbpf_v1: bool,
pub enable_sbpf_v2: bool,
}
Expand description
VM configuration settings
Fields§
§max_call_depth: usize
Maximum call depth
stack_frame_size: usize
Size of a stack frame in bytes, must match the size specified in the LLVM BPF backend
enable_address_translation: bool
Enables the use of MemoryMapping and MemoryRegion for address translation
enable_stack_frame_gaps: bool
Enables gaps in VM address space between the stack frames
instruction_meter_checkpoint_distance: usize
Maximal pc distance after which a new instruction meter validation is emitted by the JIT
enable_instruction_meter: bool
Enable instruction meter and limiting
enable_instruction_tracing: bool
Enable instruction tracing
enable_symbol_and_section_labels: bool
Enable dynamic string allocation for labels
reject_broken_elfs: bool
Reject ELF files containing issues that the verifier did not catch before (up to v0.2.21)
noop_instruction_rate: u32
Ratio of native host instructions per random no-op in JIT (0 = OFF)
sanitize_user_provided_values: bool
Enable disinfection of immediate values and offsets provided by the user in JIT
external_internal_function_hash_collision: bool
Throw ElfError::SymbolHashCollision when a BPF function collides with a registered syscall
reject_callx_r10: bool
Have the verifier reject “callx r10”
optimize_rodata: bool
Avoid copying read only sections when possible
new_elf_parser: bool
Use the new ELF parser
aligned_memory_mapping: bool
Use aligned memory mapping
enable_sbpf_v1: bool
Allow ExecutableCapability::V1
enable_sbpf_v2: bool
Allow ExecutableCapability::V2
Implementations§
Trait Implementations§
source§impl PartialEq for Config
impl PartialEq for Config
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more