@crisp-e3/contracts 0.0.2-test → 0.2.0-test

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.
@@ -5,122 +5,122 @@
5
5
  // or FITNESS FOR A PARTICULAR PURPOSE.
6
6
  pragma solidity >=0.8.21;
7
7
 
8
- uint256 constant N = 1048576;
9
- uint256 constant LOG_N = 20;
10
- uint256 constant NUMBER_OF_PUBLIC_INPUTS = 0;
8
+ uint256 constant N = 524288;
9
+ uint256 constant LOG_N = 19;
10
+ uint256 constant NUMBER_OF_PUBLIC_INPUTS = 16;
11
11
  library HonkVerificationKey {
12
12
  function loadVerificationKey() internal pure returns (Honk.VerificationKey memory) {
13
13
  Honk.VerificationKey memory vk = Honk.VerificationKey({
14
- circuitSize: uint256(1048576),
15
- logCircuitSize: uint256(20),
16
- publicInputsSize: uint256(0),
14
+ circuitSize: uint256(524288),
15
+ logCircuitSize: uint256(19),
16
+ publicInputsSize: uint256(16),
17
17
  ql: Honk.G1Point({
18
- x: uint256(0x10d36906c36e560297d7bc49c7661fbf50a476bea06e780c40d53a45c459599e),
19
- y: uint256(0x1ed002ce45e75474d75d25ef1764280c6f1974b704ae77315baf31726978c175)
18
+ x: uint256(0x13ab223ff59cd43e0728277b3e37bce97e3d2faac23f2b3311d8a30a44e25963),
19
+ y: uint256(0x16f019597ce96b3e75f6ba1c88a2ca4d229090e158eb668690748f9dbe53d557)
20
20
  }),
21
21
  qr: Honk.G1Point({
22
- x: uint256(0x248d6c5782f08a14f794dae5832e8d4a5b42afebf0b248532d725e5d633e7215),
23
- y: uint256(0x266b795b6cf4aa5fff2eb8c3e5a9b9780d6fd5d7170fc2b87f0e6aec8eaa9551)
22
+ x: uint256(0x0efc1c7316fb670707e58edc7b3b27311d1885a1c991a07b33867c684a9a863c),
23
+ y: uint256(0x174f93332ed828e0bef2437d6db802d5126ebab2c3702e8974c6a4ae0646c0c2)
24
24
  }),
25
25
  qo: Honk.G1Point({
26
- x: uint256(0x2137d78eee77dfd53fc4bf2adeacef7b15a94cc050a06fb8f52e5a28e938a78e),
27
- y: uint256(0x1b0888693ee93d8804044d8d5e8d950ed53fbb451da45863f6f768145c7d24b1)
26
+ x: uint256(0x208152ab37453ed055b7108a1424e41ac9e878722aa8ef880c6c012d21eef3d5),
27
+ y: uint256(0x1f7dcf9351580536e0fff33cb7b13fb3b0609f0f38c309935a6324959ef64338)
28
28
  }),
29
29
  q4: Honk.G1Point({
30
- x: uint256(0x00dceb0527695295e8bc90df562acf14d9bdb55e6250ca81034c7f56b9345985),
31
- y: uint256(0x07963d90a20b5fbd22fcb35424b408b2ed41ab59fb2014027d9ec235a5f5905f)
30
+ x: uint256(0x0963ddfd632aedb1ebae9f7f3ae7ef217ff9bdf5d5dee30d1f0425d7e5d598b1),
31
+ y: uint256(0x220a29354f7f15a3a56faea2719c51fd96b0bc9bb5be5278cc18e4a70b73daec)
32
32
  }),
33
33
  qm: Honk.G1Point({
34
- x: uint256(0x11a037d3a9259c512f1039f1049fc7541cbbf315ddb90fe2869e6281c12023ef),
35
- y: uint256(0x2d9966faba8461ee70d9db68e1d817fb21b15fb1e09e7476839dc6d07135cc23)
34
+ x: uint256(0x13c6f463efbfdbb1f61e4d88750781b6739363c7892f9833226d65c0ccd9033e),
35
+ y: uint256(0x1a46391907c3fb9562fa563bab195d093cc843ede63f936b25344901919d90db)
36
36
  }),
37
37
  qc: Honk.G1Point({
38
- x: uint256(0x1219c094d86699487f09191b809a6be165c9b4808bbcadef831592295a1d7da6),
39
- y: uint256(0x20b99b2dcadc856a88cc731f349aa47893a0569c4e747b4af0d7aae0dc9bdcda)
38
+ x: uint256(0x1bb538b0a6019118e246dce49852f4bdbcd60fb4150833dafc064b1a8a73e8e5),
39
+ y: uint256(0x2969a444b671dd94a764dbd631698886cc3b2e64750c2c4143c6736fa7c56845)
40
40
  }),
41
41
  qArith: Honk.G1Point({
42
- x: uint256(0x147b6a393db982d0f0c7764012b6835c95bc0fa7926fda3f8bf684105282d388),
43
- y: uint256(0x25b693e3f55d510c41dde8bd6b0d61b5c39db3888b55aeada5d7622f34254edf)
42
+ x: uint256(0x1928e8e9fee021507d02bcd30412ce506a543e67a85bee951d8af25432cf1e2d),
43
+ y: uint256(0x258bf8ef04faf434cc77fe4edaffcc94e6013df01f85ca64260d5d7099280381)
44
44
  }),
45
45
  qDeltaRange: Honk.G1Point({
46
- x: uint256(0x2c9e01c750140eb161d24b9ee0fc8984acb60bf4e395b8e6ebbaa91c1be174e9),
47
- y: uint256(0x1bc18c861d47b1f9a988e2e3d3d7a0a6252dc986d614fcca0e4f8ac7457c0892)
46
+ x: uint256(0x01dbbbd0cd1b7aa0b578c58d34b271245b64061ef676ef15e092b3089a54cb24),
47
+ y: uint256(0x1f1bfae9f9c59de7326795e9f089c7bbbdb1925f439b29206c58b90f624ff057)
48
48
  }),
49
49
  qElliptic: Honk.G1Point({
50
- x: uint256(0x088a610ed8e4090aefcac9ab7277b21fdfb04ce437eb458bdb3696bff53c1cd0),
51
- y: uint256(0x2c5353cedecc1e5f4d84b3ae7f3711e36deebc3071201975bf0fecc655545f5e)
50
+ x: uint256(0x0daade853bee6788e93755b59e0da87732527349b02c44a04c71c0facc512df0),
51
+ y: uint256(0x08d2431b4246dde4c512fef36fd2057f756fa86df9437b82499788521accab1e)
52
52
  }),
53
53
  qAux: Honk.G1Point({
54
- x: uint256(0x1baad7c6c4a0f76d721636e31a5b5c28c1062d21f2148339266343c8c1d38996),
55
- y: uint256(0x1eb16da6aed4aa1a55302d002d233fd4dbb885c96431a494683dc97a9275f43b)
54
+ x: uint256(0x091d75c333a546baa162025fc5413bd6a15b73b744bff710a75299a9b1cbb11e),
55
+ y: uint256(0x160cd0464b1e360218bb120bf522b2f4c51564750d5acce626d87dadd594ca5e)
56
56
  }),
57
57
  qLookup: Honk.G1Point({
58
- x: uint256(0x1d64341216e323f076ac53aa06192392677f44b67b6947dd6a0a1490fb32a083),
59
- y: uint256(0x28d02cea9cc379ace2ae8779011e247ddc4213ef69895a8e634f425844107141)
58
+ x: uint256(0x0d8127977a1a35c9a0d79cb984e7c146cf55d0dcfffed4fe47ba792d80630a57),
59
+ y: uint256(0x29a459a12da1ff349a61bc22f74ccf21003c6023d6c2eacfff820f034ca4c4d0)
60
60
  }),
61
61
  qPoseidon2External: Honk.G1Point({
62
- x: uint256(0x1e0266510d883b6379b58686bd63642eae499ea68a706cc9e70c14c9c0e8536a),
63
- y: uint256(0x11491f77ce7999d3618f0bac66ef7c4f1ed122f862d1c1465e71ce1262c4d7bd)
62
+ x: uint256(0x2e7849b38119f1afb8aefdac89a181e566c5be05150575534bb783802819ae88),
63
+ y: uint256(0x039cda5b4478a254bcd6b192d1c67b3ac2143bac86b241b08dc50e0a8d23ceca)
64
64
  }),
65
65
  qPoseidon2Internal: Honk.G1Point({
66
- x: uint256(0x22b036a9ca9be4e71743a125c08648843a55f2cf070dafbbda117ca79e071ad5),
67
- y: uint256(0x12fd44e4853d17621023115fbb658d1150aa85fae5a020f07eddd2215812b2f8)
66
+ x: uint256(0x11bca67681de3ea476550a63f2b35b177d7c0fc83eeaf5534832e05e67d1477f),
67
+ y: uint256(0x258998c74d0c585178ed727548943a4497be15d53bb82603a365a8fa859cbb2c)
68
68
  }),
69
69
  s1: Honk.G1Point({
70
- x: uint256(0x1a18a989b31c09eea3da5ae3faa7680ef410474de274210f9c39ebfe6a798c7d),
71
- y: uint256(0x2108883b1e5364123ffd7c32161f9228987ee6aa31ba3c579765f6096579b8e0)
70
+ x: uint256(0x183047a917ca53516ae710d178cdb35c17b58d4cf6bebe73ab84edc260969dac),
71
+ y: uint256(0x16fa136788614a8d2a8bbb8a40742a2ec88200a7557899dc22eebb9917f39e79)
72
72
  }),
73
73
  s2: Honk.G1Point({
74
- x: uint256(0x26ddc6264203943a7c31aed2afb7d53fe32a7a38249897fc2a8771c65c414096),
75
- y: uint256(0x0249864a3e742b55386cf6ab4051915fa677a11885e4b0eb04d20d38e9632afe)
74
+ x: uint256(0x2337ae7661f0d0a9cc43523f73e3ccca7f2e98e6de8eff0caef5a2e38bac8050),
75
+ y: uint256(0x2dbdd39e65dccf475c00f58e0eb06a9be49797a86404bc850eb56fc27a4ca8eb)
76
76
  }),
77
77
  s3: Honk.G1Point({
78
- x: uint256(0x250a1f5dd0a1e0ec7ab855db5863a25a567877ef1bd1c19e5bc1ccdb733b2956),
79
- y: uint256(0x2cc285a8d6a6e91d142e2a941e23c0a7aee361316975b582e0370e46c4939d9f)
78
+ x: uint256(0x15569d9f85dc5d0f5d1e8f18ae7eea3b909c7e68626c609b33e7959bb9918648),
79
+ y: uint256(0x2d6729e1c9a15ba58ba3cbe46e8c97880014e3f126b17a1b300715cd449be8b1)
80
80
  }),
81
81
  s4: Honk.G1Point({
82
- x: uint256(0x0fc8be2a322d1c45d22b210211992629be0450555321e4a55c2cf2d8f5498c6c),
83
- y: uint256(0x1091f3056debdf6a98ab5e4c6df48dc4fded590c78788baf2b394ff6005df6f6)
82
+ x: uint256(0x062d199e2a3abdc6bd9c51c9e304859f1c52c29a07449cb515a36ad7ec377240),
83
+ y: uint256(0x28000e3b5fe7da7621520bab4c69e5141c6d6d4dc542a8333748d76a07df71b2)
84
84
  }),
85
85
  t1: Honk.G1Point({
86
- x: uint256(0x1bf7da4add7c858eb94b75f2e78fbd89c84f5fa43824a0d5534173872ee099c2),
87
- y: uint256(0x1b35fa2a35673699ee1cb260d9e6c4be79b26d488c26dc2531194e43c8f747ea)
86
+ x: uint256(0x0d64abbea744f03212f1bf39e9d9c693424fa71ab2235b3f501ac3bc615e8577),
87
+ y: uint256(0x03abf1a9c83fe43033856e016b6940b2cde1a7438d4150d5f6343e54e692544d)
88
88
  }),
89
89
  t2: Honk.G1Point({
90
- x: uint256(0x16bf79791869cec464180d5322eeaaef18fed6dc10c3e64e314c04d85c3faece),
91
- y: uint256(0x2e2ec6341669b5b975e25e465af5d9e40533d5ac173554df19daed27f66c36ff)
90
+ x: uint256(0x112dfebe6cfb2e00aeee241e82c6091f7706a596da1ed976801260f85fced62b),
91
+ y: uint256(0x0cf123627a5260072ece8c03020a378094ef14d4ecd6fa7787cb92b0ff41e16f)
92
92
  }),
93
93
  t3: Honk.G1Point({
94
- x: uint256(0x150253026f1b985165783c2f4ee1df612c826dda543d06d34711b965730ab69e),
95
- y: uint256(0x0c4062ebcca21d81273b9c58d64447e4ee4d55effa8cbc8fdbd6a76bc3092264)
94
+ x: uint256(0x0a7a39e50057960052581f511cb596259f1e1588666bc96a9795c0194676c2a3),
95
+ y: uint256(0x18d60133c86a16d9192eaffc8a6ac18ccaf3a7ef9f7a2c2a8c0e04df810193a2)
96
96
  }),
97
97
  t4: Honk.G1Point({
98
- x: uint256(0x159f2541ce446c6d59ea3f06be91ec9f47c9c82f3e4fd10696511efaff4121fa),
99
- y: uint256(0x15f873b33ec9467e1f0c4fb3a0b59a6fcd6f3480515f1ff5506c48f0c521f00f)
98
+ x: uint256(0x2ced4be26f6936520870ea5f91a46f746098f71fbd39136e72e816fd1ccf3fcb),
99
+ y: uint256(0x05e4f50caa7b245e81355a0f8966474c9669792cf09f6b4d807a6604ef93cfba)
100
100
  }),
101
101
  id1: Honk.G1Point({
102
- x: uint256(0x0c02225e1d329e09a738ff6a3d1f2eefee2d9c2446f748430a4c9e3db3af493e),
103
- y: uint256(0x22970a47d992efe75e1a9ae8c48617327596f0b9d1536898b516e9dc0d92e351)
102
+ x: uint256(0x1b4b9477e130161cd3a4dab7b5a107cf6eff7794a4dadef3bc0cdf65ec6aa7e5),
103
+ y: uint256(0x1abd71747ef723da70730a348cc041dc13da45be7318091d98b6b9d74c79f399)
104
104
  }),
105
105
  id2: Honk.G1Point({
106
- x: uint256(0x025b15baf18a3565112553243b581ab7c1ef2bb7b6cecb6fd3dbcb494f131c1b),
107
- y: uint256(0x0784d79e6aa29c9c710670f3e62df4c3bf99a73a85bb255a009d5566da762426)
106
+ x: uint256(0x12fab07a701a5614890650c7bb37dade42de520bc6933812670c802fcd5c1a69),
107
+ y: uint256(0x29a07f1b4b391180ec8bf71f361f2b1ce53959dbbfdada7bd2578ed270e20b82)
108
108
  }),
109
109
  id3: Honk.G1Point({
110
- x: uint256(0x2f0d8870dfa4fe4f0bcf1e8a8b69f750b15e8315a76dea5965fe82d369e00ffd),
111
- y: uint256(0x0b8a634aa17cb7e29434a052392f7c40e013e37f2dfdcce584ecaa23a3508c89)
110
+ x: uint256(0x125c6b504f1acc65b0fb6e30eced8baff778514e407bf588dd108153fbeda5af),
111
+ y: uint256(0x15f46d027b762ec2aa4a7d59511d5e17e1e13d4df10eb2a5e9748599045d131b)
112
112
  }),
113
113
  id4: Honk.G1Point({
114
- x: uint256(0x126143c034d5218ac854d254492806967ae0d23ec5684d341d730cd4dda79f08),
115
- y: uint256(0x1c00c21435080bb1e5b99a42eba611eda1328b0e38e92fcd955d81e96b9b2917)
114
+ x: uint256(0x0bbc2d69742f95edbeffe3f80527c6e11e9644918540121093c5244ac6d67737),
115
+ y: uint256(0x05780b6e9938c0ff75721918d5a4039840c7b9e2827a02e74845a0b51049794f)
116
116
  }),
117
117
  lagrangeFirst: Honk.G1Point({
118
118
  x: uint256(0x0000000000000000000000000000000000000000000000000000000000000001),
119
119
  y: uint256(0x0000000000000000000000000000000000000000000000000000000000000002)
120
120
  }),
121
121
  lagrangeLast: Honk.G1Point({
122
- x: uint256(0x1120d97a81a9c90c251f46b1ec3998bc67e7978323aebf46551a536bf4d0f167),
123
- y: uint256(0x26d1e132ba53edea7d5e8aa5b21067176a3cf0ba74257f595e17bf0db56a98de)
122
+ x: uint256(0x2616fcd041a9cf147f53b259e2110fc80de4cf4382c39a7f6b75109300489dbd),
123
+ y: uint256(0x1329a5245299bcd004a3ba9f7b72bcd050d16cbb6c437cb690343e131697fed8)
124
124
  })
125
125
  });
126
126
  return vk;
@@ -272,6 +272,7 @@ uint256 constant BATCHED_RELATION_PARTIAL_LENGTH = 8;
272
272
  uint256 constant NUMBER_OF_ENTITIES = 40;
273
273
  uint256 constant NUMBER_UNSHIFTED = 35;
274
274
  uint256 constant NUMBER_TO_BE_SHIFTED = 5;
275
+ uint256 constant PAIRING_POINTS_SIZE = 16;
275
276
 
276
277
  // Alphas are used as relation separators so there should be NUMBER_OF_SUBRELATIONS - 1
277
278
  uint256 constant NUMBER_OF_ALPHAS = 25;
@@ -389,6 +390,8 @@ library Honk {
389
390
 
390
391
 
391
392
  struct Proof {
393
+ // Pairing point object
394
+ Fr[PAIRING_POINTS_SIZE] pairingPointObject;
392
395
  // Free wires
393
396
  Honk.G1ProofPoint w1;
394
397
  Honk.G1ProofPoint w2;
@@ -486,9 +489,13 @@ library TranscriptLib {
486
489
  round0[0] = bytes32(circuitSize);
487
490
  round0[1] = bytes32(publicInputsSize);
488
491
  round0[2] = bytes32(pubInputsOffset);
489
- for (uint256 i = 0; i < publicInputsSize; i++) {
492
+ // TODO(https://github.com/AztecProtocol/barretenberg/issues/1331): Consider making publicInputsSize not include pairing point object.
493
+ for (uint256 i = 0; i < publicInputsSize - PAIRING_POINTS_SIZE; i++) {
490
494
  round0[3 + i] = bytes32(publicInputs[i]);
491
495
  }
496
+ for (uint256 i = 0; i < PAIRING_POINTS_SIZE; i++) {
497
+ round0[3 + publicInputsSize - PAIRING_POINTS_SIZE + i] = FrLib.toBytes32(proof.pairingPointObject[i]);
498
+ }
492
499
 
493
500
  // Create the first challenge
494
501
  // Note: w4 is added to the challenge later on
@@ -673,19 +680,33 @@ library TranscriptLib {
673
680
  }
674
681
 
675
682
  function loadProof(bytes calldata proof) internal pure returns (Honk.Proof memory p) {
676
- // Commitments
677
- p.w1 = bytesToG1ProofPoint(proof[0x0:0x80]);
683
+ // TODO(https://github.com/AztecProtocol/barretenberg/issues/1332): Optimize this away when we finalize.
684
+ uint256 boundary = 0x0;
678
685
 
679
- p.w2 = bytesToG1ProofPoint(proof[0x80:0x100]);
680
- p.w3 = bytesToG1ProofPoint(proof[0x100:0x180]);
686
+ // Pairing point object
687
+ for (uint256 i = 0; i < PAIRING_POINTS_SIZE; i++) {
688
+ p.pairingPointObject[i] = bytesToFr(proof[boundary:boundary + 0x20]);
689
+ boundary += 0x20;
690
+ }
691
+ // Commitments
692
+ p.w1 = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
693
+ boundary += 0x80;
694
+ p.w2 = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
695
+ boundary += 0x80;
696
+ p.w3 = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
697
+ boundary += 0x80;
681
698
 
682
699
  // Lookup / Permutation Helper Commitments
683
- p.lookupReadCounts = bytesToG1ProofPoint(proof[0x180:0x200]);
684
- p.lookupReadTags = bytesToG1ProofPoint(proof[0x200:0x280]);
685
- p.w4 = bytesToG1ProofPoint(proof[0x280:0x300]);
686
- p.lookupInverses = bytesToG1ProofPoint(proof[0x300:0x380]);
687
- p.zPerm = bytesToG1ProofPoint(proof[0x380:0x400]);
688
- uint256 boundary = 0x400;
700
+ p.lookupReadCounts = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
701
+ boundary += 0x80;
702
+ p.lookupReadTags = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
703
+ boundary += 0x80;
704
+ p.w4 = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
705
+ boundary += 0x80;
706
+ p.lookupInverses = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
707
+ boundary += 0x80;
708
+ p.zPerm = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
709
+ boundary += 0x80;
689
710
 
690
711
  // Sumcheck univariates
691
712
  for (uint256 i = 0; i < CONST_PROOF_SIZE_LOG_N; i++) {
@@ -715,7 +736,7 @@ library TranscriptLib {
715
736
 
716
737
  // Shplonk
717
738
  p.shplonkQ = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
718
- boundary = boundary + 0x80;
739
+ boundary += 0x80;
719
740
  // KZG
720
741
  p.kzgQuotient = bytesToG1ProofPoint(proof[boundary:boundary + 0x80]);
721
742
  }
@@ -1542,7 +1563,7 @@ abstract contract BaseHonkVerifier is IVerifier {
1542
1563
  error ShpleminiFailed();
1543
1564
 
1544
1565
  // Number of field elements in a ultra honk zero knowledge proof
1545
- uint256 constant PROOF_SIZE = 440;
1566
+ uint256 constant PROOF_SIZE = 456;
1546
1567
 
1547
1568
  function loadVerificationKey() internal pure virtual returns (Honk.VerificationKey memory);
1548
1569
 
@@ -1555,7 +1576,7 @@ abstract contract BaseHonkVerifier is IVerifier {
1555
1576
  Honk.VerificationKey memory vk = loadVerificationKey();
1556
1577
  Honk.Proof memory p = TranscriptLib.loadProof(proof);
1557
1578
 
1558
- if (publicInputs.length != vk.publicInputsSize) {
1579
+ if (publicInputs.length != vk.publicInputsSize - PAIRING_POINTS_SIZE) {
1559
1580
  revert PublicInputsLengthWrong();
1560
1581
  }
1561
1582
 
@@ -1566,7 +1587,7 @@ abstract contract BaseHonkVerifier is IVerifier {
1566
1587
  // Derive public input delta
1567
1588
  // TODO(https://github.com/AztecProtocol/barretenberg/issues/1281): Add pubInputsOffset to VK or remove entirely.
1568
1589
  t.relationParameters.publicInputsDelta = computePublicInputDelta(
1569
- publicInputs, t.relationParameters.beta, t.relationParameters.gamma, /*pubInputsOffset=*/1
1590
+ publicInputs, p.pairingPointObject, t.relationParameters.beta, t.relationParameters.gamma, /*pubInputsOffset=*/1
1570
1591
  );
1571
1592
 
1572
1593
  // Sumcheck
@@ -1579,7 +1600,7 @@ abstract contract BaseHonkVerifier is IVerifier {
1579
1600
  return sumcheckVerified && shpleminiVerified; // Boolean condition not required - nice for vanity :)
1580
1601
  }
1581
1602
 
1582
- function computePublicInputDelta(bytes32[] memory publicInputs, Fr beta, Fr gamma, uint256 offset)
1603
+ function computePublicInputDelta(bytes32[] memory publicInputs, Fr[PAIRING_POINTS_SIZE] memory pairingPointObject, Fr beta, Fr gamma, uint256 offset)
1583
1604
  internal
1584
1605
  view
1585
1606
  returns (Fr publicInputDelta)
@@ -1591,7 +1612,7 @@ abstract contract BaseHonkVerifier is IVerifier {
1591
1612
  Fr denominatorAcc = gamma - (beta * FrLib.from(offset + 1));
1592
1613
 
1593
1614
  {
1594
- for (uint256 i = 0; i < numPublicInputs; i++) {
1615
+ for (uint256 i = 0; i < numPublicInputs - PAIRING_POINTS_SIZE; i++) {
1595
1616
  Fr pubInput = FrLib.fromBytes32(publicInputs[i]);
1596
1617
 
1597
1618
  numerator = numerator * (numeratorAcc + pubInput);
@@ -1600,6 +1621,16 @@ abstract contract BaseHonkVerifier is IVerifier {
1600
1621
  numeratorAcc = numeratorAcc + beta;
1601
1622
  denominatorAcc = denominatorAcc - beta;
1602
1623
  }
1624
+
1625
+ for (uint256 i = 0; i < PAIRING_POINTS_SIZE; i++) {
1626
+ Fr pubInput = pairingPointObject[i];
1627
+
1628
+ numerator = numerator * (numeratorAcc + pubInput);
1629
+ denominator = denominator * (denominatorAcc + pubInput);
1630
+
1631
+ numeratorAcc = numeratorAcc + beta;
1632
+ denominatorAcc = denominatorAcc - beta;
1633
+ }
1603
1634
  }
1604
1635
 
1605
1636
  // Fr delta = numerator / denominator; // TOOO: batch invert later?
@@ -1883,4 +1914,4 @@ contract HonkVerifier is BaseHonkVerifier(N, LOG_N, NUMBER_OF_PUBLIC_INPUTS) {
1883
1914
  function loadVerificationKey() internal pure override returns (Honk.VerificationKey memory) {
1884
1915
  return HonkVerificationKey.loadVerificationKey();
1885
1916
  }
1886
- }
1917
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crisp-e3/contracts",
3
- "version": "0.0.2-test",
3
+ "version": "0.2.0-test",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "contracts",
@@ -59,8 +59,8 @@
59
59
  "typechain": "^8.3.0",
60
60
  "typescript": "5.8.3",
61
61
  "viem": "2.30.6",
62
- "@crisp-e3/sdk": "^0.0.2-test",
63
- "@crisp-e3/zk-inputs": "^0.0.2-test"
62
+ "@crisp-e3/zk-inputs": "^0.2.0-test",
63
+ "@crisp-e3/sdk": "^0.2.0-test"
64
64
  },
65
65
  "scripts": {
66
66
  "compile": "hardhat compile",