AztecProtocol / aztec-packages

Apache License 2.0
195 stars 208 forks source link

[Epic] Proof Timeliness and Prover Coordination #8509

Closed just-mitch closed 1 month ago

just-mitch commented 1 month ago

Overview

Design docs of proof timeliness and prover coordination.

I'm lumping them together within this one epic because they're tightly related in practice/development, though the key observation is that the Proof Timeliness work is largely enshrined and on L1, and the Prover Coordination work is not.

As a quick overview of the functionality we want with this epic.

Proof timeliness

An epoch is comprised of many blocks (e.g. 32).

On L1, we keep track of a pending chain tip, and a proven chain tip (which is a prefix of the pending chain).

The committee can post blocks to the pending chain, once per L2 slot (e.g. every 36 seconds).

One epoch is proven at a time, and verified on L1.

When epoch n ends, its proof must land in epoch n+1.

The first 13 proposers in an epoch have the ability to post a prover commitment bond, and subsequently the proof.

Doing so claims the TST block rewards that will be distributed once the epoch is proven according to the fee specified by the prover.

The bond they post must come out of an escrow specifically designed for holding prover commitment bonds.

If a bond to prove epoch n-1 doesn't land in the first 13 slots of epoch n, then the pending chain tip get reorged back to point to the last proven block (i.e., the last block in epoch n-2).

If a bond to prove epoch n-1 does land in time, but a proof does not land in epoch n, this results in the same reorg back to the last proven block.

Prover coordination

It is doubtful that the proposers will actually be running their own proving infrastructure. They will, instead, be coordinating with proving marketplaces to get bonds and proofs posted; this is what "prover coordination" refers to.

There will be an optional p2p layer to allow prover marketplaces to submit quotes, which will allow proposers to immediately submit the quote to L1.

The quotes will be signed such that the proposers can use the provers funds in escrow for the purpose of the prover commitment bond.

Stress test of functional requirements

We must demonstrate that 20 actors representing proving marketplaces can submit bids, that at most 1 bid can be accepted on L1 during, the bid can only be accepted during the proof claim period of a prescribed epoch, the bid is only actionable on L1 if the prover has the requisite bond in TST, and that all the above works when there are 300 nodes on the p2p network, and the chain is operating at 1TPS with proving turned on.

### Tasks
- [x] Spec design
just-mitch commented 1 month ago

closed in favor of the two supporting, distinct epics