Skip to main content

Module syscall_handler

Module syscall_handler 

Source

Structs§

InterruptionHolder
Holds parameters required to resume a deferred exec and whether it originated at root depth.

Constants§

LAST_LOG_TIME
STATE_NUM_WORDS

Functions§

hook_ed_decompress
Checks if a compressed Edwards point can be decompressed.
hook_rsa_mul_mod
Given the product of some 256-byte numbers and a modulus, this function does a modular reduction and hints back the values to the vm in order to constrain it.
invoke_runtime_handler
Dispatches a system function index to its corresponding syscall handler.
syscall_bls12381_add_handler
syscall_bls12381_add_impl
BLS12-381 curve point addition.
syscall_bls12381_decompress_handler
syscall_bls12381_decompress_impl
BLS12-381 point decompression.
syscall_bls12381_double_handler
syscall_bls12381_double_impl
BLS12-381 curve point doubling.
syscall_bn254_add_handler
syscall_bn254_add_impl
BN254 curve point addition.
syscall_bn254_double_handler
syscall_bn254_double_impl
BN254 curve point doubling.
syscall_charge_fuel_handler
Consumes fuel from the engine and mirrors the consumption in the runtime context.
syscall_charge_fuel_impl
Adds the consumed fuel to the runtime context and checks against the context fuel limit.
syscall_charge_fuel_manually_handler
Validates that fuel metering is disabled, applies manual charge/refund, and returns remaining fuel.
syscall_charge_fuel_manually_impl
Updates context fuel accounting with manual consumption and refund values.
syscall_debug_log_handler
syscall_debug_log_impl
syscall_ed25519_decompress_handler
syscall_ed25519_decompress_impl
syscall_edwards_add_handler
syscall_edwards_add_impl
syscall_enter_leave_unconstrained_handler
syscall_enter_leave_unconstrained_impl
syscall_exec_continue
Continues an exec after an interruption, executing the delegated call.
syscall_exec_handler
Dispatches the exec syscall: validates fuel, captures parameters, and triggers an interruption.
syscall_exec_impl
Executes a nested runtime with the given parameters and merges the result into ctx.
syscall_exit_handler
syscall_exit_impl
syscall_forward_output_handler
Copies [offset, offset+length) from return_data into output; halts on out-of-bounds.
syscall_forward_output_impl
syscall_fuel_handler
Writes the remaining fuel (or u64::MAX if metering is disabled) into result[0].
syscall_fuel_impl
syscall_hashing_blake3_handler
syscall_hashing_blake3_impl
syscall_hashing_keccak256_handler
syscall_hashing_keccak256_impl
syscall_hashing_keccak256_permute_handler
syscall_hashing_keccak256_permute_impl
syscall_hashing_sha256_compress_handler
syscall_hashing_sha256_compress_impl
syscall_hashing_sha256_extend_handler
syscall_hashing_sha256_extend_impl
syscall_hashing_sha256_handler
syscall_hashing_sha256_impl
syscall_input_size_handler
Writes the input length in bytes into result[0].
syscall_input_size_impl
syscall_output_size_handler
Writes the length of ctx.execution_result.return_data into result[0].
syscall_output_size_impl
syscall_read_input_handler
Reads [offset, offset+length) from ctx.input and writes it at target_ptr.
syscall_read_input_impl
syscall_read_output_handler
Reads [offset, offset+length) from ctx.execution_result.return_data and writes it at target_ptr.
syscall_read_output_impl
syscall_resume_handler
Handles the resume syscall. Copies return data, applies fuel, resumes the target, and writes back the exit code.
syscall_resume_impl
Resumes the runtime identified by call_id using the provided return data and fuel accounting.
syscall_secp256k1_add_handler
syscall_secp256k1_add_impl
Secp256k1 curve point addition.
syscall_secp256k1_decompress_handler
syscall_secp256k1_decompress_impl
Secp256k1 point decompression.
syscall_secp256k1_double_handler
syscall_secp256k1_double_impl
Secp256k1 curve point doubling.
syscall_secp256r1_add_handler
syscall_secp256r1_add_impl
Secp256r1 curve point addition.
syscall_secp256r1_decompress_handler
syscall_secp256r1_decompress_impl
Secp256r1 point decompression.
syscall_secp256r1_double_handler
syscall_secp256r1_double_impl
Secp256r1 curve point doubling.
syscall_state_handler
Writes ctx.state into result[0].
syscall_state_impl
syscall_tower_fp1_bls12381_add_handler
syscall_tower_fp1_bls12381_add_impl
syscall_tower_fp1_bls12381_mul_handler
syscall_tower_fp1_bls12381_mul_impl
syscall_tower_fp1_bls12381_sub_handler
syscall_tower_fp1_bls12381_sub_impl
syscall_tower_fp1_bn254_add_handler
syscall_tower_fp1_bn254_add_impl
syscall_tower_fp1_bn254_mul_handler
syscall_tower_fp1_bn254_mul_impl
syscall_tower_fp1_bn254_sub_handler
syscall_tower_fp1_bn254_sub_impl
syscall_tower_fp2_bls12381_add_handler
syscall_tower_fp2_bls12381_add_impl
syscall_tower_fp2_bls12381_mul_handler
syscall_tower_fp2_bls12381_mul_impl
syscall_tower_fp2_bls12381_sub_handler
syscall_tower_fp2_bls12381_sub_impl
syscall_tower_fp2_bn254_add_handler
syscall_tower_fp2_bn254_add_impl
syscall_tower_fp2_bn254_mul_handler
syscall_tower_fp2_bn254_mul_impl
syscall_tower_fp2_bn254_sub_handler
syscall_tower_fp2_bn254_sub_impl
syscall_uint256_mul_mod_handler
syscall_uint256_mul_mod_impl
syscall_uint256_x2048_mul_handler
syscall_uint256_x2048_mul_impl
syscall_write_fd_handler
syscall_write_fd_impl
syscall_write_output_handler
Reads a slice from linear memory and appends it to ctx.execution_result.output.
syscall_write_output_impl