Skip to content

Commit 0c87ad0

Browse files
committed
feat(host-contracts): updates FheGasLimit
1 parent d7c800e commit 0c87ad0

File tree

5 files changed

+1903
-1020
lines changed

5 files changed

+1903
-1020
lines changed

host-contracts/codegen/operatorsPrices.json

Lines changed: 114 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"fheAdd": {
3-
"binary": true,
3+
"supportScalar": true,
4+
"numberInputs": 2,
45
"scalar": {
56
"Uint8": 94000,
67
"Uint16": 133000,
@@ -17,7 +18,8 @@
1718
}
1819
},
1920
"fheSub": {
20-
"binary": true,
21+
"supportScalar": true,
22+
"numberInputs": 2,
2123
"scalar": {
2224
"Uint8": 94000,
2325
"Uint16": 133000,
@@ -34,7 +36,8 @@
3436
}
3537
},
3638
"fheMul": {
37-
"binary": true,
39+
"supportScalar": true,
40+
"numberInputs": 2,
3841
"scalar": {
3942
"Uint8": 159000,
4043
"Uint16": 208000,
@@ -51,7 +54,8 @@
5154
}
5255
},
5356
"fheDiv": {
54-
"binary": true,
57+
"supportScalar": true,
58+
"numberInputs": 2,
5559
"scalar": {
5660
"Uint8": 238000,
5761
"Uint16": 314000,
@@ -61,7 +65,8 @@
6165
}
6266
},
6367
"fheRem": {
64-
"binary": true,
68+
"supportScalar": true,
69+
"numberInputs": 2,
6570
"scalar": {
6671
"Uint8": 460000,
6772
"Uint16": 622000,
@@ -71,7 +76,8 @@
7176
}
7277
},
7378
"fheBitAnd": {
74-
"binary": true,
79+
"supportScalar": true,
80+
"numberInputs": 2,
7581
"scalar": {
7682
"Bool": 26000,
7783
"Uint8": 34000,
@@ -92,7 +98,8 @@
9298
}
9399
},
94100
"fheBitOr": {
95-
"binary": true,
101+
"supportScalar": true,
102+
"numberInputs": 2,
96103
"scalar": {
97104
"Bool": 26000,
98105
"Uint8": 34000,
@@ -113,7 +120,8 @@
113120
}
114121
},
115122
"fheBitXor": {
116-
"binary": true,
123+
"supportScalar": true,
124+
"numberInputs": 2,
117125
"scalar": {
118126
"Bool": 26000,
119127
"Uint8": 34000,
@@ -134,7 +142,8 @@
134142
}
135143
},
136144
"fheShl": {
137-
"binary": true,
145+
"supportScalar": true,
146+
"numberInputs": 2,
138147
"scalar": {
139148
"Uint8": 35000,
140149
"Uint16": 35000,
@@ -153,7 +162,8 @@
153162
}
154163
},
155164
"fheShr": {
156-
"binary": true,
165+
"supportScalar": true,
166+
"numberInputs": 2,
157167
"scalar": {
158168
"Uint8": 35000,
159169
"Uint16": 35000,
@@ -172,7 +182,8 @@
172182
}
173183
},
174184
"fheRotl": {
175-
"binary": true,
185+
"supportScalar": true,
186+
"numberInputs": 2,
176187
"scalar": {
177188
"Uint8": 35000,
178189
"Uint16": 35000,
@@ -191,7 +202,8 @@
191202
}
192203
},
193204
"fheRotr": {
194-
"binary": true,
205+
"supportScalar": true,
206+
"numberInputs": 2,
195207
"scalar": {
196208
"Uint8": 35000,
197209
"Uint16": 35000,
@@ -210,7 +222,38 @@
210222
}
211223
},
212224
"fheEq": {
213-
"binary": true,
225+
"supportScalar": true,
226+
"numberInputs": 2,
227+
"scalar": {
228+
"Bool": 49000,
229+
"Uint8": 53000,
230+
"Uint16": 54000,
231+
"Uint32": 82000,
232+
"Uint64": 86000,
233+
"Uint128": 88000,
234+
"Uint160": 90000,
235+
"Uint256": 100000,
236+
"Uint512": 150000,
237+
"Uint1024": 200000,
238+
"Uint2048": 300000
239+
},
240+
"nonScalar": {
241+
"Bool": 49000,
242+
"Uint8": 53000,
243+
"Uint16": 54000,
244+
"Uint32": 82000,
245+
"Uint64": 86000,
246+
"Uint128": 88000,
247+
"Uint160": 90000,
248+
"Uint256": 100000,
249+
"Uint512": 150000,
250+
"Uint1024": 200000,
251+
"Uint2048": 300000
252+
}
253+
},
254+
"fheEqBytes": {
255+
"supportScalar": true,
256+
"numberInputs": 1,
214257
"scalar": {
215258
"Bool": 49000,
216259
"Uint8": 53000,
@@ -239,7 +282,38 @@
239282
}
240283
},
241284
"fheNe": {
242-
"binary": true,
285+
"supportScalar": true,
286+
"numberInputs": 2,
287+
"scalar": {
288+
"Bool": 49000,
289+
"Uint8": 53000,
290+
"Uint16": 54000,
291+
"Uint32": 82000,
292+
"Uint64": 86000,
293+
"Uint128": 88000,
294+
"Uint160": 90000,
295+
"Uint256": 100000,
296+
"Uint512": 150000,
297+
"Uint1024": 200000,
298+
"Uint2048": 300000
299+
},
300+
"nonScalar": {
301+
"Bool": 49000,
302+
"Uint8": 53000,
303+
"Uint16": 54000,
304+
"Uint32": 82000,
305+
"Uint64": 86000,
306+
"Uint128": 88000,
307+
"Uint160": 90000,
308+
"Uint256": 100000,
309+
"Uint512": 150000,
310+
"Uint1024": 200000,
311+
"Uint2048": 300000
312+
}
313+
},
314+
"fheNeBytes": {
315+
"supportScalar": true,
316+
"numberInputs": 1,
243317
"scalar": {
244318
"Bool": 49000,
245319
"Uint8": 53000,
@@ -268,7 +342,8 @@
268342
}
269343
},
270344
"fheGe": {
271-
"binary": true,
345+
"supportScalar": true,
346+
"numberInputs": 2,
272347
"scalar": {
273348
"Uint8": 82000,
274349
"Uint16": 105000,
@@ -285,7 +360,8 @@
285360
}
286361
},
287362
"fheGt": {
288-
"binary": true,
363+
"supportScalar": true,
364+
"numberInputs": 2,
289365
"scalar": {
290366
"Uint8": 82000,
291367
"Uint16": 105000,
@@ -302,7 +378,8 @@
302378
}
303379
},
304380
"fheLe": {
305-
"binary": true,
381+
"supportScalar": true,
382+
"numberInputs": 2,
306383
"scalar": {
307384
"Uint8": 82000,
308385
"Uint16": 105000,
@@ -319,7 +396,8 @@
319396
}
320397
},
321398
"fheLt": {
322-
"binary": true,
399+
"supportScalar": true,
400+
"numberInputs": 2,
323401
"scalar": {
324402
"Uint8": 82000,
325403
"Uint16": 105000,
@@ -336,7 +414,8 @@
336414
}
337415
},
338416
"fheMin": {
339-
"binary": true,
417+
"supportScalar": true,
418+
"numberInputs": 2,
340419
"scalar": {
341420
"Uint8": 128000,
342421
"Uint16": 150000,
@@ -353,7 +432,8 @@
353432
}
354433
},
355434
"fheMax": {
356-
"binary": true,
435+
"supportScalar": true,
436+
"numberInputs": 2,
357437
"scalar": {
358438
"Uint8": 128000,
359439
"Uint16": 150000,
@@ -370,7 +450,8 @@
370450
}
371451
},
372452
"fheNeg": {
373-
"binary": false,
453+
"supportScalar": false,
454+
"numberInputs": 1,
374455
"types": {
375456
"Uint8": 95000,
376457
"Uint16": 131000,
@@ -381,7 +462,8 @@
381462
}
382463
},
383464
"fheNot": {
384-
"binary": false,
465+
"supportScalar": false,
466+
"numberInputs": 1,
385467
"types": {
386468
"Bool": 30000,
387469
"Uint8": 34000,
@@ -393,7 +475,8 @@
393475
}
394476
},
395477
"cast": {
396-
"binary": false,
478+
"supportScalar": false,
479+
"numberInputs": 1,
397480
"types": {
398481
"Bool": 200,
399482
"Uint8": 200,
@@ -405,7 +488,8 @@
405488
}
406489
},
407490
"trivialEncrypt": {
408-
"binary": false,
491+
"supportScalar": false,
492+
"numberInputs": 0,
409493
"types": {
410494
"Bool": 100,
411495
"Uint8": 100,
@@ -421,7 +505,8 @@
421505
}
422506
},
423507
"ifThenElse": {
424-
"binary": false,
508+
"supportScalar": false,
509+
"numberInputs": 3,
425510
"types": {
426511
"Bool": 43000,
427512
"Uint8": 47000,
@@ -437,7 +522,8 @@
437522
}
438523
},
439524
"fheRand": {
440-
"binary": false,
525+
"supportScalar": false,
526+
"numberInputs": 0,
441527
"types": {
442528
"Bool": 100000,
443529
"Uint8": 100000,
@@ -452,7 +538,8 @@
452538
}
453539
},
454540
"fheRandBounded": {
455-
"binary": false,
541+
"supportScalar": false,
542+
"numberInputs": 0,
456543
"types": {
457544
"Uint8": 100000,
458545
"Uint16": 100000,

0 commit comments

Comments
 (0)