Skip to main content
Version: Next (unstable)

Chiplets

The Chiplets module contains specialized components dedicated to accelerating complex computations. Each chiplet specializes in executing a specific type of computation and is responsible for proving both the correctness of its computations and its own internal consistency.

Miden VM stacks six chiplet sections:

  • The Hash Chiplet (also referred to as the Hasher), whose controller records Eidos sequential, control-block, Merkle, and deferred-root compressions. The computation is proved by the separate EidosCompressionAir and And8LookupAir instances.
  • The AEAD stream chiplet, which handles CRYPTOSTREAM XORs.
  • The Bitwise Chiplet, used to compute bitwise operations (e.g., AND, XOR) over 32-bit integers.
  • The Memory Chiplet, used to support random-access memory in the VM.
  • The Arithmetic Circuit Evaluation (ACE), used to ensure that arithmetic circuits evaluate to zero.
  • The Kernel ROM Chiplet, used to enable executing kernel procedures during the SYSCALL operation.

Each chiplet executes its computations separately from the rest of the VM and proves the internal correctness of its execution trace in a unique way that is specific to the operation(s) it supports. These methods are described by each chiplet’s documentation.

Chiplets module trace​

The execution trace of the Chiplets module is generated by stacking the execution traces of each of its chiplet components. Because each chiplet is expected to generate significantly fewer trace rows than the core trace, stacking them enables the same functionality without adding a separate set of columns for each chiplet.

Each chiplet is identified within the Chiplets module by one or more chiplet selector columns which cause its constraints to be selectively applied.

The trace uses 24 shared columns. Each row starts with a selector prefix followed by its chiplet's payload. The last column holds the controller row address and is zero in all other sections.

The hash controller links to the separate EidosCompressionAir through compression requests. A controller request occupies one row, while a physical compression block occupies 32 rows. Requests with identical compression inputs may share a block whose provider multiplicity counts those requests. The compression, AEAD stream, and bitwise sections use byte lookups supplied by And8LookupAir.

The concatenated chiplet trace is padded independently to the smallest supported power-of-two height that can contain it. Padding rows use the all-ones selector prefix and zero payload columns.

Chiplets order​

The selector prefix table lists the packing order and payload columns. Shorter prefixes use lower-degree membership flags, leaving more room for high-degree chiplet constraints.

Additional requirements for stacking execution traces​

Internal transition constraints are gated by selectors that identify the rows and transitions owned by each chiplet. Multi-row cyclic chiplets use periodic columns aligned to their cycles. The stacked trace applies the following boundary contracts.

In the hash chiplet: controller constraints delimit the controller section, which the producer pads to an 8-row boundary before the AEAD stream.

In the AEAD stream chiplet: period-eight selectors gate transitions within each entry. Ordinary bitwise operations occupy one row each.

In the memory chiplet: the next-row selector 1−s2′1-s'_2 selects transitions whose next row belongs to the memory region, keeping the selector degree at three as shown below.

In the ACE chiplet: first-row, intra-chiplet transition, and last-row flags gate the corresponding constraints, as described under flags and boundary constraints.

In the kernel ROM chiplet: typed initialization and call messages bind each declared procedure digest and its call multiplicity.

Operation labels​

Lookup messages carry an explicit BusId, independent of the physical selector encoding used by the chiplet overlay. A message is reduced with the domain-separated prefix bus_prefix[id] = alpha + (id + 1) * gamma, where gamma = beta^16 in the native VM proof, followed by its typed payload. This prevents two relations with structurally similar payloads from cancelling each other except with the standard random-encoding collision probability.

The following selection covers Core requests and their stacked-chiplet responses:

InteractionBusId value
Kernel ROM call3
Hasher full-state input4
Hasher sequential absorption6
Hasher result/CV return7
Merkle verify input8
Merkle update old/new inputs9 / 10
Memory element read/write11 / 12
Memory word read/write13 / 14
Bitwise15
ACE initialization16

Other cross-AIR and virtual-table relations have their own IDs. The authoritative list is the BusId definition in crates/air/source/src/vm/constraints/lookup/messages.rs.

Chiplets module constraints​

Chiplet constraints​

The selector columns s0,s1,s2,s3,s4s_0, s_1, s_2, s_3, s_4 combine into gates for row activity, transitions, and section entry. The examples below show row activity gates for controller, AEAD, and bitwise, and the chiplet factors of the memory and ACE transition gates.

(1−s0)⋅chash=0 | degree=1+deg⁡(chash)(1 - s_0) \cdot c_{hash} = 0 \text{ | degree} = 1 + \deg(c_{hash})
s0⋅(1−s1)⋅(1−s2)⋅cAEAD=0 | degree=3+deg⁡(cAEAD)s_0 \cdot (1 - s_1) \cdot (1 - s_2) \cdot c_{AEAD} = 0 \text{ | degree} = 3 + \deg(c_{AEAD})
s0⋅(1−s1)⋅s2⋅cbitwise=0 | degree=3+deg⁡(cbitwise)s_0 \cdot (1 - s_1) \cdot s_2 \cdot c_{bitwise} = 0 \text{ | degree} = 3 + \deg(c_{bitwise})
s0⋅s1⋅(1−s2′)⋅cmemory=0 | degree=3+deg⁡(cmemory)s_0 \cdot s_1 \cdot (1 - s'_2) \cdot c_{memory} = 0 \text{ | degree} = 3 + \deg(c_{memory})
s0⋅s1⋅(s2)⋅(1−s3′)⋅cace=0 | degree=4+deg⁡(cace)s_0 \cdot s_1 \cdot (s_2) \cdot (1 - s'_3) \cdot c_{ace} = 0 \text{ | degree} = 4 + \deg(c_{ace})

In the above:

  • Each cc represents an internal constraint from the indicated chiplet.
  • deg⁡(c)\deg(c) indicates the degree of the specified constraint.
  • the memory selector uses s2′s'_2 to select transitions whose next row belongs to the memory region, as described above.

The Kernel ROM selector gates its KernelRomInit and KernelRomCall messages, described below.

Chiplet selector constraints​

We also need to ensure that the chiplet selector columns are set correctly. The stacked trace design means that selector columns become active one prefix level at a time. Thus, selector constraints should only be applied to selector columns when they are acting as selectors.

  • s0s_0 acts as a selector for the entire trace.
  • s1s_1 and s2s_2 act as selector columns when s0=1s_0 = 1. Under prefix 10, s2s_2 selects between AEAD stream and ordinary bitwise rows.
  • s3s_3 acts as a selector column when s0=1s_0 = 1, s1=1s_1 = 1, and s2=1s_2 = 1.
  • s4s_4 acts as a selector column when s0=1s_0 = 1, s1=1s_1 = 1, s2=1s_2 = 1, and s3=1s_3 = 1.

Two conditions must be enforced for columns acting as chiplet selectors.

  1. When acting as a selector, the value in the selector column must be binary.
  2. On a transition, an all-ones prefix persists. This keeps the main sections in order.

The following constraints ensure that selector values are binary.

s02−s0=0 | degree=2s0⋅(s12−s1)=0 | degree=3s0⋅(s22−s2)=0 | degree=3s0⋅s1⋅s2⋅(s32−s3)=0 | degree=5s0⋅s1⋅s2⋅s3⋅(s42−s4)=0 | degree=6s_0^2 - s_0 = 0 \text{ | degree} = 2 s_0 \cdot (s_1^2 - s_1) = 0 \text{ | degree} = 3 s_0 \cdot (s_2^2 - s_2) = 0 \text{ | degree} = 3 s_0 \cdot s_1 \cdot s_2 \cdot (s_3^2 - s_3) = 0 \text{ | degree} = 5 s_0 \cdot s_1 \cdot s_2 \cdot s_3 \cdot (s_4^2 - s_4) = 0 \text{ | degree} = 6

On non-final rows, the following constraints preserve each all-ones prefix once it is reached.

s0⋅(s0′−1)=0 | degree=2s0⋅s1⋅(s1′−1)=0 | degree=3s0⋅s1⋅s2⋅(s2′−1)=0 | degree=4s0⋅s1⋅s2⋅s3⋅(s3′−1)=0 | degree=5s0⋅s1⋅s2⋅s3⋅s4⋅(s4′−1)=0 | degree=6s_0 \cdot (s'_0 - 1) = 0 \text{ | degree} = 2 s_0 \cdot s_1 \cdot (s'_1 - 1) = 0 \text{ | degree} = 3 s_0 \cdot s_1 \cdot s_2 \cdot (s'_2 - 1) = 0 \text{ | degree} = 4 s_0 \cdot s_1 \cdot s_2 \cdot s_3 \cdot (s'_3 - 1) = 0 \text{ | degree} = 5 s_0 \cdot s_1 \cdot s_2 \cdot s_3 \cdot s_4 \cdot (s'_4 - 1) = 0 \text{ | degree} = 6

The 10 branch can switch between AEAD and ordinary bitwise at complete AEAD cycle boundaries. The producer packs the AEAD entries first. The last row has the padding prefix 11111.

Chiplets bus​

The Core and Chiplets AIRs connect offloaded operations through typed LogUp messages. Each message starts with a BusId, so relations with similar payloads remain domain-separated. The Core AIR emits requests from the decoder and stack, and the Chiplets AIR emits the matching responses. Their order in the trace does not affect the lookup argument.

The chiplet response column carries memory, bitwise, hasher, ACE initialization, kernel ROM, and AEAD-stream byte-pair operations. A separate return column carries completed hasher digests and chaining values.

Chiplets bus constraints​

The verifier combines the proof-exposed normalized finals across AIRs, weighted by their trace lengths, with the statement boundary corrections and requires the total to be zero. These lookup columns do not use explicit last-row boundary constraints.

Hash-kernel lookup column​

The hash-kernel LogUp column multiplexes row-disjoint relations for Merkle siblings, ACE memory reads, AEAD memory I/O, ordinary bitwise AND8 lookups, and memory range checks. Each relation uses its own BusId.

Shared wiring column​

The shared wiring column carries ACE wiring, hasher-compression links, and AEAD stream traffic.