@aztec/bb-prover 3.0.3 → 4.0.0-devnet.1-patch.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.
- package/dest/avm_proving_tests/avm_proving_tester.d.ts +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.js +5 -2
- package/dest/bb/execute.d.ts +6 -6
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +46 -75
- package/dest/instrumentation.d.ts +1 -1
- package/dest/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation.js +9 -39
- package/dest/prover/client/bb_private_kernel_prover.d.ts +9 -3
- package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -1
- package/dest/prover/client/bb_private_kernel_prover.js +16 -4
- package/dest/prover/client/bundle.d.ts +3 -3
- package/dest/prover/client/bundle.d.ts.map +1 -1
- package/dest/prover/client/bundle.js +2 -3
- package/dest/prover/client/lazy.d.ts +3 -3
- package/dest/prover/client/lazy.d.ts.map +1 -1
- package/dest/prover/client/lazy.js +2 -3
- package/dest/prover/server/bb_prover.d.ts +6 -9
- package/dest/prover/server/bb_prover.d.ts.map +1 -1
- package/dest/prover/server/bb_prover.js +415 -42
- package/dest/test/delay_values.d.ts +1 -1
- package/dest/test/delay_values.d.ts.map +1 -1
- package/dest/test/delay_values.js +27 -25
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -0
- package/dest/test/test_circuit_prover.d.ts +4 -4
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +462 -59
- package/dest/verification_key/verification_key_data.d.ts +1 -8
- package/dest/verification_key/verification_key_data.d.ts.map +1 -1
- package/dest/verification_key/verification_key_data.js +0 -19
- package/dest/verifier/bb_verifier.d.ts +1 -1
- package/dest/verifier/bb_verifier.d.ts.map +1 -1
- package/dest/verifier/bb_verifier.js +1 -4
- package/dest/verifier/queued_chonk_verifier.d.ts +1 -1
- package/dest/verifier/queued_chonk_verifier.d.ts.map +1 -1
- package/dest/verifier/queued_chonk_verifier.js +9 -40
- package/package.json +17 -17
- package/src/avm_proving_tests/avm_proving_tester.ts +6 -16
- package/src/bb/execute.ts +31 -59
- package/src/instrumentation.ts +8 -39
- package/src/prover/client/bb_private_kernel_prover.ts +20 -6
- package/src/prover/client/bundle.ts +3 -4
- package/src/prover/client/lazy.ts +3 -4
- package/src/prover/server/bb_prover.ts +22 -37
- package/src/test/delay_values.ts +28 -24
- package/src/test/index.ts +1 -0
- package/src/test/test_circuit_prover.ts +10 -13
- package/src/verification_key/verification_key_data.ts +0 -25
- package/src/verifier/bb_verifier.ts +1 -5
- package/src/verifier/queued_chonk_verifier.ts +9 -40
|
@@ -1,10 +1,377 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
function applyDecs2203RFactory() {
|
|
2
|
+
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
|
|
3
|
+
return function addInitializer(initializer) {
|
|
4
|
+
assertNotFinished(decoratorFinishedRef, "addInitializer");
|
|
5
|
+
assertCallable(initializer, "An initializer");
|
|
6
|
+
initializers.push(initializer);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
|
|
10
|
+
var kindStr;
|
|
11
|
+
switch(kind){
|
|
12
|
+
case 1:
|
|
13
|
+
kindStr = "accessor";
|
|
14
|
+
break;
|
|
15
|
+
case 2:
|
|
16
|
+
kindStr = "method";
|
|
17
|
+
break;
|
|
18
|
+
case 3:
|
|
19
|
+
kindStr = "getter";
|
|
20
|
+
break;
|
|
21
|
+
case 4:
|
|
22
|
+
kindStr = "setter";
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
kindStr = "field";
|
|
26
|
+
}
|
|
27
|
+
var ctx = {
|
|
28
|
+
kind: kindStr,
|
|
29
|
+
name: isPrivate ? "#" + name : name,
|
|
30
|
+
static: isStatic,
|
|
31
|
+
private: isPrivate,
|
|
32
|
+
metadata: metadata
|
|
33
|
+
};
|
|
34
|
+
var decoratorFinishedRef = {
|
|
35
|
+
v: false
|
|
36
|
+
};
|
|
37
|
+
ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
|
|
38
|
+
var get, set;
|
|
39
|
+
if (kind === 0) {
|
|
40
|
+
if (isPrivate) {
|
|
41
|
+
get = desc.get;
|
|
42
|
+
set = desc.set;
|
|
43
|
+
} else {
|
|
44
|
+
get = function() {
|
|
45
|
+
return this[name];
|
|
46
|
+
};
|
|
47
|
+
set = function(v) {
|
|
48
|
+
this[name] = v;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
} else if (kind === 2) {
|
|
52
|
+
get = function() {
|
|
53
|
+
return desc.value;
|
|
54
|
+
};
|
|
55
|
+
} else {
|
|
56
|
+
if (kind === 1 || kind === 3) {
|
|
57
|
+
get = function() {
|
|
58
|
+
return desc.get.call(this);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (kind === 1 || kind === 4) {
|
|
62
|
+
set = function(v) {
|
|
63
|
+
desc.set.call(this, v);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
ctx.access = get && set ? {
|
|
68
|
+
get: get,
|
|
69
|
+
set: set
|
|
70
|
+
} : get ? {
|
|
71
|
+
get: get
|
|
72
|
+
} : {
|
|
73
|
+
set: set
|
|
74
|
+
};
|
|
75
|
+
try {
|
|
76
|
+
return dec(value, ctx);
|
|
77
|
+
} finally{
|
|
78
|
+
decoratorFinishedRef.v = true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function assertNotFinished(decoratorFinishedRef, fnName) {
|
|
82
|
+
if (decoratorFinishedRef.v) {
|
|
83
|
+
throw new Error("attempted to call " + fnName + " after decoration was finished");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function assertCallable(fn, hint) {
|
|
87
|
+
if (typeof fn !== "function") {
|
|
88
|
+
throw new TypeError(hint + " must be a function");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function assertValidReturnValue(kind, value) {
|
|
92
|
+
var type = typeof value;
|
|
93
|
+
if (kind === 1) {
|
|
94
|
+
if (type !== "object" || value === null) {
|
|
95
|
+
throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
96
|
+
}
|
|
97
|
+
if (value.get !== undefined) {
|
|
98
|
+
assertCallable(value.get, "accessor.get");
|
|
99
|
+
}
|
|
100
|
+
if (value.set !== undefined) {
|
|
101
|
+
assertCallable(value.set, "accessor.set");
|
|
102
|
+
}
|
|
103
|
+
if (value.init !== undefined) {
|
|
104
|
+
assertCallable(value.init, "accessor.init");
|
|
105
|
+
}
|
|
106
|
+
} else if (type !== "function") {
|
|
107
|
+
var hint;
|
|
108
|
+
if (kind === 0) {
|
|
109
|
+
hint = "field";
|
|
110
|
+
} else if (kind === 10) {
|
|
111
|
+
hint = "class";
|
|
112
|
+
} else {
|
|
113
|
+
hint = "method";
|
|
114
|
+
}
|
|
115
|
+
throw new TypeError(hint + " decorators must return a function or void 0");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
|
|
119
|
+
var decs = decInfo[0];
|
|
120
|
+
var desc, init, value;
|
|
121
|
+
if (isPrivate) {
|
|
122
|
+
if (kind === 0 || kind === 1) {
|
|
123
|
+
desc = {
|
|
124
|
+
get: decInfo[3],
|
|
125
|
+
set: decInfo[4]
|
|
126
|
+
};
|
|
127
|
+
} else if (kind === 3) {
|
|
128
|
+
desc = {
|
|
129
|
+
get: decInfo[3]
|
|
130
|
+
};
|
|
131
|
+
} else if (kind === 4) {
|
|
132
|
+
desc = {
|
|
133
|
+
set: decInfo[3]
|
|
134
|
+
};
|
|
135
|
+
} else {
|
|
136
|
+
desc = {
|
|
137
|
+
value: decInfo[3]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
} else if (kind !== 0) {
|
|
141
|
+
desc = Object.getOwnPropertyDescriptor(base, name);
|
|
142
|
+
}
|
|
143
|
+
if (kind === 1) {
|
|
144
|
+
value = {
|
|
145
|
+
get: desc.get,
|
|
146
|
+
set: desc.set
|
|
147
|
+
};
|
|
148
|
+
} else if (kind === 2) {
|
|
149
|
+
value = desc.value;
|
|
150
|
+
} else if (kind === 3) {
|
|
151
|
+
value = desc.get;
|
|
152
|
+
} else if (kind === 4) {
|
|
153
|
+
value = desc.set;
|
|
154
|
+
}
|
|
155
|
+
var newValue, get, set;
|
|
156
|
+
if (typeof decs === "function") {
|
|
157
|
+
newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
|
|
158
|
+
if (newValue !== void 0) {
|
|
159
|
+
assertValidReturnValue(kind, newValue);
|
|
160
|
+
if (kind === 0) {
|
|
161
|
+
init = newValue;
|
|
162
|
+
} else if (kind === 1) {
|
|
163
|
+
init = newValue.init;
|
|
164
|
+
get = newValue.get || value.get;
|
|
165
|
+
set = newValue.set || value.set;
|
|
166
|
+
value = {
|
|
167
|
+
get: get,
|
|
168
|
+
set: set
|
|
169
|
+
};
|
|
170
|
+
} else {
|
|
171
|
+
value = newValue;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
for(var i = decs.length - 1; i >= 0; i--){
|
|
176
|
+
var dec = decs[i];
|
|
177
|
+
newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
|
|
178
|
+
if (newValue !== void 0) {
|
|
179
|
+
assertValidReturnValue(kind, newValue);
|
|
180
|
+
var newInit;
|
|
181
|
+
if (kind === 0) {
|
|
182
|
+
newInit = newValue;
|
|
183
|
+
} else if (kind === 1) {
|
|
184
|
+
newInit = newValue.init;
|
|
185
|
+
get = newValue.get || value.get;
|
|
186
|
+
set = newValue.set || value.set;
|
|
187
|
+
value = {
|
|
188
|
+
get: get,
|
|
189
|
+
set: set
|
|
190
|
+
};
|
|
191
|
+
} else {
|
|
192
|
+
value = newValue;
|
|
193
|
+
}
|
|
194
|
+
if (newInit !== void 0) {
|
|
195
|
+
if (init === void 0) {
|
|
196
|
+
init = newInit;
|
|
197
|
+
} else if (typeof init === "function") {
|
|
198
|
+
init = [
|
|
199
|
+
init,
|
|
200
|
+
newInit
|
|
201
|
+
];
|
|
202
|
+
} else {
|
|
203
|
+
init.push(newInit);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (kind === 0 || kind === 1) {
|
|
210
|
+
if (init === void 0) {
|
|
211
|
+
init = function(instance, init) {
|
|
212
|
+
return init;
|
|
213
|
+
};
|
|
214
|
+
} else if (typeof init !== "function") {
|
|
215
|
+
var ownInitializers = init;
|
|
216
|
+
init = function(instance, init) {
|
|
217
|
+
var value = init;
|
|
218
|
+
for(var i = 0; i < ownInitializers.length; i++){
|
|
219
|
+
value = ownInitializers[i].call(instance, value);
|
|
220
|
+
}
|
|
221
|
+
return value;
|
|
222
|
+
};
|
|
223
|
+
} else {
|
|
224
|
+
var originalInitializer = init;
|
|
225
|
+
init = function(instance, init) {
|
|
226
|
+
return originalInitializer.call(instance, init);
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
ret.push(init);
|
|
230
|
+
}
|
|
231
|
+
if (kind !== 0) {
|
|
232
|
+
if (kind === 1) {
|
|
233
|
+
desc.get = value.get;
|
|
234
|
+
desc.set = value.set;
|
|
235
|
+
} else if (kind === 2) {
|
|
236
|
+
desc.value = value;
|
|
237
|
+
} else if (kind === 3) {
|
|
238
|
+
desc.get = value;
|
|
239
|
+
} else if (kind === 4) {
|
|
240
|
+
desc.set = value;
|
|
241
|
+
}
|
|
242
|
+
if (isPrivate) {
|
|
243
|
+
if (kind === 1) {
|
|
244
|
+
ret.push(function(instance, args) {
|
|
245
|
+
return value.get.call(instance, args);
|
|
246
|
+
});
|
|
247
|
+
ret.push(function(instance, args) {
|
|
248
|
+
return value.set.call(instance, args);
|
|
249
|
+
});
|
|
250
|
+
} else if (kind === 2) {
|
|
251
|
+
ret.push(value);
|
|
252
|
+
} else {
|
|
253
|
+
ret.push(function(instance, args) {
|
|
254
|
+
return value.call(instance, args);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
} else {
|
|
258
|
+
Object.defineProperty(base, name, desc);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function applyMemberDecs(Class, decInfos, metadata) {
|
|
263
|
+
var ret = [];
|
|
264
|
+
var protoInitializers;
|
|
265
|
+
var staticInitializers;
|
|
266
|
+
var existingProtoNonFields = new Map();
|
|
267
|
+
var existingStaticNonFields = new Map();
|
|
268
|
+
for(var i = 0; i < decInfos.length; i++){
|
|
269
|
+
var decInfo = decInfos[i];
|
|
270
|
+
if (!Array.isArray(decInfo)) continue;
|
|
271
|
+
var kind = decInfo[1];
|
|
272
|
+
var name = decInfo[2];
|
|
273
|
+
var isPrivate = decInfo.length > 3;
|
|
274
|
+
var isStatic = kind >= 5;
|
|
275
|
+
var base;
|
|
276
|
+
var initializers;
|
|
277
|
+
if (isStatic) {
|
|
278
|
+
base = Class;
|
|
279
|
+
kind = kind - 5;
|
|
280
|
+
staticInitializers = staticInitializers || [];
|
|
281
|
+
initializers = staticInitializers;
|
|
282
|
+
} else {
|
|
283
|
+
base = Class.prototype;
|
|
284
|
+
protoInitializers = protoInitializers || [];
|
|
285
|
+
initializers = protoInitializers;
|
|
286
|
+
}
|
|
287
|
+
if (kind !== 0 && !isPrivate) {
|
|
288
|
+
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
|
|
289
|
+
var existingKind = existingNonFields.get(name) || 0;
|
|
290
|
+
if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
|
|
291
|
+
throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
|
|
292
|
+
} else if (!existingKind && kind > 2) {
|
|
293
|
+
existingNonFields.set(name, kind);
|
|
294
|
+
} else {
|
|
295
|
+
existingNonFields.set(name, true);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
|
|
299
|
+
}
|
|
300
|
+
pushInitializers(ret, protoInitializers);
|
|
301
|
+
pushInitializers(ret, staticInitializers);
|
|
302
|
+
return ret;
|
|
303
|
+
}
|
|
304
|
+
function pushInitializers(ret, initializers) {
|
|
305
|
+
if (initializers) {
|
|
306
|
+
ret.push(function(instance) {
|
|
307
|
+
for(var i = 0; i < initializers.length; i++){
|
|
308
|
+
initializers[i].call(instance);
|
|
309
|
+
}
|
|
310
|
+
return instance;
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function applyClassDecs(targetClass, classDecs, metadata) {
|
|
315
|
+
if (classDecs.length > 0) {
|
|
316
|
+
var initializers = [];
|
|
317
|
+
var newClass = targetClass;
|
|
318
|
+
var name = targetClass.name;
|
|
319
|
+
for(var i = classDecs.length - 1; i >= 0; i--){
|
|
320
|
+
var decoratorFinishedRef = {
|
|
321
|
+
v: false
|
|
322
|
+
};
|
|
323
|
+
try {
|
|
324
|
+
var nextNewClass = classDecs[i](newClass, {
|
|
325
|
+
kind: "class",
|
|
326
|
+
name: name,
|
|
327
|
+
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
|
|
328
|
+
metadata
|
|
329
|
+
});
|
|
330
|
+
} finally{
|
|
331
|
+
decoratorFinishedRef.v = true;
|
|
332
|
+
}
|
|
333
|
+
if (nextNewClass !== undefined) {
|
|
334
|
+
assertValidReturnValue(10, nextNewClass);
|
|
335
|
+
newClass = nextNewClass;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return [
|
|
339
|
+
defineMetadata(newClass, metadata),
|
|
340
|
+
function() {
|
|
341
|
+
for(var i = 0; i < initializers.length; i++){
|
|
342
|
+
initializers[i].call(newClass);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
];
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function defineMetadata(Class, metadata) {
|
|
349
|
+
return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
|
|
350
|
+
configurable: true,
|
|
351
|
+
enumerable: true,
|
|
352
|
+
value: metadata
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
|
|
356
|
+
if (parentClass !== void 0) {
|
|
357
|
+
var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
358
|
+
}
|
|
359
|
+
var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
|
|
360
|
+
var e = applyMemberDecs(targetClass, memberDecs, metadata);
|
|
361
|
+
if (!classDecs.length) defineMetadata(targetClass, metadata);
|
|
362
|
+
return {
|
|
363
|
+
e: e,
|
|
364
|
+
get c () {
|
|
365
|
+
return applyClassDecs(targetClass, classDecs, metadata);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
371
|
+
return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
|
|
6
372
|
}
|
|
7
|
-
|
|
373
|
+
var _dec, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _initProto;
|
|
374
|
+
import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, RECURSIVE_PROOF_LENGTH } from '@aztec/constants';
|
|
8
375
|
import { createLogger } from '@aztec/foundation/log';
|
|
9
376
|
import { sleep } from '@aztec/foundation/sleep';
|
|
10
377
|
import { Timer } from '@aztec/foundation/timer';
|
|
@@ -12,19 +379,103 @@ import { convertBlockMergeRollupOutputsFromWitnessMap, convertBlockMergeRollupPr
|
|
|
12
379
|
import { ProtocolCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
13
380
|
import { mapProtocolArtifactNameToCircuitName } from '@aztec/noir-protocol-circuits-types/types';
|
|
14
381
|
import { WASMSimulatorWithBlobs, emitCircuitSimulationStats } from '@aztec/simulator/server';
|
|
15
|
-
import {
|
|
382
|
+
import { makePublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
16
383
|
import { ProvingRequestType, makeEmptyRecursiveProof, makeRecursiveProof } from '@aztec/stdlib/proofs';
|
|
17
384
|
import { PublicChonkVerifierPublicInputs } from '@aztec/stdlib/rollup';
|
|
18
|
-
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
19
385
|
import { getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
20
386
|
import { ProverInstrumentation } from '../instrumentation.js';
|
|
21
387
|
import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
388
|
+
_dec = trackSpan('TestCircuitProver.getBaseParityProof'), _dec1 = trackSpan('TestCircuitProver.getRootParityProof'), _dec2 = trackSpan('TestCircuitProver.getPrivateTxBaseRollupProof'), _dec3 = trackSpan('TestCircuitProver.getPublicTxBaseRollupProof'), _dec4 = trackSpan('TestCircuitProver.getTxMergeRollupProof'), _dec5 = trackSpan('TestCircuitProver.getBlockRootFirstRollupProof'), _dec6 = trackSpan('TestCircuitProver.getBlockRootSingleTxFirstRollupProof'), _dec7 = trackSpan('TestCircuitProver.getBlockRootEmptyTxFirstRollupProof'), _dec8 = trackSpan('TestCircuitProver.getBlockRootRollupProof'), _dec9 = trackSpan('TestCircuitProver.getBlockRootSingleTxRollupProof'), _dec10 = trackSpan('TestCircuitProver.getBlockMergeRollupProof'), _dec11 = trackSpan('TestCircuitProver.getCheckpointRootRollupProof'), _dec12 = trackSpan('TestCircuitProver.getCheckpointRootSingleBlockRollupProof'), _dec13 = trackSpan('TestCircuitProver.getCheckpointPaddingRollupProof'), _dec14 = trackSpan('TestCircuitProver.getCheckpointMergeRollupProof'), _dec15 = trackSpan('TestCircuitProver.getRootRollupProof');
|
|
22
389
|
/**
|
|
23
390
|
* A class for use in testing situations (e2e, unit test, etc) and temporarily for assembling a block in the sequencer.
|
|
24
391
|
* Simulates circuits using the most efficient method and performs no proving.
|
|
25
392
|
*/ export class TestCircuitProver {
|
|
26
393
|
simulator;
|
|
27
394
|
opts;
|
|
395
|
+
static{
|
|
396
|
+
({ e: [_initProto] } = _apply_decs_2203_r(this, [
|
|
397
|
+
[
|
|
398
|
+
_dec,
|
|
399
|
+
2,
|
|
400
|
+
"getBaseParityProof"
|
|
401
|
+
],
|
|
402
|
+
[
|
|
403
|
+
_dec1,
|
|
404
|
+
2,
|
|
405
|
+
"getRootParityProof"
|
|
406
|
+
],
|
|
407
|
+
[
|
|
408
|
+
_dec2,
|
|
409
|
+
2,
|
|
410
|
+
"getPrivateTxBaseRollupProof"
|
|
411
|
+
],
|
|
412
|
+
[
|
|
413
|
+
_dec3,
|
|
414
|
+
2,
|
|
415
|
+
"getPublicTxBaseRollupProof"
|
|
416
|
+
],
|
|
417
|
+
[
|
|
418
|
+
_dec4,
|
|
419
|
+
2,
|
|
420
|
+
"getTxMergeRollupProof"
|
|
421
|
+
],
|
|
422
|
+
[
|
|
423
|
+
_dec5,
|
|
424
|
+
2,
|
|
425
|
+
"getBlockRootFirstRollupProof"
|
|
426
|
+
],
|
|
427
|
+
[
|
|
428
|
+
_dec6,
|
|
429
|
+
2,
|
|
430
|
+
"getBlockRootSingleTxFirstRollupProof"
|
|
431
|
+
],
|
|
432
|
+
[
|
|
433
|
+
_dec7,
|
|
434
|
+
2,
|
|
435
|
+
"getBlockRootEmptyTxFirstRollupProof"
|
|
436
|
+
],
|
|
437
|
+
[
|
|
438
|
+
_dec8,
|
|
439
|
+
2,
|
|
440
|
+
"getBlockRootRollupProof"
|
|
441
|
+
],
|
|
442
|
+
[
|
|
443
|
+
_dec9,
|
|
444
|
+
2,
|
|
445
|
+
"getBlockRootSingleTxRollupProof"
|
|
446
|
+
],
|
|
447
|
+
[
|
|
448
|
+
_dec10,
|
|
449
|
+
2,
|
|
450
|
+
"getBlockMergeRollupProof"
|
|
451
|
+
],
|
|
452
|
+
[
|
|
453
|
+
_dec11,
|
|
454
|
+
2,
|
|
455
|
+
"getCheckpointRootRollupProof"
|
|
456
|
+
],
|
|
457
|
+
[
|
|
458
|
+
_dec12,
|
|
459
|
+
2,
|
|
460
|
+
"getCheckpointRootSingleBlockRollupProof"
|
|
461
|
+
],
|
|
462
|
+
[
|
|
463
|
+
_dec13,
|
|
464
|
+
2,
|
|
465
|
+
"getCheckpointPaddingRollupProof"
|
|
466
|
+
],
|
|
467
|
+
[
|
|
468
|
+
_dec14,
|
|
469
|
+
2,
|
|
470
|
+
"getCheckpointMergeRollupProof"
|
|
471
|
+
],
|
|
472
|
+
[
|
|
473
|
+
_dec15,
|
|
474
|
+
2,
|
|
475
|
+
"getRootRollupProof"
|
|
476
|
+
]
|
|
477
|
+
], []));
|
|
478
|
+
}
|
|
28
479
|
wasmSimulator;
|
|
29
480
|
instrumentation;
|
|
30
481
|
logger;
|
|
@@ -34,7 +485,7 @@ import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
|
34
485
|
}, telemetry = getTelemetryClient()){
|
|
35
486
|
this.simulator = simulator;
|
|
36
487
|
this.opts = opts;
|
|
37
|
-
this.wasmSimulator = new WASMSimulatorWithBlobs();
|
|
488
|
+
this.wasmSimulator = (_initProto(this), new WASMSimulatorWithBlobs());
|
|
38
489
|
this.logger = createLogger('bb-prover:test-prover');
|
|
39
490
|
this.instrumentation = new ProverInstrumentation(telemetry, 'TestCircuitProver');
|
|
40
491
|
}
|
|
@@ -110,9 +561,9 @@ import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
|
110
561
|
}
|
|
111
562
|
getAvmProof(_inputs) {
|
|
112
563
|
// We can't simulate the AVM because we don't have enough context to do so (e.g., DBs).
|
|
113
|
-
// We just return an empty proof
|
|
564
|
+
// We just return an empty proof.
|
|
114
565
|
this.logger.debug('Skipping AVM simulation in TestCircuitProver.');
|
|
115
|
-
return this.applyDelay(ProvingRequestType.PUBLIC_VM, ()=>
|
|
566
|
+
return this.applyDelay(ProvingRequestType.PUBLIC_VM, ()=>makeEmptyRecursiveProof(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED));
|
|
116
567
|
}
|
|
117
568
|
async applyDelay(type, fn) {
|
|
118
569
|
const timer = new Timer();
|
|
@@ -151,51 +602,3 @@ import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
|
151
602
|
return makePublicInputsAndRecursiveProof(result, makeRecursiveProof(proofLength), ProtocolCircuitVks[artifactName]);
|
|
152
603
|
}
|
|
153
604
|
}
|
|
154
|
-
_ts_decorate([
|
|
155
|
-
trackSpan('TestCircuitProver.getBaseParityProof')
|
|
156
|
-
], TestCircuitProver.prototype, "getBaseParityProof", null);
|
|
157
|
-
_ts_decorate([
|
|
158
|
-
trackSpan('TestCircuitProver.getRootParityProof')
|
|
159
|
-
], TestCircuitProver.prototype, "getRootParityProof", null);
|
|
160
|
-
_ts_decorate([
|
|
161
|
-
trackSpan('TestCircuitProver.getPrivateTxBaseRollupProof')
|
|
162
|
-
], TestCircuitProver.prototype, "getPrivateTxBaseRollupProof", null);
|
|
163
|
-
_ts_decorate([
|
|
164
|
-
trackSpan('TestCircuitProver.getPublicTxBaseRollupProof')
|
|
165
|
-
], TestCircuitProver.prototype, "getPublicTxBaseRollupProof", null);
|
|
166
|
-
_ts_decorate([
|
|
167
|
-
trackSpan('TestCircuitProver.getTxMergeRollupProof')
|
|
168
|
-
], TestCircuitProver.prototype, "getTxMergeRollupProof", null);
|
|
169
|
-
_ts_decorate([
|
|
170
|
-
trackSpan('TestCircuitProver.getBlockRootFirstRollupProof')
|
|
171
|
-
], TestCircuitProver.prototype, "getBlockRootFirstRollupProof", null);
|
|
172
|
-
_ts_decorate([
|
|
173
|
-
trackSpan('TestCircuitProver.getBlockRootSingleTxFirstRollupProof')
|
|
174
|
-
], TestCircuitProver.prototype, "getBlockRootSingleTxFirstRollupProof", null);
|
|
175
|
-
_ts_decorate([
|
|
176
|
-
trackSpan('TestCircuitProver.getBlockRootEmptyTxFirstRollupProof')
|
|
177
|
-
], TestCircuitProver.prototype, "getBlockRootEmptyTxFirstRollupProof", null);
|
|
178
|
-
_ts_decorate([
|
|
179
|
-
trackSpan('TestCircuitProver.getBlockRootRollupProof')
|
|
180
|
-
], TestCircuitProver.prototype, "getBlockRootRollupProof", null);
|
|
181
|
-
_ts_decorate([
|
|
182
|
-
trackSpan('TestCircuitProver.getBlockRootSingleTxRollupProof')
|
|
183
|
-
], TestCircuitProver.prototype, "getBlockRootSingleTxRollupProof", null);
|
|
184
|
-
_ts_decorate([
|
|
185
|
-
trackSpan('TestCircuitProver.getBlockMergeRollupProof')
|
|
186
|
-
], TestCircuitProver.prototype, "getBlockMergeRollupProof", null);
|
|
187
|
-
_ts_decorate([
|
|
188
|
-
trackSpan('TestCircuitProver.getCheckpointRootRollupProof')
|
|
189
|
-
], TestCircuitProver.prototype, "getCheckpointRootRollupProof", null);
|
|
190
|
-
_ts_decorate([
|
|
191
|
-
trackSpan('TestCircuitProver.getCheckpointRootSingleBlockRollupProof')
|
|
192
|
-
], TestCircuitProver.prototype, "getCheckpointRootSingleBlockRollupProof", null);
|
|
193
|
-
_ts_decorate([
|
|
194
|
-
trackSpan('TestCircuitProver.getCheckpointPaddingRollupProof')
|
|
195
|
-
], TestCircuitProver.prototype, "getCheckpointPaddingRollupProof", null);
|
|
196
|
-
_ts_decorate([
|
|
197
|
-
trackSpan('TestCircuitProver.getCheckpointMergeRollupProof')
|
|
198
|
-
], TestCircuitProver.prototype, "getCheckpointMergeRollupProof", null);
|
|
199
|
-
_ts_decorate([
|
|
200
|
-
trackSpan('TestCircuitProver.getRootRollupProof')
|
|
201
|
-
], TestCircuitProver.prototype, "getRootRollupProof", null);
|
|
@@ -5,11 +5,4 @@ import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
|
5
5
|
* @returns The verification key data
|
|
6
6
|
*/
|
|
7
7
|
export declare function extractVkData(vkDirectoryPath: string): Promise<VerificationKeyData>;
|
|
8
|
-
|
|
9
|
-
* Reads the verification key data stored in a binary file at the specified directory location and parses into a VerificationKeyData.
|
|
10
|
-
* We do not assume any JSON file available but only the binary version, contrary to the above extractVkData() method.
|
|
11
|
-
* @param vkDirectoryPath - The directory containing the verification key binary data file.
|
|
12
|
-
* @returns The verification key data
|
|
13
|
-
*/
|
|
14
|
-
export declare function extractAvmVkData(vkDirectoryPath: string): Promise<VerificationKeyData>;
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZpY2F0aW9uX2tleV9kYXRhLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpY2F0aW9uX2tleS92ZXJpZmljYXRpb25fa2V5X2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsT0FBTyxFQUEyQixtQkFBbUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBUWpGOzs7O0dBSUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLGVBQWUsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBVXpGO0FBRUQ7Ozs7O0dBS0c7QUFDSCx3QkFBc0IsZ0JBQWdCLENBQUMsZUFBZSxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FlNUYifQ==
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZpY2F0aW9uX2tleV9kYXRhLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpY2F0aW9uX2tleS92ZXJpZmljYXRpb25fa2V5X2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUEyQixtQkFBbUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBT2pGOzs7O0dBSUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLGVBQWUsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBVXpGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification_key_data.d.ts","sourceRoot":"","sources":["../../src/verification_key/verification_key_data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification_key_data.d.ts","sourceRoot":"","sources":["../../src/verification_key/verification_key_data.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAOjF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAUzF"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED } from '@aztec/constants';
|
|
2
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
2
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
3
|
import { VerificationKeyAsFields, VerificationKeyData } from '@aztec/stdlib/vks';
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
4
|
import { promises as fs } from 'fs';
|
|
7
5
|
import * as path from 'path';
|
|
8
6
|
import { VK_FILENAME } from '../bb/execute.js';
|
|
@@ -19,20 +17,3 @@ import { VK_FILENAME } from '../bb/execute.js';
|
|
|
19
17
|
const vkAsFields = await VerificationKeyAsFields.fromKey(fields);
|
|
20
18
|
return new VerificationKeyData(vkAsFields, rawBinary);
|
|
21
19
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Reads the verification key data stored in a binary file at the specified directory location and parses into a VerificationKeyData.
|
|
24
|
-
* We do not assume any JSON file available but only the binary version, contrary to the above extractVkData() method.
|
|
25
|
-
* @param vkDirectoryPath - The directory containing the verification key binary data file.
|
|
26
|
-
* @returns The verification key data
|
|
27
|
-
*/ export async function extractAvmVkData(vkDirectoryPath) {
|
|
28
|
-
const rawBinary = await fs.readFile(path.join(vkDirectoryPath, VK_FILENAME));
|
|
29
|
-
const numFields = rawBinary.length / Fr.SIZE_IN_BYTES;
|
|
30
|
-
assert(numFields <= AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED, 'Invalid AVM verification key length');
|
|
31
|
-
const reader = BufferReader.asReader(rawBinary);
|
|
32
|
-
const fieldsArray = reader.readArray(numFields, Fr);
|
|
33
|
-
const fieldsArrayPadded = fieldsArray.concat(Array(AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED - fieldsArray.length).fill(new Fr(0)));
|
|
34
|
-
const vkAsFields = await VerificationKeyAsFields.fromKey(fieldsArrayPadded);
|
|
35
|
-
// TODO(#16644): We should have a different type for AVM verification keys since we don't have circuit size or num public inputs in AVM VKs.
|
|
36
|
-
const vk = new VerificationKeyData(vkAsFields, rawBinary);
|
|
37
|
-
return vk;
|
|
38
|
-
}
|
|
@@ -15,4 +15,4 @@ export declare class BBCircuitVerifier implements ClientProtocolCircuitVerifier
|
|
|
15
15
|
verifyProofForCircuit(circuit: ServerProtocolArtifact, proof: Proof): Promise<void>;
|
|
16
16
|
verifyProof(tx: Tx): Promise<IVCProofVerificationResult>;
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmJfdmVyaWZpZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92ZXJpZmllci9iYl92ZXJpZmllci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFHbEUsT0FBTyxFQUVMLEtBQUssZ0JBQWdCLEVBQ3JCLEtBQUssc0JBQXNCLEVBRTVCLE1BQU0sMkNBQTJDLENBQUM7QUFDbkQsT0FBTyxLQUFLLEVBQUUsNkJBQTZCLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNqSCxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUVsRCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDdEMsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQWE3RCxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFJN0MscUJBQWEsaUJBQWtCLFlBQVcsNkJBQTZCO0lBRW5FLE9BQU8sQ0FBQyxNQUFNO0lBQ2QsT0FBTyxDQUFDLE1BQU07SUFGaEIsT0FBTyxlQUdIO0lBRUcsSUFBSSxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFM0I7SUFFRCxPQUFvQixHQUFHLENBQUMsTUFBTSxFQUFFLFFBQVEsRUFBRSxNQUFNLFNBQXFDLDhCQU1wRjtJQUVNLHNCQUFzQixDQUFDLE9BQU8sRUFBRSxnQkFBZ0IsR0FBRyxtQkFBbUIsQ0FNNUU7SUFFWSxxQkFBcUIsQ0FBQyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsS0FBSyxFQUFFLEtBQUssaUJBbUMvRTtJQUVZLFdBQVcsQ0FBQyxFQUFFLEVBQUUsRUFBRSxHQUFHLE9BQU8sQ0FBQywwQkFBMEIsQ0FBQyxDQTZDcEU7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bb_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/bb_verifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAa7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAEnE,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IAFhB,OAAO,eAGH;IAEG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;IAED,OAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAqC,8BAMpF;IAEM,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CAM5E;IAEY,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,iBAmC/E;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,
|
|
1
|
+
{"version":3,"file":"bb_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/bb_verifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAa7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAEnE,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IAFhB,OAAO,eAGH;IAEG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;IAED,OAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAqC,8BAMpF;IAEM,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CAM5E;IAEY,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,iBAmC/E;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CA6CpE;CACF"}
|
|
@@ -67,16 +67,13 @@ export class BBCircuitVerifier {
|
|
|
67
67
|
const circuit = tx.data.forPublic ? 'HidingKernelToPublic' : 'HidingKernelToRollup';
|
|
68
68
|
// Block below is almost copy-pasted from verifyProofForCircuit
|
|
69
69
|
const operation = async (bbWorkingDirectory)=>{
|
|
70
|
-
const logFunction = (message)=>{
|
|
71
|
-
this.logger.debug(`${proofType} BB out - ${message}`);
|
|
72
|
-
};
|
|
73
70
|
const proofPath = path.join(bbWorkingDirectory, PROOF_FILENAME);
|
|
74
71
|
await writeChonkProofToPath(tx.chonkProof.attachPublicInputs(tx.data.publicInputs().toFields()), proofPath);
|
|
75
72
|
const verificationKeyPath = path.join(bbWorkingDirectory, VK_FILENAME);
|
|
76
73
|
const verificationKey = this.getVerificationKeyData(circuit);
|
|
77
74
|
await fs.writeFile(verificationKeyPath, verificationKey.keyAsBytes);
|
|
78
75
|
const timer = new Timer();
|
|
79
|
-
const result = await verifyChonkProof(this.config.bbBinaryPath, proofPath, verificationKeyPath,
|
|
76
|
+
const result = await verifyChonkProof(this.config.bbBinaryPath, proofPath, verificationKeyPath, this.logger, this.config.bbIVCConcurrency);
|
|
80
77
|
verificationDuration = timer.ms();
|
|
81
78
|
if (result.status === BB_RESULT.FAILURE) {
|
|
82
79
|
const errorMessage = `Failed to verify ${proofType} proof for ${circuit}!`;
|
|
@@ -12,4 +12,4 @@ export declare class QueuedIVCVerifier implements ClientProtocolCircuitVerifier
|
|
|
12
12
|
verifyProof(tx: Tx): Promise<IVCProofVerificationResult>;
|
|
13
13
|
stop(): Promise<void>;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVldWVkX2Nob25rX3ZlcmlmaWVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpZXIvcXVldWVkX2Nob25rX3ZlcmlmaWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLDZCQUE2QixFQUFFLDBCQUEwQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakgsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDM0MsT0FBTyxFQU1MLEtBQUssZUFBZSxFQUlyQixNQUFNLHlCQUF5QixDQUFDO0FBSWpDLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQWlFN0MscUJBQWEsaUJBQWtCLFlBQVcsNkJBQTZCO0lBTW5FLE9BQU8sQ0FBQyxRQUFRO0lBQ2hCLE9BQU8sQ0FBQyxTQUFTO0lBQ2pCLE9BQU8sQ0FBQyxNQUFNO0lBUGhCLE9BQU8sQ0FBQyxLQUFLLENBQWM7SUFDM0IsT0FBTyxDQUFDLE9BQU8sQ0FBcUI7SUFFcEMsWUFDRSxNQUFNLEVBQUUsUUFBUSxFQUNSLFFBQVEsRUFBRSw2QkFBNkIsRUFDdkMsU0FBUyxHQUFFLGVBQXNDLEVBQ2pELE1BQU0seUNBQWtELEVBTWpFO0lBRVksV0FBVyxDQUFDLEVBQUUsRUFBRSxFQUFFLEdBQUcsT0FBTyxDQUFDLDBCQUEwQixDQUFDLENBSXBFO0lBRUQsSUFBSSxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFcEI7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queued_chonk_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/queued_chonk_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAML,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"queued_chonk_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/queued_chonk_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAML,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiE7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAMnE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IAPhB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAqB;IAEpC,YACE,MAAM,EAAE,QAAQ,EACR,QAAQ,EAAE,6BAA6B,EACvC,SAAS,GAAE,eAAsC,EACjD,MAAM,yCAAkD,EAMjE;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAIpE;IAED,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpB;CACF"}
|