MCPcopy Index your code
hub / github.com/TritonVM/triton-vm

github.com/TritonVM/triton-vm @v7.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v7.0.0 ↗ · + Follow
1,707 symbols 4,846 edges 70 files 239 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Triton VM

License License crates.io GitHub CI Check Links Spec: online Coverage Status

Triton is a virtual machine that comes with Algebraic Execution Tables (AET) and Arithmetic Intermediate Representations (AIR) for use in combination with a STARK proof system. It defines a Turing complete Instruction Set Architecture, as well as the corresponding arithmetization of the VM. The really cool thing about Triton VM is its efficient recursive verification of the STARKs produced when running Triton VM.

Getting Started

If you want to start writing programs for Triton VM, check out the Triton TUI. If you want to run a Triton assembly program, generate or verify proofs of correct execution, or profile the performance of either of these, check out the Triton CLI. If you want to use Triton VM as a library, check out the examples.

Project Status

We consider Triton VM to be usable in production. That said, there are plans to change some of the internals significantly. Some of these changes might have effects on the interface as well as the ISA.

As is common for rust projects, Triton VM follows Cargo-style SemVer.

Specification

Triton VM’s specification can be found online. Alternatively, you can self-host it.

Recursive STARKs of Computational Integrity

Normally, when executing a machine – virtual or not – the flow of information can be regarded as follows. The tuple of (input, program) is given to the machine, which takes the program, evaluates it on the input, and produces some output.

If the – now almost definitely virtual – machine also has an associated STARK engine, one additional output is a proof of computational integrity.

Only if input, program, and output correspond to one another, i.e., if output is indeed the result of evaluating the program on the input according to the rules defined by the virtual machine, then producing such a proof is easy. Otherwise, producing a proof is next to impossible.

The routine that checks whether a proof is, in fact, a valid one, is called the Verifier. It takes as input a 4-tuple (input, program, output, proof) and evaluates to true if and only if that 4-tuple is consistent with the rules of the virtual machine.

Since the Verifier is a program taking some input and producing some output, the original virtual machine can be used to perform the computation.

The associated STARK engine will then produce a proof of computational integrity of verifying some other proof of computational integrity – recursion! Of course, the Verifier can be a subroutine in a larger program.

Triton VM is specifically designed to allow fast recursive verification.

Extension points exported contracts — how you extend this code

Seal (Interface)
A public but unnameable trait to seal trait [`AIR`][super::AIR]. [9 implementers]
triton-air/src/lib.rs
TraceTable (Interface)
(no doc) [9 implementers]
triton-vm/src/table.rs
Seal (Interface)
A public but un-nameable type for sealing traits. [2 implementers]
triton-constraint-circuit/src/lib.rs
Codegen (Interface)
(no doc) [2 implementers]
triton-constraint-builder/src/codegen.rs
AIR (Interface)
The main trait for the [tables]' Arithmetic Intermediate Representation. This is a _sealed_ trait. It is not intended ( [9 …
triton-air/src/lib.rs
BfeSlice (Interface)
Helper trait to turn a slice of either [`BFieldElement`]s or [`XFieldElement`]s into a slice of [`BFieldElement`]s. In [2 …
triton-vm/src/table/master_table.rs
InputIndicator (Interface)
Describes the position of a variable in a constraint polynomial in the row layout applicable for a certain kind of const [2 …
triton-constraint-circuit/src/lib.rs
MasterMainColumn (Interface)
A trait for the columns of the master main table. This trait is implemented for all enums relating to the main tables. T [9 …
triton-air/src/table_column.rs

Core symbols most depended-on inside this repo

main_index
called by 418
triton-air/src/table_column.rs
input
called by 265
triton-constraint-circuit/src/lib.rs
master_main_index
called by 208
triton-air/src/table_column.rs
into_iter
called by 131
triton-isa/src/program.rs
len
called by 125
triton-vm/src/arithmetic_domain.rs
push
called by 119
triton-vm/src/vm.rs
b_constant
called by 111
triton-constraint-circuit/src/lib.rs
master_aux_index
called by 77
triton-air/src/table_column.rs

Shape

Function 889
Method 640
Class 102
Enum 63
Interface 13

Languages

Rust100%

Modules by API surface

triton-vm/src/vm.rs216 symbols
triton-vm/src/stark.rs131 symbols
triton-air/src/table/processor.rs128 symbols
triton-isa/src/parser.rs102 symbols
triton-constraint-circuit/src/lib.rs101 symbols
triton-vm/src/fri.rs78 symbols
triton-isa/src/op_stack.rs74 symbols
triton-vm/src/table/master_table.rs70 symbols
triton-vm/src/table/processor.rs66 symbols
triton-isa/src/instruction.rs52 symbols
triton-vm/src/profiler.rs49 symbols
triton-isa/src/program.rs48 symbols

For agents

$ claude mcp add triton-vm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page