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

[Epic]: :scissors: Sequencer-prover separation

Open spalladino opened this issue 7 months ago • 2 comments

We want to split up sequencers and provers, as they are two different entities in the system. With the changes to block building, sequencers no longer need to upload a proof along their block to L1. Instead, provers group together multiple (32) blocks and submit a proof for several of them.

More context and discussion in this hackmd.

### Implementation
- [ ] #8210
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/8716
- [ ] [prover] Update prover-node to schedule epoch proofs
- [ ] [prover] Update e2e tests to prove epochs instead of blocks
- [ ] [prover] Handle epochs with 0-1 blocks
- [ ] [prover] Remove the flow for block proofs
- [ ] #7925
- [ ] #8489
- [ ] #8490
- [ ] #8491
- [ ] #8493
### Tests
- [ ] Prover node can orchestrate proving of one epoch of blocks at 1 TPS (proving disabled first, enabled then)
- [ ] Prover node can orchestrate concurrent proving of N=10 epochs of blocks at 1 TPS (proving disabled first, enabled then)
- [ ] Prover node can recover from a crash in each of the four scenarios above without losing executed proving work
### Attic
- [x] Remove the proof and aggregation object from the L1 contract `process` method.
- [x] Have the L1 contract accept proofs in a separate method. Uploading a proof emits a `ProofSubmitted` event. 
- [x] Remove the prover from the sequencer.
- [x] Have the `L2BlockSource` monitor `ProofSubmitted` events and track the last proven block number.
- [x] Tweak the `ServerWorldStateSynchronizer` so it can be configured to only process proven blocks, and to optionally fast-forward to a given block.
- [x] Tweak the `TxPool` so that, when it sees a tx included in a block, it persists it to a store so it can be later consumed from the prover node.
- [x] Create a new `prover-node` package that references the `prover-client`, `world-state`, and the public tx processor.
- [x] Implement the `prove(l2blockrange)` method on the `prover-node`, which should get the tx hashes to prove from an `L2BlockSource`, the individual tx objects from a tx db backed by a modified `TxPool`, process them using a `PublicProcessor` backed by a `world-state` pointed to the first block in the range, sends the jobs to the `prover-client`, and uploads them to L1.
- [x] Allow the `prover-node` to handle multiple simultaneous proving jobs by introducing a queue. The node should move onto the next job once the current one has finished tx processing.
- [x] Add a switch to the `prover-node` so it continuously proves unproven blocks in batches of N blocks.
- [x] Update the merge rollup circuits so they can accept txs from more than one block.
- [x] Update the merge and root rollup circuits so they output the block range proven.

spalladino avatar Jul 04 '24 18:07 spalladino