Skip to content

Commit f0904bf

Browse files
committed
docs: add proof commitment section
1 parent d0b7c4b commit f0904bf

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

docs/2_architecture/agg_mode_components/1_deep_dive.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The **Aggregation Mode** runs every 24 hours and performs the following steps:
1212
Selected proofs are aggregated using a zkVM.
1313

1414
4. **Construct the Blob**
15-
A blob is built containing the commitments of the aggregated proofs.
15+
A blob is built containing the [commitments](#proof-commitment) of the aggregated proofs.
1616

1717
5. **Send Aggregated Proof**
1818
The final aggregated proof and its blob are sent to the `AlignedProofAggregationService` contract for verification.
@@ -24,6 +24,15 @@ Two separate aggregators are run every 24 hours:
2424
- **Risc0**: Aggregates proofs of types `Composite` and `Succinct`.
2525
- **SP1**: Aggregates `Compressed` proofs.
2626

27+
## Proof Commitment
28+
29+
The **proof commitment** is a hash that uniquely identifies a proof. It is defined as the keccack of the proof public inputs + program ID:
30+
31+
- **For SP1**:
32+
The commitment is computed as: `keccak(proof_public_inputs_bytes || vk_hash_bytes)`
33+
- **For Risc0**:
34+
The commitment is computed as: `keccack(receipt_public_inputs_bytes || image_id_bytes)`
35+
2736
## Multilayer Aggregation
2837

2938
To scale aggregation without exhausting zkVM memory, aggregation is split in two programs:
@@ -35,9 +44,9 @@ To scale aggregation without exhausting zkVM memory, aggregation is split in two
3544
Aggregates all chunk-level proofs into a single final proof. It receives:
3645

3746
- The chunked proofs
38-
- The original proofs commitments included each chunk received
47+
- The original [proofs commitments](#proof-commitment) included each chunk received
3948

40-
During verification, it checks that each chunk’s committed Merkle root matches the reconstructed root to ensure input correctness. The final Merkle rootrepresenting all user proofsis then committed as a public input.
49+
During verification, it checks that each chunk’s committed Merkle root matches the reconstructed root to ensure input correctness. The final Merkle root, representing all user [proofs commitments](#proof-commitment), is then committed as a public input.
4150

4251
## Verification
4352

@@ -71,9 +80,9 @@ The Merkle root is computed and checked for existence in the contract using the
7180

7281
## Data Availability
7382

74-
When submitting the aggregated proof to Ethereum, we include a **blob** that contains the commitments of all the individual proofs that were aggregated. This blob serves two main purposes:
83+
When submitting the aggregated proof to Ethereum, we include a **blob** that contains the [commitments](#proof-commitment) of all the individual proofs that were aggregated. This blob serves two main purposes:
7584

76-
- It makes the proof commitments publicly available for **18 days**.
85+
- It makes the [proof commitments](#proof-commitment) publicly available for **18 days**.
7786
- It allows users to:
7887
- Inspect which proofs were aggregated
7988
- Get a Merkle proof to verify that their proof is included in the aggregated proof
@@ -102,7 +111,7 @@ So the _actual usable capacity_ per blob becomes:
102111

103112
### Current Bottleneck
104113

105-
Since each proof commitment is exactly **32 bytes**, the maximum number of proof commitments that can fit in a single blob is:
114+
Since each [proof commitment](#proof-commitment) is exactly **32 bytes**, the maximum number of proof commitments that can fit in a single blob is:
106115

107116
`126.976 / 32` = `3968 proofs`
108117

0 commit comments

Comments
 (0)