kroma-network / tachyon

Modular ZK(Zero Knowledge) backend accelerated by GPU
MIT License
7.78k stars 226 forks source link

refac(zk): modularize expressions #446

Closed batzor closed 1 month ago

batzor commented 1 month ago

Description

This PR refactors expressions to make it extendable which is necessary for implementing AIR. It is achieved with the following changes:

  1. Separate evaluators from expressions. Previously, even ConstantExpression had plonk-specific implementations.
  2. Move PLONK-specific expressions to plonk namespace. Now base expressions have only constant, sum, negated, scaled, and product expressions.
chokobole commented 1 month ago