cnode.phd

Intro to AIR development

Celestia’s zk blob inclusion proofs are powered by SP1, and it spends hundreds of thousands of riscV cycles on serialization. This overhead made me wonder if a custom AIR for blob inclusion proofs could have impressive savings- either as a standalone STARK, or as an SP1 precompile.

To develop such an AIR, first you obtain an AIR for sha256, adapt it to compute merkle proofs, and finally perform NMT-specific checks.

SP1 has a sha256 precompile; it’s a AIR circuit that computes sha256 hashes, and performs memory IO with the SP1 zkVM.

Plonky3 has a bunch of different AIRs for hash functions, but no standalone air for sha256.

I decided to pull the sha256 code out of SP1, and bring it into vanilla Plonky3 as a learning excersize.

Scaffolding a sha256 AIR