Skip to content

Zero-Trust-Collective/TVM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TVM

TVM is a Rust implementation of the Trustless Virtual Machine execution layer described in the JAM Graypaper.

It is built as a just-in-time assembler and runtime: TVM translates the PVM/RISC-V-inspired instruction stream into native x86_64 machine code, manages program execution, and exposes host-side invocation APIs for JAM runtime contexts.

Why It Exists

TVM was built as a low-level implementation of the JAM execution environment. The project is preserved here as a technical showcase and reference artifact for the assembler, runtime, shared-memory model, gas accounting, and host-function boundary.

Technical Highlights

  • JIT assembler in Rust using dynasmrt, with explicit mapping from TVM virtual registers to x86_64 and MMX registers.
  • Runtime support for shared program memory, state memory, gas metering, page-fault handling, host calls, and controlled exits.
  • Generic invocation APIs for refinement, accumulation, authorization, and transfers.
  • Host-function implementations for account storage, preimages, service creation, privilege management, authorization queues, and validator updates.
  • Test-vector coverage for VM instructions, initialization, and JAM host functions.
  • tram-ffi bridge code for using the runtime from the adjacent TRAM client work.

Architecture

The TVM wiki is the main architecture archive. Good starting points:

Current Status

This repository is not currently under active development. It is published as a preserved technical artifact from the 2024-2025 JAM implementation work, not as a current product or network client.

The source is available for review under the repository's existing All Rights Reserved license.

Related Project

TRAM is the companion JAM client/state-transition project. TRAM sits at the protocol and state layer; TVM sits at the execution/runtime layer.

About

Trustless Virtual Machine

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages