aztec-packages icon indicating copy to clipboard operation
aztec-packages copied to clipboard

feat: Prepare protocol circuits for batch rollup

Open MirandaWood opened this issue 6 months ago • 2 comments

First run at creating new rollup circuits for batch block proving (see this PR for details).

~Please note the e2e tests will fail miserably as the circuits are not yet linked up to the sequencer/prover/L1! Pushing for visibility.~

EDIT: Added support for verifying block-root proofs on L1. Though we don't currently have an L1 verifier (so tests would pass whatever public inputs we had), the method now accepts the new inputs until we have batch rollups integrated.


Changes complete:

  • Rename root to block_root and change outputs
  • Add block_merge circuit and associated types/structs
  • Add new root circuit and associated types/structs (NB Github doesn't realise that old root -> block_root because of this new circuit, so the comparison is hard to read!)
  • Added new tyes ^ to circuits.js and useful methods to bb-prover, circuit-types, and noir-protocol-circuits-types
  • Made minor changes to prover-client (orchestrator.ts and block-building-helpers.ts) to use the new block_root public outputs
  • Rollup.sol now verifies a block_root proof and stores blockHash

-- TODOs:

  • When adding fees in a block_merge or root, merge fees with the same recipient - Miranda
  • ~Edit publisher and L1 to accept a block_root proof with new public inputs (for testing, so e2es will pass)~ Complete!
  • Teach the prover/sequencer to prove many blocks and submit a root proof - Miranda + Phil's team?
  • ~Make final L1 changes to verify batch proofs~ - Complete! Currently not tested with real solidity verifier, but bb verifier passes

MirandaWood avatar Aug 01 '24 16:08 MirandaWood