Skip to main content
ThruVM is a RISC-V-based virtual machine that executes smart contracts on the Thru blockchain. It provides deterministic program execution with segmented memory management and comprehensive system calls.

Key Components

Instruction Set Architecture

RISC-V base ISA (RV64I) with extensions for multiplication/division (M), compressed instructions (C), bit manipulation (B), and cryptographic hash functions (Zknh).

Memory Layout

48-bit segmented address space with different segment types for read-only data, account metadata, account data with copy-on-write semantics, and anonymous memory regions.

Executable Format

Binary format specification with 8-byte header, variable-length program bytecode, and 4-byte footer.

System Calls

Comprehensive syscall interface for memory management, account operations, program control, state compression, and event emission.

Error Handling

Error codes for memory faults, resource exhaustion, invalid operations, and syscall failures.