@aztec/ivc-integration 5.0.0-rc.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ uint256 constant NUMBER_UNSHIFTED = 36;
17
17
  uint256 constant NUMBER_TO_BE_SHIFTED = 5;
18
18
  uint256 constant PAIRING_POINTS_SIZE = 8;
19
19
 
20
- uint256 constant VK_HASH = 0x01786c33cc1da8606b46ccd4ed4335d11fdfbe1dc0ffaf6d7b57aa0f2715b01a;
20
+ uint256 constant VK_HASH = 0x07c98871caca37e86ac6c25718b5414bd0595b39a1b8c84c9f4fdbee2d442944;
21
21
  uint256 constant CIRCUIT_SIZE = 8388608;
22
22
  uint256 constant LOG_N = 23;
23
23
  uint256 constant NUMBER_PUBLIC_INPUTS = 9;
@@ -78,60 +78,60 @@ uint256 internal constant VK_NUM_PUBLIC_INPUTS_LOC = 0x1020;
78
78
  uint256 internal constant VK_PUB_INPUTS_OFFSET_LOC = 0x1040;
79
79
  uint256 internal constant Q_M_X_LOC = 0x1060;
80
80
  uint256 internal constant Q_M_Y_LOC = 0x1080;
81
- uint256 internal constant Q_C_X_LOC = 0x10a0;
82
- uint256 internal constant Q_C_Y_LOC = 0x10c0;
83
- uint256 internal constant Q_L_X_LOC = 0x10e0;
84
- uint256 internal constant Q_L_Y_LOC = 0x1100;
85
- uint256 internal constant Q_R_X_LOC = 0x1120;
86
- uint256 internal constant Q_R_Y_LOC = 0x1140;
87
- uint256 internal constant Q_O_X_LOC = 0x1160;
88
- uint256 internal constant Q_O_Y_LOC = 0x1180;
89
- uint256 internal constant Q_4_X_LOC = 0x11a0;
90
- uint256 internal constant Q_4_Y_LOC = 0x11c0;
91
- uint256 internal constant Q_LOOKUP_X_LOC = 0x11e0;
92
- uint256 internal constant Q_LOOKUP_Y_LOC = 0x1200;
93
- uint256 internal constant Q_ARITH_X_LOC = 0x1220;
94
- uint256 internal constant Q_ARITH_Y_LOC = 0x1240;
95
- uint256 internal constant Q_DELTA_RANGE_X_LOC = 0x1260;
96
- uint256 internal constant Q_DELTA_RANGE_Y_LOC = 0x1280;
97
- uint256 internal constant Q_ELLIPTIC_X_LOC = 0x12a0;
98
- uint256 internal constant Q_ELLIPTIC_Y_LOC = 0x12c0;
99
- uint256 internal constant Q_MEMORY_X_LOC = 0x12e0;
100
- uint256 internal constant Q_MEMORY_Y_LOC = 0x1300;
101
- uint256 internal constant Q_NNF_X_LOC = 0x1320;
102
- uint256 internal constant Q_NNF_Y_LOC = 0x1340;
103
- uint256 internal constant Q_POSEIDON_2_EXTERNAL_X_LOC = 0x1360;
104
- uint256 internal constant Q_POSEIDON_2_EXTERNAL_Y_LOC = 0x1380;
105
- uint256 internal constant Q_POSEIDON_2_INTERNAL_X_LOC = 0x13a0;
106
- uint256 internal constant Q_POSEIDON_2_INTERNAL_Y_LOC = 0x13c0;
107
- uint256 internal constant SIGMA_1_X_LOC = 0x13e0;
108
- uint256 internal constant SIGMA_1_Y_LOC = 0x1400;
109
- uint256 internal constant SIGMA_2_X_LOC = 0x1420;
110
- uint256 internal constant SIGMA_2_Y_LOC = 0x1440;
111
- uint256 internal constant SIGMA_3_X_LOC = 0x1460;
112
- uint256 internal constant SIGMA_3_Y_LOC = 0x1480;
113
- uint256 internal constant SIGMA_4_X_LOC = 0x14a0;
114
- uint256 internal constant SIGMA_4_Y_LOC = 0x14c0;
115
- uint256 internal constant ID_1_X_LOC = 0x14e0;
116
- uint256 internal constant ID_1_Y_LOC = 0x1500;
117
- uint256 internal constant ID_2_X_LOC = 0x1520;
118
- uint256 internal constant ID_2_Y_LOC = 0x1540;
119
- uint256 internal constant ID_3_X_LOC = 0x1560;
120
- uint256 internal constant ID_3_Y_LOC = 0x1580;
121
- uint256 internal constant ID_4_X_LOC = 0x15a0;
122
- uint256 internal constant ID_4_Y_LOC = 0x15c0;
123
- uint256 internal constant TABLE_1_X_LOC = 0x15e0;
124
- uint256 internal constant TABLE_1_Y_LOC = 0x1600;
125
- uint256 internal constant TABLE_2_X_LOC = 0x1620;
126
- uint256 internal constant TABLE_2_Y_LOC = 0x1640;
127
- uint256 internal constant TABLE_3_X_LOC = 0x1660;
128
- uint256 internal constant TABLE_3_Y_LOC = 0x1680;
129
- uint256 internal constant TABLE_4_X_LOC = 0x16a0;
130
- uint256 internal constant TABLE_4_Y_LOC = 0x16c0;
131
- uint256 internal constant LAGRANGE_FIRST_X_LOC = 0x16e0;
132
- uint256 internal constant LAGRANGE_FIRST_Y_LOC = 0x1700;
133
- uint256 internal constant LAGRANGE_LAST_X_LOC = 0x1720;
134
- uint256 internal constant LAGRANGE_LAST_Y_LOC = 0x1740;
81
+ uint256 internal constant Q_L_X_LOC = 0x10a0;
82
+ uint256 internal constant Q_L_Y_LOC = 0x10c0;
83
+ uint256 internal constant Q_R_X_LOC = 0x10e0;
84
+ uint256 internal constant Q_R_Y_LOC = 0x1100;
85
+ uint256 internal constant Q_O_X_LOC = 0x1120;
86
+ uint256 internal constant Q_O_Y_LOC = 0x1140;
87
+ uint256 internal constant Q_4_X_LOC = 0x1160;
88
+ uint256 internal constant Q_4_Y_LOC = 0x1180;
89
+ uint256 internal constant Q_C_X_LOC = 0x11a0;
90
+ uint256 internal constant Q_C_Y_LOC = 0x11c0;
91
+ uint256 internal constant Q_ARITH_X_LOC = 0x11e0;
92
+ uint256 internal constant Q_ARITH_Y_LOC = 0x1200;
93
+ uint256 internal constant SIGMA_1_X_LOC = 0x1220;
94
+ uint256 internal constant SIGMA_1_Y_LOC = 0x1240;
95
+ uint256 internal constant SIGMA_2_X_LOC = 0x1260;
96
+ uint256 internal constant SIGMA_2_Y_LOC = 0x1280;
97
+ uint256 internal constant SIGMA_3_X_LOC = 0x12a0;
98
+ uint256 internal constant SIGMA_3_Y_LOC = 0x12c0;
99
+ uint256 internal constant SIGMA_4_X_LOC = 0x12e0;
100
+ uint256 internal constant SIGMA_4_Y_LOC = 0x1300;
101
+ uint256 internal constant ID_1_X_LOC = 0x1320;
102
+ uint256 internal constant ID_1_Y_LOC = 0x1340;
103
+ uint256 internal constant ID_2_X_LOC = 0x1360;
104
+ uint256 internal constant ID_2_Y_LOC = 0x1380;
105
+ uint256 internal constant ID_3_X_LOC = 0x13a0;
106
+ uint256 internal constant ID_3_Y_LOC = 0x13c0;
107
+ uint256 internal constant ID_4_X_LOC = 0x13e0;
108
+ uint256 internal constant ID_4_Y_LOC = 0x1400;
109
+ uint256 internal constant LAGRANGE_FIRST_X_LOC = 0x1420;
110
+ uint256 internal constant LAGRANGE_FIRST_Y_LOC = 0x1440;
111
+ uint256 internal constant LAGRANGE_LAST_X_LOC = 0x1460;
112
+ uint256 internal constant LAGRANGE_LAST_Y_LOC = 0x1480;
113
+ uint256 internal constant Q_LOOKUP_X_LOC = 0x14a0;
114
+ uint256 internal constant Q_LOOKUP_Y_LOC = 0x14c0;
115
+ uint256 internal constant TABLE_1_X_LOC = 0x14e0;
116
+ uint256 internal constant TABLE_1_Y_LOC = 0x1500;
117
+ uint256 internal constant TABLE_2_X_LOC = 0x1520;
118
+ uint256 internal constant TABLE_2_Y_LOC = 0x1540;
119
+ uint256 internal constant TABLE_3_X_LOC = 0x1560;
120
+ uint256 internal constant TABLE_3_Y_LOC = 0x1580;
121
+ uint256 internal constant TABLE_4_X_LOC = 0x15a0;
122
+ uint256 internal constant TABLE_4_Y_LOC = 0x15c0;
123
+ uint256 internal constant Q_DELTA_RANGE_X_LOC = 0x15e0;
124
+ uint256 internal constant Q_DELTA_RANGE_Y_LOC = 0x1600;
125
+ uint256 internal constant Q_ELLIPTIC_X_LOC = 0x1620;
126
+ uint256 internal constant Q_ELLIPTIC_Y_LOC = 0x1640;
127
+ uint256 internal constant Q_MEMORY_X_LOC = 0x1660;
128
+ uint256 internal constant Q_MEMORY_Y_LOC = 0x1680;
129
+ uint256 internal constant Q_NNF_X_LOC = 0x16a0;
130
+ uint256 internal constant Q_NNF_Y_LOC = 0x16c0;
131
+ uint256 internal constant Q_POSEIDON_2_EXTERNAL_X_LOC = 0x16e0;
132
+ uint256 internal constant Q_POSEIDON_2_EXTERNAL_Y_LOC = 0x1700;
133
+ uint256 internal constant Q_POSEIDON_2_INTERNAL_X_LOC = 0x1720;
134
+ uint256 internal constant Q_POSEIDON_2_INTERNAL_Y_LOC = 0x1740;
135
135
 
136
136
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
137
137
  /* PROOF INDICIES */
@@ -352,34 +352,34 @@ uint256 internal constant SUMCHECK_UNIVARIATE_22_7_LOC = 0x3140;
352
352
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
353
353
  /* PROOF INDICIES - SUMCHECK EVALUATIONS */
354
354
  /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
355
- uint256 internal constant QM_EVAL_LOC = 0x3160;
356
- uint256 internal constant QC_EVAL_LOC = 0x3180;
357
- uint256 internal constant QL_EVAL_LOC = 0x31a0;
358
- uint256 internal constant QR_EVAL_LOC = 0x31c0;
359
- uint256 internal constant QO_EVAL_LOC = 0x31e0;
360
- uint256 internal constant Q4_EVAL_LOC = 0x3200;
361
- uint256 internal constant QLOOKUP_EVAL_LOC = 0x3220;
362
- uint256 internal constant QARITH_EVAL_LOC = 0x3240;
363
- uint256 internal constant QRANGE_EVAL_LOC = 0x3260;
364
- uint256 internal constant QELLIPTIC_EVAL_LOC = 0x3280;
365
- uint256 internal constant QMEMORY_EVAL_LOC = 0x32a0;
366
- uint256 internal constant QNNF_EVAL_LOC = 0x32c0;
367
- uint256 internal constant QPOSEIDON2_EXTERNAL_EVAL_LOC = 0x32e0;
368
- uint256 internal constant QPOSEIDON2_INTERNAL_EVAL_LOC = 0x3300;
369
- uint256 internal constant SIGMA1_EVAL_LOC = 0x3320;
370
- uint256 internal constant SIGMA2_EVAL_LOC = 0x3340;
371
- uint256 internal constant SIGMA3_EVAL_LOC = 0x3360;
372
- uint256 internal constant SIGMA4_EVAL_LOC = 0x3380;
373
- uint256 internal constant ID1_EVAL_LOC = 0x33a0;
374
- uint256 internal constant ID2_EVAL_LOC = 0x33c0;
375
- uint256 internal constant ID3_EVAL_LOC = 0x33e0;
376
- uint256 internal constant ID4_EVAL_LOC = 0x3400;
377
- uint256 internal constant TABLE1_EVAL_LOC = 0x3420;
378
- uint256 internal constant TABLE2_EVAL_LOC = 0x3440;
379
- uint256 internal constant TABLE3_EVAL_LOC = 0x3460;
380
- uint256 internal constant TABLE4_EVAL_LOC = 0x3480;
381
- uint256 internal constant LAGRANGE_FIRST_EVAL_LOC = 0x34a0;
382
- uint256 internal constant LAGRANGE_LAST_EVAL_LOC = 0x34c0;
355
+ uint256 internal constant SIGMA1_EVAL_LOC = 0x3160;
356
+ uint256 internal constant SIGMA2_EVAL_LOC = 0x3180;
357
+ uint256 internal constant SIGMA3_EVAL_LOC = 0x31a0;
358
+ uint256 internal constant SIGMA4_EVAL_LOC = 0x31c0;
359
+ uint256 internal constant ID1_EVAL_LOC = 0x31e0;
360
+ uint256 internal constant ID2_EVAL_LOC = 0x3200;
361
+ uint256 internal constant ID3_EVAL_LOC = 0x3220;
362
+ uint256 internal constant ID4_EVAL_LOC = 0x3240;
363
+ uint256 internal constant LAGRANGE_FIRST_EVAL_LOC = 0x3260;
364
+ uint256 internal constant LAGRANGE_LAST_EVAL_LOC = 0x3280;
365
+ uint256 internal constant QLOOKUP_EVAL_LOC = 0x32a0;
366
+ uint256 internal constant TABLE1_EVAL_LOC = 0x32c0;
367
+ uint256 internal constant TABLE2_EVAL_LOC = 0x32e0;
368
+ uint256 internal constant TABLE3_EVAL_LOC = 0x3300;
369
+ uint256 internal constant TABLE4_EVAL_LOC = 0x3320;
370
+ uint256 internal constant QM_EVAL_LOC = 0x3340;
371
+ uint256 internal constant QR_EVAL_LOC = 0x3360;
372
+ uint256 internal constant QO_EVAL_LOC = 0x3380;
373
+ uint256 internal constant QC_EVAL_LOC = 0x33a0;
374
+ uint256 internal constant QL_EVAL_LOC = 0x33c0;
375
+ uint256 internal constant Q4_EVAL_LOC = 0x33e0;
376
+ uint256 internal constant QARITH_EVAL_LOC = 0x3400;
377
+ uint256 internal constant QRANGE_EVAL_LOC = 0x3420;
378
+ uint256 internal constant QELLIPTIC_EVAL_LOC = 0x3440;
379
+ uint256 internal constant QMEMORY_EVAL_LOC = 0x3460;
380
+ uint256 internal constant QNNF_EVAL_LOC = 0x3480;
381
+ uint256 internal constant QPOSEIDON2_EXTERNAL_EVAL_LOC = 0x34a0;
382
+ uint256 internal constant QPOSEIDON2_INTERNAL_EVAL_LOC = 0x34c0;
383
383
  uint256 internal constant W1_EVAL_LOC = 0x34e0;
384
384
  uint256 internal constant W2_EVAL_LOC = 0x3500;
385
385
  uint256 internal constant W3_EVAL_LOC = 0x3520;
@@ -1488,62 +1488,62 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
1488
1488
  //
1489
1489
  // Although defined at the top of the file, it is used towards the end of the algorithm when batching in the commitment scheme.
1490
1490
  function loadVk() {
1491
- mstore(Q_L_X_LOC, 0x15deea1bc7d9d2c60121dfbc3b8e00951d807d895bab264b4adbe1e8495a7dab)
1492
- mstore(Q_L_Y_LOC, 0x19feb5923362c1e4a2aae2b259c75ba73c08c247a8034a38c89f987bd53a8276)
1493
- mstore(Q_R_X_LOC, 0x052f74110a4655f3b106323dc5a3f0c8ea3c0560f5ae91f3b6e1a69e3ff35f2f)
1494
- mstore(Q_R_Y_LOC, 0x0af903332590b764556a4c1b293077c8fc70b3fd9723d6e6e38942dba2ba1b18)
1495
- mstore(Q_O_X_LOC, 0x29be56a1b04124bd5442b56f3cf8bab536a3d0d5035da53b21ab49f022ad73b7)
1496
- mstore(Q_O_Y_LOC, 0x265088f82d20f8b61fac47bae678d525f1514b5cb6fe6f56fd5fbf5f14270594)
1497
- mstore(Q_4_X_LOC, 0x2fd361b848d64c2d50fe978bd66c333363ae9e67c63ffbef2d72fd912662a78e)
1498
- mstore(Q_4_Y_LOC, 0x2f85008d63441ffdc0c1016b8d857e94fc12814fb91bb8f340b79f6faf35269f)
1499
- mstore(Q_M_X_LOC, 0x116635fe4742ca6ac22ac0062f3dfa2b9ff456a19510515a4207d425e52467b4)
1500
- mstore(Q_M_Y_LOC, 0x0b893914542481ade7340849458a3ed44f45474085ded8d9af2d26d89ba8fb1a)
1501
- mstore(Q_C_X_LOC, 0x06331b294365467e1ef325f20b7cebc2e81eb1b95e5d814bffab986da3b62fb0)
1502
- mstore(Q_C_Y_LOC, 0x1670f7baa75c8b06149c3b842821a4be6ab3248ae79077b0d7a415196e3a0441)
1491
+ mstore(Q_L_X_LOC, 0x266f8f950e7cc410bddd9930f8c3a00c133f92ee4df2216a177b5d75a020798b)
1492
+ mstore(Q_L_Y_LOC, 0x1f43f2cf241bcf4c3c7ede25dd81852405b16f29affa5f7359bf9b78e8a9223a)
1493
+ mstore(Q_R_X_LOC, 0x24fb21770364692650bcfab3fa5c3f6e2e95fbb99fda9b627447d6a8446a3e74)
1494
+ mstore(Q_R_Y_LOC, 0x28567fa40846692ea5cdbfb29a90bd9a3fae3ff4124d3f5b7a6e20b6b93bfe84)
1495
+ mstore(Q_O_X_LOC, 0x04f2eccb696c34ee35974bc4a727a9c54a3631b00175d35099d9d1780991d01a)
1496
+ mstore(Q_O_Y_LOC, 0x1c0c557f55848daebe1a8077581afd8f65ecf0055fb81a26c7815216e8183ce4)
1497
+ mstore(Q_4_X_LOC, 0x06ef4ad658e63c4871a4c738054600f22d3f534b312111bd87caa22649e48a5e)
1498
+ mstore(Q_4_Y_LOC, 0x0f865f9980e1ea167c71fd8adc38a071faf88d18013eb8e386f3667fefdfb07f)
1499
+ mstore(Q_M_X_LOC, 0x2cc07e9899405eb46199b948e64b0490b319ba4aea19609261c5f25296024710)
1500
+ mstore(Q_M_Y_LOC, 0x20ded4644132720bc347bf2a93431404e5dba03efd4a0452747f0ea5bae963de)
1501
+ mstore(Q_C_X_LOC, 0x0bfc84b66a7e04961f0d224b2b0099cbeab86e223599c366a56493d899033e02)
1502
+ mstore(Q_C_Y_LOC, 0x261d3758a568c7141fceb0ed57c0934ac7513abd885de0963740adc621f4d8ec)
1503
1503
  mstore(Q_LOOKUP_X_LOC, 0x1c0cfe6ede8bc5008e77dc50170c034d9bb0db100d780651baa56ae5e41bc21a)
1504
1504
  mstore(Q_LOOKUP_Y_LOC, 0x2faffdb1f4a3286451b0188b2eea1912bfeab8d50bee0f054bf360e765d65c84)
1505
- mstore(Q_ARITH_X_LOC, 0x0357b5e2edd70f0ffbcd2d0b7f7f72317d2793b8f963a7f91c342f0052012287)
1506
- mstore(Q_ARITH_Y_LOC, 0x1cce6e0766a511df103be08c8b7f600a5fe47b4756c2ce79ebfe973cb6a761e2)
1507
- mstore(Q_DELTA_RANGE_X_LOC, 0x04a372a3caa8cea80cc9da823721f0633d90da1ab11b71fbce4536768b2d7191)
1508
- mstore(Q_DELTA_RANGE_Y_LOC, 0x200681a67120021e48927f864967790651ce498c4976fde8d7186bb6fb3cac5f)
1509
- mstore(Q_ELLIPTIC_X_LOC, 0x0251903fff185a6b469b98268645f6d71ccb1caa77148a7cb8bed21ff0e2a9a0)
1510
- mstore(Q_ELLIPTIC_Y_LOC, 0x1f37cb103ac90ab74c16101fd86911fa7f5bf6099adcc0334e89cd47ae89487f)
1511
- mstore(Q_MEMORY_X_LOC, 0x16e105949dbb91ed243f7eed2b1355a17528e6ed0feb5a373efacf1bf5916873)
1512
- mstore(Q_MEMORY_Y_LOC, 0x25c1bd1a460076a7b842eb13af6959caa6bbb6ddb335a77c8b87e63692fc4fc7)
1513
- mstore(Q_NNF_X_LOC, 0x183b27a7aa1493291187ec12d96eeccb9e54d4df12a84b8971210dfb702c865a)
1514
- mstore(Q_NNF_Y_LOC, 0x1997af902bf3587bd095efce329f0d0e5b93a1d6abfd406f99c65d120cdd0962)
1515
- mstore(Q_POSEIDON_2_EXTERNAL_X_LOC, 0x16f78ce5627b7e6c4074a388c19977c09b67c889d15818effbb1bc95915cef20)
1516
- mstore(Q_POSEIDON_2_EXTERNAL_Y_LOC, 0x08601b34b6cc37563b33cbaf55897f03119477a0b811c3e2c772059f15d899c9)
1517
- mstore(Q_POSEIDON_2_INTERNAL_X_LOC, 0x1ffe5d58c2487ca3e76873c61385e98bf8faab19e1f826191dd07b581589b8ff)
1518
- mstore(Q_POSEIDON_2_INTERNAL_Y_LOC, 0x07edf1538b3cc2bfa3fcfaf60158501b701339c73d120f130206ae66c104d263)
1519
- mstore(SIGMA_1_X_LOC, 0x1303588e1e0cae09e0e37ad83de34a0dc279a988df89993a4beb705e0aa2d5f6)
1520
- mstore(SIGMA_1_Y_LOC, 0x1a1c7f8fb2f8acfdcbd57de5a23c2acc0b78e53da174a2d3f7c9da7f1fc51e9f)
1521
- mstore(SIGMA_2_X_LOC, 0x29825b2485507ec1911acdfb4b7b6585cfde2311972b29ed8818a9ae34530524)
1522
- mstore(SIGMA_2_Y_LOC, 0x2dac14870ac386b27a9f210685d107116bc5c469105a9352afd898e949105be7)
1523
- mstore(SIGMA_3_X_LOC, 0x25bbd79c56f02c362678d5561987e1ade78f3a3ee71192985f7cd217cf7409d6)
1524
- mstore(SIGMA_3_Y_LOC, 0x12fb04ad6dd8e76721b6c74a74a2a7d909ca8e3127aa5640faf8407694ea207c)
1525
- mstore(SIGMA_4_X_LOC, 0x17fa042e292b749264b93d82f1e13bc61f664f7e3f08f021e12fb2547419c369)
1526
- mstore(SIGMA_4_Y_LOC, 0x18d162e80f3730c4663efb7033b2a849b26fad984793dee1d826616fa328d3ec)
1505
+ mstore(Q_ARITH_X_LOC, 0x18235c35733e49a4ee735b218efffc17fc425bc2f46a4f434b46b5d10ce6cd8a)
1506
+ mstore(Q_ARITH_Y_LOC, 0x12c9176e45dd23d50e0afcfb7399e1cd284b06457e90b5b682829befd288bb5e)
1507
+ mstore(Q_DELTA_RANGE_X_LOC, 0x0bbb6c919c20f3749cc50dce1d6054448298e3cefbc86ca9e2968a478b6223b8)
1508
+ mstore(Q_DELTA_RANGE_Y_LOC, 0x1684320ba7d58a9d4dcfa4b4430fe139a92b0c657808b6bcc3bafb690113eecf)
1509
+ mstore(Q_ELLIPTIC_X_LOC, 0x18bb397835907475b80ff0d82cefb433969ce793e3d698f41c1d5cb4631ba7d4)
1510
+ mstore(Q_ELLIPTIC_Y_LOC, 0x1967fef15d40001376dffd21194d25634d05913ed905da13a400bb7e8ef8943c)
1511
+ mstore(Q_MEMORY_X_LOC, 0x02a03924d162621287fc6df3b1ed5fc4a0a913cb274678014eab07799bf3526a)
1512
+ mstore(Q_MEMORY_Y_LOC, 0x2cc5db39274389c6b13e7ccc9ec1b0678740336f2e510bb403eb6239e1b2340a)
1513
+ mstore(Q_NNF_X_LOC, 0x119b829e11973fc49cb9097048d8e23653527328ab2afbd1557f8ce99141d789)
1514
+ mstore(Q_NNF_Y_LOC, 0x0831367eef1d6379b5197fc810dc4f1f2235d18a5800703231d4e70eccd91d2a)
1515
+ mstore(Q_POSEIDON_2_EXTERNAL_X_LOC, 0x03db6e9358b18e4dcda1cd8accf6a003506db494aa61d6aa41084979640f227c)
1516
+ mstore(Q_POSEIDON_2_EXTERNAL_Y_LOC, 0x1580f0a78734e5ec860f22770606b1175552d7f9e4aa88d7016ee5511c0b7182)
1517
+ mstore(Q_POSEIDON_2_INTERNAL_X_LOC, 0x0fa2b4c712b39d006ea698d7c251d25f21ea14606deab6327e53f244b1fc1d67)
1518
+ mstore(Q_POSEIDON_2_INTERNAL_Y_LOC, 0x2e231bb9625faab409fab282e15798931b67cbbedd1f52a27a15c36ee9b76ce6)
1519
+ mstore(SIGMA_1_X_LOC, 0x0a3fa93f97d2f05e14c53a68e55ee16f71cd446f6c14cdb98c0f466f3202bb31)
1520
+ mstore(SIGMA_1_Y_LOC, 0x0120891dcd60a3b560493736fe9ef73a6b962bc2c4ebf891cf23dfe4aba1b73f)
1521
+ mstore(SIGMA_2_X_LOC, 0x16d7fd93ec25d47d71c02bcac8219f676bc843985b14d0ac367969c8ddfdbd56)
1522
+ mstore(SIGMA_2_Y_LOC, 0x0b71cd63fad04e4c6ed178b9d1b8c0f2a4965b2101658b087cb31ccb3ea3ded6)
1523
+ mstore(SIGMA_3_X_LOC, 0x109f76c8406a85a19d157e5db90e33d2e2bd7fecff9652dc032fcc71eed5a5b8)
1524
+ mstore(SIGMA_3_Y_LOC, 0x0cadde9e700b2a028556a164a38784b81f985ed411c00318458b78f611295578)
1525
+ mstore(SIGMA_4_X_LOC, 0x11dd533e343cee02661dd36a62f8b6eb95c06674d9a4e14224d78697bf9671d1)
1526
+ mstore(SIGMA_4_Y_LOC, 0x0ffc851c7ae65e45ef715f1368bf02bbfcaa0ebf7d84eaa98b791bd9f367660e)
1527
1527
  mstore(TABLE_1_X_LOC, 0x16443a277592bfa02dad5494d8eb9787d52526911b9f8235d8bdcb10c6820470)
1528
1528
  mstore(TABLE_1_Y_LOC, 0x17c5d9cf0ea21684ca1d3f322bb9ae15ef1f520bf5a8ebc3def2cd7ededbe2df)
1529
1529
  mstore(TABLE_2_X_LOC, 0x13d3fb39c513d2f0262a4b6fb623b4233b47dec56c504f9cc3cbe08ea9354290)
1530
1530
  mstore(TABLE_2_Y_LOC, 0x1d09013479288e1ec0d43ac4bdbc38221620247eeea24df2e0f03d8458006cbe)
1531
1531
  mstore(TABLE_3_X_LOC, 0x210f0c8996bd1c5d47807bdcc570158bfa246e7eba5c4fe2c438c56165cc724e)
1532
1532
  mstore(TABLE_3_Y_LOC, 0x10ca3c505536d09fc7245489816db24301742a8917eb50f4071218016db04b1c)
1533
- mstore(TABLE_4_X_LOC, 0x09f7c8bd22e516c2bdf44aecebd64609f9acd7f2874e8ecfc8498dc0540d5fd8)
1534
- mstore(TABLE_4_Y_LOC, 0x01fbe79027e589242d4f7064cd6ef12d30805b5c5f2bb2abd1313716811620ff)
1535
- mstore(ID_1_X_LOC, 0x192b8e52b81b7ecfd00a99c4b681f85c2c95b4ac80bb8fc1e80ddaae5c5d7b17)
1536
- mstore(ID_1_Y_LOC, 0x29a86efa098f35ef298fc53fecf251669300f150407042947028456d45e2667f)
1537
- mstore(ID_2_X_LOC, 0x15d6877ad412bc64a806197ef32eada875fedd5fff1cd13f7d6a3a0c7a1139f9)
1538
- mstore(ID_2_Y_LOC, 0x28de476b70e0f69f2e08d35527270bf25ee6e232b99e3ac80724da9f32bc874a)
1539
- mstore(ID_3_X_LOC, 0x03736e18803052188934a1459de6507986a7c03f30748c8922853d5417189fd7)
1540
- mstore(ID_3_Y_LOC, 0x292dbcc2718017f7c81e278a184c6a222ccab240546313ca78b3a8aba0476c4c)
1541
- mstore(ID_4_X_LOC, 0x23412d1a2be890c41773bb1cbac22d1ec4cca3076e594eaccbf871d369a7d8a5)
1542
- mstore(ID_4_Y_LOC, 0x302b7d8794666945100e19feca0205965a325cf807f332d3f9bcd2208a82c3f1)
1533
+ mstore(TABLE_4_X_LOC, 0x00c0d89efb87227119619ed0201ecfbf9ec361b963c09c860929a7ea0d177fcc)
1534
+ mstore(TABLE_4_Y_LOC, 0x1af7899ecd2402e40876edff724f3b17a1e8123ea8e45b1059d1092b56366b16)
1535
+ mstore(ID_1_X_LOC, 0x0bc7b5426730abdefbcc43758ad58074e3b35c8f17570a3e7b36018532c10b1b)
1536
+ mstore(ID_1_Y_LOC, 0x170fb559715a450662ee666b6f5c5eb575ef7ea96c12c5da13c186eb9531aab4)
1537
+ mstore(ID_2_X_LOC, 0x272829bf7dcd66ce035f3d1cd8e0609e39d17102f7874add698cf230b7a14fb8)
1538
+ mstore(ID_2_Y_LOC, 0x25e529b45424c2f6d400fa40a2f4410a77029fd72141c68b14815ddb082e04d7)
1539
+ mstore(ID_3_X_LOC, 0x3015958b4c9eb9165e32377103715d2d890df7259de80f600cd81a55db5a3447)
1540
+ mstore(ID_3_Y_LOC, 0x300a0227780cfd6928de98302c95e1b2aabde37ac4537256e6dc67b2a5b13d34)
1541
+ mstore(ID_4_X_LOC, 0x06b07c5d4a8194e7c04f1e13859fa4eb615d58ca393d4ac82ddf8e2321c9ca4c)
1542
+ mstore(ID_4_Y_LOC, 0x07b94fc59794171d6e49b2ff99215cbf74997e4d2bb83d03f0d65131c1873dd4)
1543
1543
  mstore(LAGRANGE_FIRST_X_LOC, 0x2a56ce41f6b0be13b9c26747621b821eee81b23a887f299049b14c11e98460d6)
1544
1544
  mstore(LAGRANGE_FIRST_Y_LOC, 0x1aa98f2de3ddda547d8f6de4e725ded5827d6338c78656c0d12ca1aea6ef2c7c)
1545
- mstore(LAGRANGE_LAST_X_LOC, 0x21a4bedf5198d8bc48cd06a63e64fda9710e53941421c425155dad9f24a7d20b)
1546
- mstore(LAGRANGE_LAST_Y_LOC, 0x0a514f3ab2ae22bc189a2c0c772a14ec625cdd40e27d50065340c68268689464)
1545
+ mstore(LAGRANGE_LAST_X_LOC, 0x0c24e60d84099e9082e40565845a3000ff5569863e6dba732d04a727397a650e)
1546
+ mstore(LAGRANGE_LAST_Y_LOC, 0x0e459462ded81435c6299c69ff409de183633dc4adfba31d83d25a87672c86b4)
1547
1547
  }
1548
1548
 
1549
1549
  // Prime field order - placing on the stack
@@ -1797,7 +1797,7 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
1797
1797
  // 8 points are sent as it is enough to uniquely identify the polynomial
1798
1798
  let read_off := SUMCHECK_UNIVARIATE_0_0_LOC
1799
1799
  let write_off := SUM_U_CHALLENGE_0
1800
- for {} lt(read_off, QM_EVAL_LOC) {} {
1800
+ for {} lt(read_off, SIGMA1_EVAL_LOC) {} {
1801
1801
  // Increase by 20 * batched relation length (8)
1802
1802
  // 0x20 * 0x8 = 0x100
1803
1803
  mcopy(0x20, read_off, 0x100)
@@ -1862,7 +1862,7 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
1862
1862
  //
1863
1863
  // Hash of all of the above evaluations
1864
1864
  // Number of bytes to copy = 0x20 * NUMBER_OF_ENTITIES (41) = 0x520
1865
- mcopy(0x20, QM_EVAL_LOC, 0x520)
1865
+ mcopy(0x20, SIGMA1_EVAL_LOC, 0x520)
1866
1866
  prev_challenge := mod(keccak256(0x00, 0x540), p)
1867
1867
  mstore(0x00, prev_challenge)
1868
1868
 
@@ -3407,12 +3407,12 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
3407
3407
  let contribution_0 :=
3408
3408
  addmod(identity, mulmod(addmod(q_arith, sub(p, 1), p), mload(W4_SHIFT_EVAL_LOC), p), p)
3409
3409
  contribution_0 := mulmod(mulmod(contribution_0, q_arith, p), mload(POW_PARTIAL_EVALUATION_LOC), p)
3410
- mstore(SUBRELATION_EVAL_0_LOC, contribution_0)
3410
+ mstore(SUBRELATION_EVAL_6_LOC, contribution_0)
3411
3411
 
3412
3412
  let contribution_1 := mulmod(extra_small_addition_gate_identity, addmod(q_arith, sub(p, 1), p), p)
3413
3413
  contribution_1 := mulmod(contribution_1, q_arith, p)
3414
3414
  contribution_1 := mulmod(contribution_1, mload(POW_PARTIAL_EVALUATION_LOC), p)
3415
- mstore(SUBRELATION_EVAL_1_LOC, contribution_1)
3415
+ mstore(SUBRELATION_EVAL_7_LOC, contribution_1)
3416
3416
  }
3417
3417
 
3418
3418
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
@@ -3481,14 +3481,14 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
3481
3481
  )
3482
3482
 
3483
3483
  acc := mulmod(acc, mload(POW_PARTIAL_EVALUATION_LOC), p)
3484
- mstore(SUBRELATION_EVAL_2_LOC, acc)
3484
+ mstore(SUBRELATION_EVAL_0_LOC, acc)
3485
3485
 
3486
3486
  acc := mulmod(
3487
3487
  mulmod(mload(LAGRANGE_LAST_EVAL_LOC), mload(Z_PERM_SHIFT_EVAL_LOC), p),
3488
3488
  mload(POW_PARTIAL_EVALUATION_LOC),
3489
3489
  p
3490
3490
  )
3491
- mstore(SUBRELATION_EVAL_3_LOC, acc)
3491
+ mstore(SUBRELATION_EVAL_1_LOC, acc)
3492
3492
  }
3493
3493
 
3494
3494
  // Contribution 4: z_perm initialization (lagrange_first * z_perm = 0)
@@ -3498,7 +3498,7 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
3498
3498
  mload(POW_PARTIAL_EVALUATION_LOC),
3499
3499
  p
3500
3500
  )
3501
- mstore(SUBRELATION_EVAL_4_LOC, acc)
3501
+ mstore(SUBRELATION_EVAL_2_LOC, acc)
3502
3502
  }
3503
3503
  }
3504
3504
 
@@ -3563,9 +3563,9 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
3563
3563
  let read_tag_boolean_relation := mulmod(read_tag, addmod(read_tag, sub(p, 1), p), p)
3564
3564
  read_tag_boolean_relation := mulmod(read_tag_boolean_relation, mload(POW_PARTIAL_EVALUATION_LOC), p)
3565
3565
 
3566
- mstore(SUBRELATION_EVAL_5_LOC, accumulator_none)
3567
- mstore(SUBRELATION_EVAL_6_LOC, accumulator_one)
3568
- mstore(SUBRELATION_EVAL_7_LOC, read_tag_boolean_relation)
3566
+ mstore(SUBRELATION_EVAL_3_LOC, accumulator_none)
3567
+ mstore(SUBRELATION_EVAL_4_LOC, accumulator_one)
3568
+ mstore(SUBRELATION_EVAL_5_LOC, read_tag_boolean_relation)
3569
3569
  }
3570
3570
 
3571
3571
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
@@ -4487,165 +4487,147 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4487
4487
  // mem.batchingChallenge = mem.batchingChallenge * tp.rho;
4488
4488
  // }
4489
4489
 
4490
- // Calculate the scalars and batching challenge for the unshifted entities
4491
- // 0: QM_EVAL_LOC
4490
+ // Iteration order matches UltraFlavor_Generated::EntityId. Scalar slot N = entity index N + 1
4491
+ // pairs with vk[N] in the batchMul block below.
4492
+
4493
+ // 0: SIGMA1_EVAL_LOC
4492
4494
  mstore(BATCH_SCALAR_1_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4493
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QM_EVAL_LOC), batching_challenge, p), p)
4495
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA1_EVAL_LOC), batching_challenge, p), p)
4494
4496
  batching_challenge := mulmod(batching_challenge, rho, p)
4495
4497
 
4496
- // 1: QC_EVAL_LOC
4498
+ // 1: SIGMA2_EVAL_LOC
4497
4499
  mstore(BATCH_SCALAR_2_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4498
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QC_EVAL_LOC), batching_challenge, p), p)
4500
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA2_EVAL_LOC), batching_challenge, p), p)
4499
4501
  batching_challenge := mulmod(batching_challenge, rho, p)
4500
4502
 
4501
- // 2: QL_EVAL_LOC
4503
+ // 2: SIGMA3_EVAL_LOC
4502
4504
  mstore(BATCH_SCALAR_3_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4503
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QL_EVAL_LOC), batching_challenge, p), p)
4505
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA3_EVAL_LOC), batching_challenge, p), p)
4504
4506
  batching_challenge := mulmod(batching_challenge, rho, p)
4505
4507
 
4506
- // 3: QR_EVAL_LOC
4508
+ // 3: SIGMA4_EVAL_LOC
4507
4509
  mstore(BATCH_SCALAR_4_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4508
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QR_EVAL_LOC), batching_challenge, p), p)
4510
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA4_EVAL_LOC), batching_challenge, p), p)
4509
4511
  batching_challenge := mulmod(batching_challenge, rho, p)
4510
4512
 
4511
- // 4: QO_EVAL_LOC
4513
+ // 4: ID1_EVAL_LOC
4512
4514
  mstore(BATCH_SCALAR_5_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4513
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QO_EVAL_LOC), batching_challenge, p), p)
4515
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID1_EVAL_LOC), batching_challenge, p), p)
4514
4516
  batching_challenge := mulmod(batching_challenge, rho, p)
4515
4517
 
4516
- // 5: Q4_EVAL_LOC
4518
+ // 5: ID2_EVAL_LOC
4517
4519
  mstore(BATCH_SCALAR_6_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4518
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(Q4_EVAL_LOC), batching_challenge, p), p)
4520
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID2_EVAL_LOC), batching_challenge, p), p)
4519
4521
  batching_challenge := mulmod(batching_challenge, rho, p)
4520
4522
 
4521
- // 6: QLOOKUP_EVAL_LOC
4523
+ // 6: ID3_EVAL_LOC
4522
4524
  mstore(BATCH_SCALAR_7_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4523
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QLOOKUP_EVAL_LOC), batching_challenge, p), p)
4525
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID3_EVAL_LOC), batching_challenge, p), p)
4524
4526
  batching_challenge := mulmod(batching_challenge, rho, p)
4525
4527
 
4526
- // 7: QARITH_EVAL_LOC
4528
+ // 7: ID4_EVAL_LOC
4527
4529
  mstore(BATCH_SCALAR_8_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4528
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QARITH_EVAL_LOC), batching_challenge, p), p)
4530
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID4_EVAL_LOC), batching_challenge, p), p)
4529
4531
  batching_challenge := mulmod(batching_challenge, rho, p)
4530
4532
 
4531
- // 8: QRANGE_EVAL_LOC
4533
+ // 8: LAGRANGE_FIRST_EVAL_LOC
4532
4534
  mstore(BATCH_SCALAR_9_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4533
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QRANGE_EVAL_LOC), batching_challenge, p), p)
4535
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(LAGRANGE_FIRST_EVAL_LOC), batching_challenge, p), p)
4534
4536
  batching_challenge := mulmod(batching_challenge, rho, p)
4535
4537
 
4536
- // 9: QELLIPTIC_EVAL_LOC
4538
+ // 9: LAGRANGE_LAST_EVAL_LOC
4537
4539
  mstore(BATCH_SCALAR_10_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4538
- batched_evaluation := addmod(
4539
- batched_evaluation,
4540
- mulmod(mload(QELLIPTIC_EVAL_LOC), batching_challenge, p),
4541
- p
4542
- )
4540
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(LAGRANGE_LAST_EVAL_LOC), batching_challenge, p), p)
4543
4541
  batching_challenge := mulmod(batching_challenge, rho, p)
4544
4542
 
4545
- // 10: QMEMORY_EVAL_LOC
4543
+ // 10: QLOOKUP_EVAL_LOC
4546
4544
  mstore(BATCH_SCALAR_11_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4547
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QMEMORY_EVAL_LOC), batching_challenge, p), p)
4545
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QLOOKUP_EVAL_LOC), batching_challenge, p), p)
4548
4546
  batching_challenge := mulmod(batching_challenge, rho, p)
4549
4547
 
4550
- // 11: QNNF_EVAL_LOC
4548
+ // 11: TABLE1_EVAL_LOC
4551
4549
  mstore(BATCH_SCALAR_12_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4552
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(QNNF_EVAL_LOC), batching_challenge, p), p)
4550
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE1_EVAL_LOC), batching_challenge, p), p)
4553
4551
  batching_challenge := mulmod(batching_challenge, rho, p)
4554
4552
 
4555
- // 12: QPOSEIDON2_EXTERNAL_EVAL_LOC
4553
+ // 12: TABLE2_EVAL_LOC
4556
4554
  mstore(BATCH_SCALAR_13_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4557
- batched_evaluation := addmod(
4558
- batched_evaluation,
4559
- mulmod(mload(QPOSEIDON2_EXTERNAL_EVAL_LOC), batching_challenge, p),
4560
- p
4561
- )
4555
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE2_EVAL_LOC), batching_challenge, p), p)
4562
4556
  batching_challenge := mulmod(batching_challenge, rho, p)
4563
4557
 
4564
- // 13: QPOSEIDON2_INTERNAL_EVAL_LOC
4558
+ // 13: TABLE3_EVAL_LOC
4565
4559
  mstore(BATCH_SCALAR_14_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4566
- batched_evaluation := addmod(
4567
- batched_evaluation,
4568
- mulmod(mload(QPOSEIDON2_INTERNAL_EVAL_LOC), batching_challenge, p),
4569
- p
4570
- )
4560
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE3_EVAL_LOC), batching_challenge, p), p)
4571
4561
  batching_challenge := mulmod(batching_challenge, rho, p)
4572
4562
 
4573
- // 14: SIGMA1_EVAL_LOC
4563
+ // 14: TABLE4_EVAL_LOC
4574
4564
  mstore(BATCH_SCALAR_15_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4575
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA1_EVAL_LOC), batching_challenge, p), p)
4565
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE4_EVAL_LOC), batching_challenge, p), p)
4576
4566
  batching_challenge := mulmod(batching_challenge, rho, p)
4577
4567
 
4578
- // 15: SIGMA2_EVAL_LOC
4568
+ // 15: QM_EVAL_LOC
4579
4569
  mstore(BATCH_SCALAR_16_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4580
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA2_EVAL_LOC), batching_challenge, p), p)
4570
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QM_EVAL_LOC), batching_challenge, p), p)
4581
4571
  batching_challenge := mulmod(batching_challenge, rho, p)
4582
4572
 
4583
- // 16: SIGMA3_EVAL_LOC
4573
+ // 16: QR_EVAL_LOC
4584
4574
  mstore(BATCH_SCALAR_17_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4585
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA3_EVAL_LOC), batching_challenge, p), p)
4575
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QR_EVAL_LOC), batching_challenge, p), p)
4586
4576
  batching_challenge := mulmod(batching_challenge, rho, p)
4587
4577
 
4588
- // 17: SIGMA4_EVAL_LOC
4578
+ // 17: QO_EVAL_LOC
4589
4579
  mstore(BATCH_SCALAR_18_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4590
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA4_EVAL_LOC), batching_challenge, p), p)
4580
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QO_EVAL_LOC), batching_challenge, p), p)
4591
4581
  batching_challenge := mulmod(batching_challenge, rho, p)
4592
4582
 
4593
- // 18: ID1_EVAL_LOC
4583
+ // 18: QC_EVAL_LOC
4594
4584
  mstore(BATCH_SCALAR_19_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4595
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID1_EVAL_LOC), batching_challenge, p), p)
4585
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QC_EVAL_LOC), batching_challenge, p), p)
4596
4586
  batching_challenge := mulmod(batching_challenge, rho, p)
4597
4587
 
4598
- // 19: ID2_EVAL_LOC
4588
+ // 19: QL_EVAL_LOC
4599
4589
  mstore(BATCH_SCALAR_20_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4600
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID2_EVAL_LOC), batching_challenge, p), p)
4590
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QL_EVAL_LOC), batching_challenge, p), p)
4601
4591
  batching_challenge := mulmod(batching_challenge, rho, p)
4602
4592
 
4603
- // 20: ID3_EVAL_LOC
4593
+ // 20: Q4_EVAL_LOC
4604
4594
  mstore(BATCH_SCALAR_21_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4605
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID3_EVAL_LOC), batching_challenge, p), p)
4595
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(Q4_EVAL_LOC), batching_challenge, p), p)
4606
4596
  batching_challenge := mulmod(batching_challenge, rho, p)
4607
4597
 
4608
- // 21: ID4_EVAL_LOC
4598
+ // 21: QARITH_EVAL_LOC
4609
4599
  mstore(BATCH_SCALAR_22_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4610
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID4_EVAL_LOC), batching_challenge, p), p)
4600
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QARITH_EVAL_LOC), batching_challenge, p), p)
4611
4601
  batching_challenge := mulmod(batching_challenge, rho, p)
4612
4602
 
4613
- // 22: TABLE1_EVAL_LOC
4603
+ // 22: QRANGE_EVAL_LOC
4614
4604
  mstore(BATCH_SCALAR_23_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4615
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE1_EVAL_LOC), batching_challenge, p), p)
4605
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QRANGE_EVAL_LOC), batching_challenge, p), p)
4616
4606
  batching_challenge := mulmod(batching_challenge, rho, p)
4617
4607
 
4618
- // 23: TABLE2_EVAL_LOC
4608
+ // 23: QELLIPTIC_EVAL_LOC
4619
4609
  mstore(BATCH_SCALAR_24_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4620
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE2_EVAL_LOC), batching_challenge, p), p)
4610
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QELLIPTIC_EVAL_LOC), batching_challenge, p), p)
4621
4611
  batching_challenge := mulmod(batching_challenge, rho, p)
4622
4612
 
4623
- // 24: TABLE3_EVAL_LOC
4613
+ // 24: QMEMORY_EVAL_LOC
4624
4614
  mstore(BATCH_SCALAR_25_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4625
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE3_EVAL_LOC), batching_challenge, p), p)
4615
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QMEMORY_EVAL_LOC), batching_challenge, p), p)
4626
4616
  batching_challenge := mulmod(batching_challenge, rho, p)
4627
4617
 
4628
- // 25: TABLE4_EVAL_LOC
4618
+ // 25: QNNF_EVAL_LOC
4629
4619
  mstore(BATCH_SCALAR_26_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4630
- batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE4_EVAL_LOC), batching_challenge, p), p)
4620
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QNNF_EVAL_LOC), batching_challenge, p), p)
4631
4621
  batching_challenge := mulmod(batching_challenge, rho, p)
4632
4622
 
4633
- // 26: LAGRANGE_FIRST_EVAL_LOC
4623
+ // 26: QPOSEIDON2_EXTERNAL_EVAL_LOC
4634
4624
  mstore(BATCH_SCALAR_27_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4635
- batched_evaluation := addmod(
4636
- batched_evaluation,
4637
- mulmod(mload(LAGRANGE_FIRST_EVAL_LOC), batching_challenge, p),
4638
- p
4639
- )
4625
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QPOSEIDON2_EXTERNAL_EVAL_LOC), batching_challenge, p), p)
4640
4626
  batching_challenge := mulmod(batching_challenge, rho, p)
4641
4627
 
4642
- // 27: LAGRANGE_LAST_EVAL_LOC
4628
+ // 27: QPOSEIDON2_INTERNAL_EVAL_LOC
4643
4629
  mstore(BATCH_SCALAR_28_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4644
- batched_evaluation := addmod(
4645
- batched_evaluation,
4646
- mulmod(mload(LAGRANGE_LAST_EVAL_LOC), batching_challenge, p),
4647
- p
4648
- )
4630
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(QPOSEIDON2_INTERNAL_EVAL_LOC), batching_challenge, p), p)
4649
4631
  batching_challenge := mulmod(batching_challenge, rho, p)
4650
4632
 
4651
4633
  // 28: W1_EVAL_LOC
@@ -4675,29 +4657,17 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4675
4657
 
4676
4658
  // 33: LOOKUP_INVERSES_EVAL_LOC
4677
4659
  mstore(BATCH_SCALAR_34_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4678
- batched_evaluation := addmod(
4679
- batched_evaluation,
4680
- mulmod(mload(LOOKUP_INVERSES_EVAL_LOC), batching_challenge, p),
4681
- p
4682
- )
4660
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(LOOKUP_INVERSES_EVAL_LOC), batching_challenge, p), p)
4683
4661
  batching_challenge := mulmod(batching_challenge, rho, p)
4684
4662
 
4685
4663
  // 34: LOOKUP_READ_COUNTS_EVAL_LOC
4686
4664
  mstore(BATCH_SCALAR_35_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4687
- batched_evaluation := addmod(
4688
- batched_evaluation,
4689
- mulmod(mload(LOOKUP_READ_COUNTS_EVAL_LOC), batching_challenge, p),
4690
- p
4691
- )
4665
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(LOOKUP_READ_COUNTS_EVAL_LOC), batching_challenge, p), p)
4692
4666
  batching_challenge := mulmod(batching_challenge, rho, p)
4693
4667
 
4694
4668
  // 35: LOOKUP_READ_TAGS_EVAL_LOC
4695
4669
  mstore(BATCH_SCALAR_36_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p))
4696
- batched_evaluation := addmod(
4697
- batched_evaluation,
4698
- mulmod(mload(LOOKUP_READ_TAGS_EVAL_LOC), batching_challenge, p),
4699
- p
4700
- )
4670
+ batched_evaluation := addmod(batched_evaluation, mulmod(mload(LOOKUP_READ_TAGS_EVAL_LOC), batching_challenge, p), p)
4701
4671
  batching_challenge := mulmod(batching_challenge, rho, p)
4702
4672
 
4703
4673
  // Unrolled for NUMBER_OF_SHIFTED_ENTITIES = 5
@@ -4853,8 +4823,9 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4853
4823
  // Accumulate vk points
4854
4824
  loadVk()
4855
4825
  {
4856
- // Accumulator = accumulator + scalar[1] * vk[0]
4857
- mcopy(G1_LOCATION, Q_M_X_LOC, 0x40)
4826
+ // VK batchMul order matches UltraFlavor_Generated::EntityId precomputed layout.
4827
+ // Accumulator = accumulator + scalar[1] * vk[0] (sigma_1)
4828
+ mcopy(G1_LOCATION, SIGMA_1_X_LOC, 0x40)
4858
4829
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_1_LOC))
4859
4830
  precomp_success_flag := and(
4860
4831
  precomp_success_flag,
@@ -4865,8 +4836,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4865
4836
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4866
4837
  )
4867
4838
 
4868
- // Accumulator = accumulator + scalar[2] * vk[1]
4869
- mcopy(G1_LOCATION, Q_C_X_LOC, 0x40)
4839
+ // Accumulator = accumulator + scalar[2] * vk[1] (sigma_2)
4840
+ mcopy(G1_LOCATION, SIGMA_2_X_LOC, 0x40)
4870
4841
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_2_LOC))
4871
4842
  precomp_success_flag := and(
4872
4843
  precomp_success_flag,
@@ -4877,8 +4848,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4877
4848
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4878
4849
  )
4879
4850
 
4880
- // Accumulator = accumulator + scalar[3] * vk[2]
4881
- mcopy(G1_LOCATION, Q_L_X_LOC, 0x40)
4851
+ // Accumulator = accumulator + scalar[3] * vk[2] (sigma_3)
4852
+ mcopy(G1_LOCATION, SIGMA_3_X_LOC, 0x40)
4882
4853
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_3_LOC))
4883
4854
  precomp_success_flag := and(
4884
4855
  precomp_success_flag,
@@ -4889,8 +4860,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4889
4860
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4890
4861
  )
4891
4862
 
4892
- // Accumulator = accumulator + scalar[4] * vk[3]
4893
- mcopy(G1_LOCATION, Q_R_X_LOC, 0x40)
4863
+ // Accumulator = accumulator + scalar[4] * vk[3] (sigma_4)
4864
+ mcopy(G1_LOCATION, SIGMA_4_X_LOC, 0x40)
4894
4865
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_4_LOC))
4895
4866
  precomp_success_flag := and(
4896
4867
  precomp_success_flag,
@@ -4901,8 +4872,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4901
4872
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4902
4873
  )
4903
4874
 
4904
- // Accumulator = accumulator + scalar[5] * vk[4]
4905
- mcopy(G1_LOCATION, Q_O_X_LOC, 0x40)
4875
+ // Accumulator = accumulator + scalar[5] * vk[4] (id_1)
4876
+ mcopy(G1_LOCATION, ID_1_X_LOC, 0x40)
4906
4877
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_5_LOC))
4907
4878
  precomp_success_flag := and(
4908
4879
  precomp_success_flag,
@@ -4913,8 +4884,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4913
4884
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4914
4885
  )
4915
4886
 
4916
- // Accumulator = accumulator + scalar[6] * vk[5]
4917
- mcopy(G1_LOCATION, Q_4_X_LOC, 0x40)
4887
+ // Accumulator = accumulator + scalar[6] * vk[5] (id_2)
4888
+ mcopy(G1_LOCATION, ID_2_X_LOC, 0x40)
4918
4889
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_6_LOC))
4919
4890
  precomp_success_flag := and(
4920
4891
  precomp_success_flag,
@@ -4925,8 +4896,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4925
4896
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4926
4897
  )
4927
4898
 
4928
- // Accumulator = accumulator + scalar[7] * vk[6]
4929
- mcopy(G1_LOCATION, Q_LOOKUP_X_LOC, 0x40)
4899
+ // Accumulator = accumulator + scalar[7] * vk[6] (id_3)
4900
+ mcopy(G1_LOCATION, ID_3_X_LOC, 0x40)
4930
4901
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_7_LOC))
4931
4902
  precomp_success_flag := and(
4932
4903
  precomp_success_flag,
@@ -4937,8 +4908,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4937
4908
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4938
4909
  )
4939
4910
 
4940
- // Accumulator = accumulator + scalar[8] * vk[7]
4941
- mcopy(G1_LOCATION, Q_ARITH_X_LOC, 0x40)
4911
+ // Accumulator = accumulator + scalar[8] * vk[7] (id_4)
4912
+ mcopy(G1_LOCATION, ID_4_X_LOC, 0x40)
4942
4913
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_8_LOC))
4943
4914
  precomp_success_flag := and(
4944
4915
  precomp_success_flag,
@@ -4949,8 +4920,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4949
4920
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4950
4921
  )
4951
4922
 
4952
- // Accumulator = accumulator + scalar[9] * vk[8]
4953
- mcopy(G1_LOCATION, Q_DELTA_RANGE_X_LOC, 0x40)
4923
+ // Accumulator = accumulator + scalar[9] * vk[8] (lagrange_first)
4924
+ mcopy(G1_LOCATION, LAGRANGE_FIRST_X_LOC, 0x40)
4954
4925
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_9_LOC))
4955
4926
  precomp_success_flag := and(
4956
4927
  precomp_success_flag,
@@ -4961,8 +4932,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4961
4932
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4962
4933
  )
4963
4934
 
4964
- // Accumulator = accumulator + scalar[10] * vk[9]
4965
- mcopy(G1_LOCATION, Q_ELLIPTIC_X_LOC, 0x40)
4935
+ // Accumulator = accumulator + scalar[10] * vk[9] (lagrange_last)
4936
+ mcopy(G1_LOCATION, LAGRANGE_LAST_X_LOC, 0x40)
4966
4937
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_10_LOC))
4967
4938
  precomp_success_flag := and(
4968
4939
  precomp_success_flag,
@@ -4973,8 +4944,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4973
4944
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4974
4945
  )
4975
4946
 
4976
- // Accumulator = accumulator + scalar[11] * vk[10]
4977
- mcopy(G1_LOCATION, Q_MEMORY_X_LOC, 0x40)
4947
+ // Accumulator = accumulator + scalar[11] * vk[10] (q_lookup)
4948
+ mcopy(G1_LOCATION, Q_LOOKUP_X_LOC, 0x40)
4978
4949
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_11_LOC))
4979
4950
  precomp_success_flag := and(
4980
4951
  precomp_success_flag,
@@ -4985,8 +4956,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4985
4956
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4986
4957
  )
4987
4958
 
4988
- // Accumulator = accumulator + scalar[12] * vk[11]
4989
- mcopy(G1_LOCATION, Q_NNF_X_LOC, 0x40)
4959
+ // Accumulator = accumulator + scalar[12] * vk[11] (table_1)
4960
+ mcopy(G1_LOCATION, TABLE_1_X_LOC, 0x40)
4990
4961
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_12_LOC))
4991
4962
  precomp_success_flag := and(
4992
4963
  precomp_success_flag,
@@ -4997,8 +4968,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
4997
4968
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
4998
4969
  )
4999
4970
 
5000
- // Accumulator = accumulator + scalar[13] * vk[12]
5001
- mcopy(G1_LOCATION, Q_POSEIDON_2_EXTERNAL_X_LOC, 0x40)
4971
+ // Accumulator = accumulator + scalar[13] * vk[12] (table_2)
4972
+ mcopy(G1_LOCATION, TABLE_2_X_LOC, 0x40)
5002
4973
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_13_LOC))
5003
4974
  precomp_success_flag := and(
5004
4975
  precomp_success_flag,
@@ -5009,8 +4980,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5009
4980
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5010
4981
  )
5011
4982
 
5012
- // Accumulator = accumulator + scalar[14] * vk[13]
5013
- mcopy(G1_LOCATION, Q_POSEIDON_2_INTERNAL_X_LOC, 0x40)
4983
+ // Accumulator = accumulator + scalar[14] * vk[13] (table_3)
4984
+ mcopy(G1_LOCATION, TABLE_3_X_LOC, 0x40)
5014
4985
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_14_LOC))
5015
4986
  precomp_success_flag := and(
5016
4987
  precomp_success_flag,
@@ -5021,8 +4992,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5021
4992
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5022
4993
  )
5023
4994
 
5024
- // Accumulator = accumulator + scalar[15] * vk[14]
5025
- mcopy(G1_LOCATION, SIGMA_1_X_LOC, 0x40)
4995
+ // Accumulator = accumulator + scalar[15] * vk[14] (table_4)
4996
+ mcopy(G1_LOCATION, TABLE_4_X_LOC, 0x40)
5026
4997
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_15_LOC))
5027
4998
  precomp_success_flag := and(
5028
4999
  precomp_success_flag,
@@ -5033,8 +5004,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5033
5004
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5034
5005
  )
5035
5006
 
5036
- // Accumulator = accumulator + scalar[16] * vk[15]
5037
- mcopy(G1_LOCATION, SIGMA_2_X_LOC, 0x40)
5007
+ // Accumulator = accumulator + scalar[16] * vk[15] (q_m)
5008
+ mcopy(G1_LOCATION, Q_M_X_LOC, 0x40)
5038
5009
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_16_LOC))
5039
5010
  precomp_success_flag := and(
5040
5011
  precomp_success_flag,
@@ -5045,8 +5016,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5045
5016
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5046
5017
  )
5047
5018
 
5048
- // Accumulator = accumulator + scalar[17] * vk[16]
5049
- mcopy(G1_LOCATION, SIGMA_3_X_LOC, 0x40)
5019
+ // Accumulator = accumulator + scalar[17] * vk[16] (q_r)
5020
+ mcopy(G1_LOCATION, Q_R_X_LOC, 0x40)
5050
5021
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_17_LOC))
5051
5022
  precomp_success_flag := and(
5052
5023
  precomp_success_flag,
@@ -5057,8 +5028,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5057
5028
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5058
5029
  )
5059
5030
 
5060
- // Accumulator = accumulator + scalar[18] * vk[17]
5061
- mcopy(G1_LOCATION, SIGMA_4_X_LOC, 0x40)
5031
+ // Accumulator = accumulator + scalar[18] * vk[17] (q_o)
5032
+ mcopy(G1_LOCATION, Q_O_X_LOC, 0x40)
5062
5033
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_18_LOC))
5063
5034
  precomp_success_flag := and(
5064
5035
  precomp_success_flag,
@@ -5069,8 +5040,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5069
5040
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5070
5041
  )
5071
5042
 
5072
- // Accumulator = accumulator + scalar[19] * vk[18]
5073
- mcopy(G1_LOCATION, ID_1_X_LOC, 0x40)
5043
+ // Accumulator = accumulator + scalar[19] * vk[18] (q_c)
5044
+ mcopy(G1_LOCATION, Q_C_X_LOC, 0x40)
5074
5045
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_19_LOC))
5075
5046
  precomp_success_flag := and(
5076
5047
  precomp_success_flag,
@@ -5081,8 +5052,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5081
5052
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5082
5053
  )
5083
5054
 
5084
- // Accumulator = accumulator + scalar[20] * vk[19]
5085
- mcopy(G1_LOCATION, ID_2_X_LOC, 0x40)
5055
+ // Accumulator = accumulator + scalar[20] * vk[19] (q_l)
5056
+ mcopy(G1_LOCATION, Q_L_X_LOC, 0x40)
5086
5057
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_20_LOC))
5087
5058
  precomp_success_flag := and(
5088
5059
  precomp_success_flag,
@@ -5093,8 +5064,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5093
5064
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5094
5065
  )
5095
5066
 
5096
- // Accumulator = accumulator + scalar[21] * vk[20]
5097
- mcopy(G1_LOCATION, ID_3_X_LOC, 0x40)
5067
+ // Accumulator = accumulator + scalar[21] * vk[20] (q_4)
5068
+ mcopy(G1_LOCATION, Q_4_X_LOC, 0x40)
5098
5069
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_21_LOC))
5099
5070
  precomp_success_flag := and(
5100
5071
  precomp_success_flag,
@@ -5105,8 +5076,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5105
5076
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5106
5077
  )
5107
5078
 
5108
- // Accumulator = accumulator + scalar[22] * vk[21]
5109
- mcopy(G1_LOCATION, ID_4_X_LOC, 0x40)
5079
+ // Accumulator = accumulator + scalar[22] * vk[21] (q_arith)
5080
+ mcopy(G1_LOCATION, Q_ARITH_X_LOC, 0x40)
5110
5081
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_22_LOC))
5111
5082
  precomp_success_flag := and(
5112
5083
  precomp_success_flag,
@@ -5117,8 +5088,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5117
5088
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5118
5089
  )
5119
5090
 
5120
- // Accumulator = accumulator + scalar[23] * vk[22]
5121
- mcopy(G1_LOCATION, TABLE_1_X_LOC, 0x40)
5091
+ // Accumulator = accumulator + scalar[23] * vk[22] (q_delta_range)
5092
+ mcopy(G1_LOCATION, Q_DELTA_RANGE_X_LOC, 0x40)
5122
5093
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_23_LOC))
5123
5094
  precomp_success_flag := and(
5124
5095
  precomp_success_flag,
@@ -5129,8 +5100,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5129
5100
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5130
5101
  )
5131
5102
 
5132
- // Accumulator = accumulator + scalar[24] * vk[23]
5133
- mcopy(G1_LOCATION, TABLE_2_X_LOC, 0x40)
5103
+ // Accumulator = accumulator + scalar[24] * vk[23] (q_elliptic)
5104
+ mcopy(G1_LOCATION, Q_ELLIPTIC_X_LOC, 0x40)
5134
5105
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_24_LOC))
5135
5106
  precomp_success_flag := and(
5136
5107
  precomp_success_flag,
@@ -5141,8 +5112,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5141
5112
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5142
5113
  )
5143
5114
 
5144
- // Accumulator = accumulator + scalar[25] * vk[24]
5145
- mcopy(G1_LOCATION, TABLE_3_X_LOC, 0x40)
5115
+ // Accumulator = accumulator + scalar[25] * vk[24] (q_memory)
5116
+ mcopy(G1_LOCATION, Q_MEMORY_X_LOC, 0x40)
5146
5117
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_25_LOC))
5147
5118
  precomp_success_flag := and(
5148
5119
  precomp_success_flag,
@@ -5153,8 +5124,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5153
5124
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5154
5125
  )
5155
5126
 
5156
- // Accumulator = accumulator + scalar[26] * vk[25]
5157
- mcopy(G1_LOCATION, TABLE_4_X_LOC, 0x40)
5127
+ // Accumulator = accumulator + scalar[26] * vk[25] (q_nnf)
5128
+ mcopy(G1_LOCATION, Q_NNF_X_LOC, 0x40)
5158
5129
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_26_LOC))
5159
5130
  precomp_success_flag := and(
5160
5131
  precomp_success_flag,
@@ -5165,8 +5136,8 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5165
5136
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5166
5137
  )
5167
5138
 
5168
- // Accumulator = accumulator + scalar[27] * [lagrange_first]
5169
- mcopy(G1_LOCATION, LAGRANGE_FIRST_X_LOC, 0x40)
5139
+ // Accumulator = accumulator + scalar[27] * vk[26] (q_poseidon2_external)
5140
+ mcopy(G1_LOCATION, Q_POSEIDON_2_EXTERNAL_X_LOC, 0x40)
5170
5141
  mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_27_LOC))
5171
5142
  precomp_success_flag := and(
5172
5143
  precomp_success_flag,
@@ -5177,10 +5148,9 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5177
5148
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5178
5149
  )
5179
5150
 
5180
- // Accumulator = accumulator + constant_term_acc * G (generator)
5181
- mstore(G1_LOCATION, 0x01) // G1 generator x
5182
- mstore(add(G1_LOCATION, 0x20), 0x02) // G1 generator y
5183
- mstore(SCALAR_LOCATION, constant_term_acc)
5151
+ // Accumulator = accumulator + scalar[28] * vk[27] (q_poseidon2_internal)
5152
+ mcopy(G1_LOCATION, Q_POSEIDON_2_INTERNAL_X_LOC, 0x40)
5153
+ mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_28_LOC))
5184
5154
  precomp_success_flag := and(
5185
5155
  precomp_success_flag,
5186
5156
  staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)
@@ -5190,9 +5160,10 @@ uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40;
5190
5160
  staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)
5191
5161
  )
5192
5162
 
5193
- // Accumulator = accumulator + scalar[28] * vk[27]
5194
- mcopy(G1_LOCATION, LAGRANGE_LAST_X_LOC, 0x40)
5195
- mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_28_LOC))
5163
+ // Accumulator = accumulator + constant_term_acc * G (generator)
5164
+ mstore(G1_LOCATION, 0x01) // G1 generator x
5165
+ mstore(add(G1_LOCATION, 0x20), 0x02) // G1 generator y
5166
+ mstore(SCALAR_LOCATION, constant_term_acc)
5196
5167
  precomp_success_flag := and(
5197
5168
  precomp_success_flag,
5198
5169
  staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)