Other Components
Besides the ALU, flow-control and memory chips, the core machine has the program table, two lookup tables, the chips for the remaining instructions, the syscall and precompile chips, and the 256-bit word chips. The recursion machine that verifies shard proofs is a separate machine with its own chips; it is described in Recursive STARK.
Program chip
A preprocessed table with one row per instruction of the program image. The preprocessed columns are pc and the decoded instruction (opcode, op_a, op_b, op_c, imm_b, imm_c, op_a_0), and the only main column is a multiplicity. Every instruction row sends (pc, instruction) on the Program bus and the program chip receives it with the multiplicity. The preprocessed commitment is part of the verifying key, so a prover can only execute instructions of the committed program at the addresses where they were loaded.
Lookup tables
ByteLookupis preprocessed over all pairs of bytes, \( 2^{16} \) rows. For each pair it lists the results ofAND,OR,XOR,NOR,SLL,ShrCarryandLTU, theMSBof a byte, and theU8RangeandU16Rangechecks, with one multiplicity column per operation. Lookups have the form(op, a, b, c).RangeLookupis preprocessed with the pairs(a, bits)for \( a < 2^{bits} \) and \( bits \le 10 \). Its main use is the 10-bit high limb of 26-bit timestamps.
Other instruction chips
MovCondproves the conditional movesMOVZandMOVN(opcodesMEQandMNE) and the byte swapWSBH.MiscInstrsprovesINS,EXT, the sign extensionsSEBandSEH(opcodeSEXT), the multiply-accumulate instructionsMADD,MADDU,MSUBandMSUBU, which read and writeHIandLO, and the trapTEQ.SyscallInstrsproves thesyscallinstruction. The syscall number and two arguments are the registers$v0,$a0and$a1. The row:- sends the call on the
Syscallbus when a precompile or a Linux syscall must prove it; - advances
clkby the call's extra cycles; - writes the result to
$v0; - handles
COMMITandCOMMIT_DEFERRED_PROOFSby checking the committed word against the shard's publiccommitted_value_digestordeferred_proofs_digest; - on
HALTorexit_group, setsnext_pcto 0 and requires the exit code to equal the publicexit_code.
- sends the call on the
Syscalls and precompiles
-
SyscallCoreandSyscallPrecompileconnect execution shards to precompile shards. Precompile events are proved in separate shards, so a syscall made in an execution shard is sent as a global lookup bySyscallCoreand received bySyscallPrecompilein the shard that proves it. -
SysLinuxproves the results of the supported Linux syscalls:mmap/mmap2,brk,clone,exit_group,fcntl,readandwrite, and returns fixed results for a known set of no-op syscalls; any other syscall number has no satisfying row. -
The precompile chips each prove one operation over memory:
- hashing:
Sha256ExtendandSha256Compress(each with a control chip),KeccakSponge(with a control chip) andPoseidon2Permute; - elliptic curves:
Ed25519Add,Ed25519Decompress, the add, double and decompress chips for secp256k1, secp256r1 and BLS12-381, and add and double for BN254; - field arithmetic: base-field
Fp,Fp2MulandFp2AddSubfor BN254 and BLS12-381; - big integers:
Uint256Mul(multiplication modulo a 256-bit modulus) andU256x2048Mul.
- hashing:
-
The 256-bit word chips prove the
U256_*syscalls, nineteen operations on 32-byte words in memory:U256Copy,U256Swap,U256RevCopyandU256Set(moves),U256AddSub,U256Bitwise(AND, OR, XOR, NOT),U256Compare(LT, GT, SLT, SGT, EQ, ISZERO),U256ShlandU256Shr(SHR, SAR). Unlike the precompiles they run in the shard that makes the call: each chip receives the call fromSyscallInstrs, one row per call, and accesses the two word slots through the shard's own memory argument at \( clk + 1 \). Each slot pointer must be aligned and inside the address range, so that no word address wraps around the field.A precompile row receives the call from the
Syscallbus with its(shard, clk), reads and writes memory at that timestamp through the memory argument, and range-checks every word it writes. The list of syscalls is in MIPS ISA, and the guest interface in Precompiles.
Global lookups
Every value that must travel between shards is a global lookup: the initial and final value of each memory address a shard touches (from MemoryLocal, MemoryGlobalInit, MemoryGlobalFinal and, for the program image, MemoryImage) and each syscall sent to a precompile shard (from SyscallCore and SyscallPrecompile). These chips are committed in the shard's global round, and their global lookups are proved under one challenge for the whole execution, drawn from a hash chain over every shard's global round. They are left out of the shard's proof: global proofs, made once every shard has committed its global round, output the sums of the global fractions, and the recursion checks that these sums add to zero. The construction is described in Memory Consistency Checking.