Skip to content

AZIP-24: Track First Prover Attribution for Checkpoints - #64

Merged
koenmtb1 merged 3 commits into
AztecProtocol:mainfrom
aminsammara:azip-first-prover-attribution
Sep 11, 2026
Merged

koenmtb1 merged 3 commits into
AztecProtocol:mainfrom
aminsammara:azip-first-prover-attribution

Conversation

@aminsammara

@aminsammara aminsammara commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds AZIPs/azip-24-first-prover-attribution.md (category: Core, status: Draft).

Authored by Santiago Palladino (@spalladino); opened here on his behalf.

Adds a queryable record of the prover that first advanced the proven tip over each checkpoint. The Rollup writes one sparse attribution entry at the end of each proof range that advances the tip, and getFirstProvenBy(checkpointNumber) resolves any proven checkpoint to the prover whose proof first covered it. This lets a sender or application pay an out-of-protocol tip to the prover that made an L2-to-L1 message available in the outbox, including when that availability came from a proof of only part of an epoch. It adds no protocol rewards and changes no proof validity, message processing, or reward distribution rules.

Notes for review:

  • Requires a Rollup redeploy via the applicable upgrade process, since it changes contract state layout and the IRollup interface. Attribution does not backfill checkpoints proven before activation.
  • discussions-to is N/A, matching prior AZIPs (e.g. AZIP-23, AZIP-16).
  • Number 24 is the next free number (highest currently claimed is 23); happy to have the editor reassign.

@aminsammara
aminsammara requested a review from a team September 9, 2026 09:21
@koenmtb1
koenmtb1 merged commit daefb74 into AztecProtocol:main Sep 11, 2026
1 check failed
ludamad pushed a commit to r3sako/aztec-packages that referenced this pull request Sep 17, 2026
Rebuilds the v6 L1 integration branch on the latest `next` using
cherry-picked commits.

This includes AZIPs
[23](AztecProtocol/governance#58),
[24](AztecProtocol/governance#64),
[25](AztecProtocol/governance#65) (all approved
in last ACD), plus gas optimizations and refactors to work around the
Rollup contract size limit.

## Included PRs

- [AztecProtocol#25260](AztecProtocol#25260) —
feat: introduce a protocol fee margin (AZIP-23)
- [AztecProtocol#25370](AztecProtocol#25370) —
chore: update activity score to only track full epoch proofs (AZIP-25)
- [AztecProtocol#25386](AztecProtocol#25386) —
refactor(l1): reduce full epoch proof gas overhead
- [AztecProtocol#25389](AztecProtocol#25389) —
feat(l1): track which prover first proved each checkpoint (AZIP-24)
- [AztecProtocol#25314](AztecProtocol#25314) —
perf(l1): hold the rollup config in immutables instead of storage
- [AztecProtocol#25404](AztecProtocol#25404) —
feat: only verify new headers
- [AztecProtocol#25406](AztecProtocol#25406) —
feat: optimize proof submission
- [AztecProtocol#25419](AztecProtocol#25419) —
feat: submitProof takes only new headers

## Gas

The reports were regenerated after removing reward overrides. The `next`
comparison is unchanged because no L1 contract files changed on `next`
since this branch point.

### Epoch benchmark

**No validators**

| Function | `next` | This branch | Delta |
|---|---:|---:|---:|
| `propose` avg | 199,366 | 198,220 | -1,146 (-0.6%) |
| `submitEpochRootProof` avg | 991,020 | 925,398 | -65,622 (-6.6%) |
| `submitEpochRootProof` max | 1,029,513 | 966,444 | -63,069 (-6.1%) |
| `submitEpochRootProof` calldata bytes | 14,148 | 14,212 | +64 (+0.5%)
|
| `setupEpoch` avg | 32,042 | 32,020 | -22 (-0.1%) |
| Avg gas/second | 3,643.1 | 3,570.2 | -72.9 (-2.0%) |

**100 validators**

| Function | `next` | This branch | Delta |
|---|---:|---:|---:|
| `propose` avg | 327,769 | 326,630 | -1,139 (-0.3%) |
| `submitEpochRootProof` avg | 1,572,054 | 1,505,290 | -66,764 (-4.2%) |
| `submitEpochRootProof` max | 1,669,957 | 1,605,780 | -64,177 (-3.8%) |
| `submitEpochRootProof` calldata bytes | 16,644 | 16,708 | +64 (+0.4%)
|
| `aggregate3` avg | 376,655 | 375,623 | -1,032 (-0.3%) |
| `setupEpoch` avg | 46,504 | 46,482 | -22 (0.0%) |
| Avg gas/second | 5,937.2 | 5,863.4 | -73.8 (-1.2%) |

### Partial epoch proof benchmark

| Proof submission | `next` | This branch | Delta |
|---|---:|---:|---:|
| 1 checkpoint | 661,245 | 654,868 | -6,377 (-1.0%) |
| 8 checkpoints | 980,349 | 956,875 | -23,474 (-2.4%) |
| 8 more checkpoints | 988,039 | 910,405 | -77,634 (-7.9%) |
| 16 checkpoints | 1,291,446 | 1,246,224 | -45,222 (-3.5%) |
| 32 checkpoints | 1,805,072 | 1,732,651 | -72,421 (-4.0%) |

The partial proof benchmark uses the mock epoch proof verifier; real ZK
verification and top-level transaction calldata gas are excluded.

### Tracked function gas report

The fixed `RollupTest` report now records a 41,936-byte preheated
deployment, a 393,723-gas median for `submitEpochRootProof()`, and
unchanged 283,135-gas median for `propose()`. The owner-only setters pay
one extra delegatecall after moving fee and reward admin paths into
`RewardExtLib`; hot proposal paths still call `FeeLib` directly.

## Contract size

Without the admin-path extraction, the reward-free integration stack
still produces a 24,744-byte `Rollup`, 168 bytes over EIP-170. Moving
those paths into `RewardExtLib` brings runtime bytecode to **22,670
bytes**, 1,906 under the 24,576-byte limit.

CI checks this directly under both the default and production Foundry
profiles via `scripts/check_contract_sizes.sh`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants