Skip to content

Commit fbda778

Browse files
committed
address additional comments on #712
1 parent c4db809 commit fbda778

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

aggregator/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ This is done by compute the RLCs of chunk[i]'s data_hash for `i=0..k`, and then
101101

102102
4. chunks are continuous when they are not padded: they are linked via the state roots.
103103

104-
for i in 1 ... __k-1__
105104
```
106-
c_i.post_state_root == c_{i+1}.prev_state_root
105+
for i in 1 ... __k-1__
106+
c_i.post_state_root == c_{i+1}.prev_state_root
107107
```
108108

109109
5. All the chunks use a same chain id. __Static__.
@@ -131,7 +131,7 @@ This is done via comparing the `data_rlc` of `chunk_{i-1}` and ` chunk_{i}`.
131131
![Dynamic_inputs](./figures/hash_table.jpg)
132132

133133

134-
Our keccak table uses `2^19` rows. Each keccak round takes `300` rows. When the number of round is is less than $2^19/300$, the cell manager will fill in the rest of the rows with dummy hashes.
134+
Our keccak table uses `2^19` rows. Each keccak round takes `300` rows. When the number of round is is less than `2^{19}/300`, the cell manager will fill in the rest of the rows with dummy hashes.
135135

136136
The only hash that uses dynamic number of rounds is the last hash.
137137
Suppose we target for `MAX_AGG_SNARK = 10`. Then, the last hash function will take no more than `32 * 10 /136 = 3` rounds.

aggregator/figures/architecture.jpg

16.5 KB
Loading

aggregator/src/aggregation/rlc/gates.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,15 @@ impl RlcConfig {
1818
region.assign_fixed(|| "const two", self.fixed, 2, || Value::known(Fr::from(2)))?;
1919
region.assign_fixed(|| "const four", self.fixed, 3, || Value::known(Fr::from(4)))?;
2020
region.assign_fixed(|| "const nine", self.fixed, 4, || Value::known(Fr::from(9)))?;
21+
region.assign_fixed(|| "const 32", self.fixed, 5, || Value::known(Fr::from(32)))?;
2122
region.assign_fixed(
22-
|| "const thirty two",
23-
self.fixed,
24-
5,
25-
|| Value::known(Fr::from(32)),
26-
)?;
27-
region.assign_fixed(
28-
|| "const one hundred and thirty six",
23+
|| "const 136",
2924
self.fixed,
3025
6,
3126
|| Value::known(Fr::from(136)),
3227
)?;
3328
region.assign_fixed(
34-
|| "const two to thirty two",
29+
|| "const 2^32",
3530
self.fixed,
3631
7,
3732
|| Value::known(Fr::from(1 << 32)),

0 commit comments

Comments
 (0)