Skip to content

Commit 0ad45a8

Browse files
committed
Commit error for UBR corrrected
1 parent 5cba838 commit 0ad45a8

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

results.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ How to read this report:
2222
- Grinding (bits): 0
2323
- Field: Goldilocks³
2424
- Rate (ρ): 0.5
25-
- Trace length (H): $2^{22}$
25+
- Trace length (H): $2^{16}$
2626
- FRI folding factor: 16
2727
- FRI early stop degree: 32
2828
- Batching: Powers
2929

30-
**Proof Size Estimate:** 992 KiB, where 1 KiB = 1024 bytes
30+
**Proof Size Estimate:** 24678 KiB, where 1 KiB = 1024 bytes
3131

32-
| regime | total | ALI | DEEP | FRI batching round | FRI commit rounds (×5) | FRI query phase |
33-
| --- | --- | --- | --- | --- | --- | --- |
34-
| UDR | 53 | 185 | 167 | 162 | 165 | 53 |
35-
| JBR | 58 | 181 | 163 | 142 | 159 | 58 |
36-
| best attack | 128 ||||||
32+
| regime | total | ALI | DEEP | FRI batching round | FRI commit round 1 | FRI commit round 2 | FRI commit round 3 | FRI query phase |
33+
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
34+
| UDR | 53 | 180 | 173 | 163 | 175 | 179 | 183 | 53 |
35+
| JBR | 58 | 175 | 169 | 141 | 153 | 157 | 161 | 58 |
36+
| best attack | 128 ||||||||
3737

3838
## Miden
3939

@@ -51,11 +51,11 @@ How to read this report:
5151

5252
**Proof Size Estimate:** 175 KiB, where 1 KiB = 1024 bytes
5353

54-
| regime | total | ALI | DEEP | FRI batching round | FRI commit rounds (×7) | FRI query phase |
55-
| --- | --- | --- | --- | --- | --- | --- |
56-
| UDR | 38 | 121 | 106 | 100 | 105 | 38 |
57-
| JBR | 55 | 115 | 101 | 77 | 98 | 55 |
58-
| best attack | 96 ||||||
54+
| regime | total | ALI | DEEP | FRI batching round | FRI commit round 1 | FRI commit round 2 | FRI commit round 3 | FRI commit round 4 | FRI commit round 5 | FRI commit round 6 | FRI commit round 7 | FRI query phase |
55+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
56+
| UDR | 38 | 121 | 106 | 100 | 107 | 109 | 111 | 113 | 115 | 117 | 119 | 38 |
57+
| JBR | 55 | 115 | 101 | 76 | 83 | 85 | 87 | 89 | 91 | 93 | 95 | 55 |
58+
| best attack | 96 ||||||||||||
5959

6060
## RISC0
6161

@@ -73,11 +73,11 @@ How to read this report:
7373

7474
**Proof Size Estimate:** 576 KiB, where 1 KiB = 1024 bytes
7575

76-
| regime | total | ALI | DEEP | FRI batching round | FRI commit rounds (×4) | FRI query phase |
77-
| --- | --- | --- | --- | --- | --- | --- |
78-
| UDR | 33 | 115 | 100 | 92 | 96 | 33 |
79-
| JBR | 47 | 110 | 95 | 70 | 90 | 47 |
80-
| best attack | 99 ||||||
76+
| regime | total | ALI | DEEP | FRI batching round | FRI commit round 1 | FRI commit round 2 | FRI commit round 3 | FRI commit round 4 | FRI query phase |
77+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
78+
| UDR | 33 | 115 | 100 | 92 | 100 | 104 | 108 | 112 | 33 |
79+
| JBR | 47 | 110 | 95 | 69 | 78 | 82 | 86 | 90 | 47 |
80+
| best attack | 99 |||||||||
8181

8282
## DummyWHIR
8383

soundcalc/regimes/johnson_bound.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ def get_commit_phase_error(self, params: FRIParameters, round_idx: int) -> float
104104

105105
# Compute accumulated folding factor up to round_idx
106106
# TODO: This assumes all folding factors are the same. Generalize!!
107+
folding_factor = params.folding_factor
107108
acc_folding_factor = 1
108109
for i in range(round_idx + 1):
109-
acc_folding_factor *= params.folding_factor
110+
acc_folding_factor *= folding_factor
110111

111-
error *= (params.folding_factor - 1) / acc_folding_factor
112+
error *= (folding_factor - 1) / acc_folding_factor
112113
return error
113114

114115

soundcalc/regimes/unique_decoding.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@ def get_commit_phase_error(self, params: FRIParameters, round_idx: int) -> float
5757
"""
5858
Returns the error for the FRI commit phase for this regime.
5959
"""
60-
D = params.D
61-
FRI_folding_factor = params.folding_factor
62-
F = params.F
6360

64-
fri_folding_error = (D * (FRI_folding_factor - 1)) / F
65-
return fri_folding_error
61+
error = params.D / params.F
62+
63+
# Compute accumulated folding factor up to round_idx
64+
# TODO: This assumes all folding factors are the same. Generalize!!
65+
folding_factor = params.folding_factor
66+
acc_folding_factor = 1
67+
for i in range(round_idx + 1):
68+
acc_folding_factor *= folding_factor
69+
70+
error *= (folding_factor - 1) / acc_folding_factor
71+
return error

soundcalc/zkvms/zisk.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ def default() -> "ZiskPreset":
1313
1414
For ZisK, we populate the trace parameters from its constraint description:
1515
https://github.com/0xPolygonHermez/zisk/blob/main/pil/zisk.pil
16-
17-
The rest of the parameters are adapted from the "eSTARK: Extending STARKs with Arguments" paper:
18-
https://eprint.iacr.org/2023/474
1916
"""
2017

2118
# We generate a STARK proof of different traces with different parameters.
22-
# Therefore, in what follows, I put the parameters for our worst-case trace in terms of area.
19+
# Therefore, in what follows, we put the parameters for our worst-case trace
20+
# in terms of columns and batch size.
2321

2422
# The blowup factor is dinamically chosen by this tool:
2523
# https://github.com/0xPolygonHermez/pil2-proofman-js/blob/main/src/pil2-stark/pil_info/imPolsCalculation/imPolynomials.js#L96
@@ -29,12 +27,12 @@ def default() -> "ZiskPreset":
2927
rho = 1 / blowup_factor
3028

3129
trace_length = 1 << 16
32-
num_columns = 3022
30+
num_columns = 3024
3331
batch_size = 4065
3432

35-
num_queries = 128 // int(math.log2(blowup_factor))
33+
num_queries = 128
3634

37-
AIR_max_degree = blowup_factor + 1
35+
AIR_max_degree = 3
3836

3937
FRI_folding_factor = 2**4
4038
FRI_early_stop_degree = 2**5

0 commit comments

Comments
 (0)