Contact: Aurel

Rationale

The goal of this “Bus” design is to provide efficient lookups and cross-circuit calls, but also a flexibility in circuit design that allows high resource utilization.

Bus based EVM.png

Indeed, the target application is Scroll’s zkEVM. A VM must support any stream of instructions, where each instruction needs many lookups as well as calls to sub-circuits, but different ones. Suppose lookup arguments are allocated to support the worst-case of each opcode for each table. This is very costly, while the lookups are under-utilized by most instructions.

With a bus approach, any given location in a circuit is able to dynamically lookup into any table, or to call any circuit, or to answer a call. This makes the current design more efficient, and it enables an even more modular design in the future.

Lookup based EVM.png

Meanwhile, the current Plookup protocol uses a lot of witness, which can be replaced with a lighter method (~75% less witness).

Moreover, a call to a sub-circuit is a one-to-one communication, which does not need the lookup effect (one-to-many). Also called a shuffle. This is cheaper because there is no need to witness the multiplicities.

Finally, the current lookup approach is limited by the column height. Instead, multiple sub-circuits for the same function can be connected to the same bus, to scale the capacity of this function. E.g., there can be multiple Poseidon circuits. Similarly, a lookup table can be larger than a column, by splitting it into chunks, all available on the same bus.

Untitled

Background

To the Bus

Semantics first:

A $message$ represents a true fact, to be communicated from the circuit or table that verified it, to the circuit that needs it to be true. The encoding of messages can be very flexible, like so:

Message structure:

Example, range check lookup:

Example, call to a hasher circuit:

$[TYPE\_TAG, field_0, field_1, ...]$

$[BYTE, 12]$

$[HASH, inputs, output]$

Messages can be sent one-to-one, or they can be entries of a lookup table. A bus operation is represented by a $count$ like so:

The bus operations are consistent if the following holds:

$$ \sum_i^N \sum_k^K \frac {count_{i,k}} {compress_\beta(message_{i,k})} = 0 $$