@aztec/pxe 0.87.4-starknet.1 → 0.87.5
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/config/package_info.js +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +3 -9
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +3 -9
- package/dest/entrypoints/{pxe_creation_options.d.ts → client/pxe_creation_options.d.ts} +1 -4
- package/dest/entrypoints/client/pxe_creation_options.d.ts.map +1 -0
- package/dest/entrypoints/server/utils.d.ts +3 -3
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +15 -23
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +1 -2
- package/dest/pxe_service/pxe_service.d.ts.map +1 -1
- package/dest/pxe_service/pxe_service.js +7 -12
- package/package.json +15 -15
- package/src/config/package_info.ts +1 -1
- package/src/entrypoints/client/bundle/utils.ts +14 -22
- package/src/entrypoints/client/lazy/utils.ts +10 -23
- package/src/entrypoints/{pxe_creation_options.ts → client/pxe_creation_options.ts} +1 -4
- package/src/entrypoints/server/utils.ts +20 -38
- package/src/private_kernel/private_kernel_execution_prover.ts +0 -1
- package/src/pxe_service/pxe_service.ts +6 -11
- package/dest/entrypoints/pxe_creation_options.d.ts.map +0 -1
- /package/dest/entrypoints/{pxe_creation_options.js → client/pxe_creation_options.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
2
|
import type { PXEServiceConfig } from '../../../config/index.js';
|
|
3
3
|
import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
4
|
-
import type { PXECreationOptions } from '
|
|
4
|
+
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
5
5
|
/**
|
|
6
6
|
* Create and start an PXEService instance with the given AztecNode.
|
|
7
7
|
* If no keyStore or database is provided, it will use KeyStore and MemoryDB as default values.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,kBAAoC,uBAkC9C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
2
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
5
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -17,21 +16,16 @@ import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
|
17
16
|
*/ export async function createPXEService(aztecNode, config, options = {
|
|
18
17
|
loggers: {}
|
|
19
18
|
}) {
|
|
20
|
-
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
21
|
-
const loggers = options.loggers ?? {};
|
|
22
19
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
23
20
|
const configWithContracts = {
|
|
24
21
|
...config,
|
|
25
22
|
l1Contracts,
|
|
26
23
|
l2BlockBatchSize: 200
|
|
27
24
|
};
|
|
28
|
-
const
|
|
29
|
-
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
25
|
+
const store = await createStore('pxe_data', configWithContracts, options.loggers.store ?? createLogger('pxe:data:indexeddb'));
|
|
30
26
|
const simulationProvider = new WASMSimulator();
|
|
31
|
-
const
|
|
32
|
-
const prover = options.prover ?? new BBWASMBundlePrivateKernelProver(simulationProvider, 16, proverLogger);
|
|
27
|
+
const prover = options.prover ?? new BBWASMBundlePrivateKernelProver(simulationProvider, 16, options.loggers.prover ?? createLogger('bb:wasm:bundle'));
|
|
33
28
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
34
|
-
const
|
|
35
|
-
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, pxeLogger);
|
|
29
|
+
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, options.loggers.pxe ?? createLogger('pxe:service'));
|
|
36
30
|
return pxe;
|
|
37
31
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
2
|
import type { PXEServiceConfig } from '../../../config/index.js';
|
|
3
3
|
import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
4
|
-
import type { PXECreationOptions } from '
|
|
4
|
+
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
5
5
|
/**
|
|
6
6
|
* Create and start an PXEService instance with the given AztecNode.
|
|
7
7
|
* Returns a Promise that resolves to the started PXEService instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,kBAAoC,uBA8B9C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/client/wasm/lazy';
|
|
2
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
5
4
|
import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/providers/lazy';
|
|
@@ -16,21 +15,16 @@ import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
|
16
15
|
*/ export async function createPXEService(aztecNode, config, options = {
|
|
17
16
|
loggers: {}
|
|
18
17
|
}) {
|
|
19
|
-
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
20
18
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
21
19
|
const configWithContracts = {
|
|
22
20
|
...config,
|
|
23
21
|
l2BlockBatchSize: 200,
|
|
24
22
|
l1Contracts
|
|
25
23
|
};
|
|
26
|
-
const
|
|
27
|
-
const storeLogger = loggers.store ? loggers.store : createLogger('pxe:data:idb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
28
|
-
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
24
|
+
const store = await createStore('pxe_data', configWithContracts, options.loggers.store ?? createLogger('pxe:data:indexeddb'));
|
|
29
25
|
const simulationProvider = new WASMSimulator();
|
|
30
|
-
const
|
|
31
|
-
const prover = options.prover ?? new BBWASMLazyPrivateKernelProver(simulationProvider, 16, proverLogger);
|
|
26
|
+
const prover = options.prover ?? new BBWASMLazyPrivateKernelProver(simulationProvider, 16, options.loggers.prover ?? createLogger('bb:wasm:lazy'));
|
|
32
27
|
const protocolContractsProvider = new LazyProtocolContractsProvider();
|
|
33
|
-
const
|
|
34
|
-
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, pxeLogger);
|
|
28
|
+
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, options.loggers.pxe ?? createLogger('pxe:service'));
|
|
35
29
|
return pxe;
|
|
36
30
|
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
3
2
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
4
3
|
export type PXECreationOptions = {
|
|
5
|
-
loggers
|
|
4
|
+
loggers: {
|
|
6
5
|
store?: Logger;
|
|
7
6
|
pxe?: Logger;
|
|
8
7
|
prover?: Logger;
|
|
9
8
|
};
|
|
10
|
-
useLogSuffix?: boolean | string;
|
|
11
9
|
prover?: PrivateKernelProver;
|
|
12
|
-
store?: AztecAsyncKVStore;
|
|
13
10
|
};
|
|
14
11
|
//# sourceMappingURL=pxe_creation_options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/client/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
1
2
|
import { type SimulationProvider } from '@aztec/simulator/client';
|
|
2
3
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
3
4
|
import type { PXEServiceConfig } from '../../config/index.js';
|
|
4
5
|
import { PXEService } from '../../pxe_service/pxe_service.js';
|
|
5
|
-
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
6
6
|
/**
|
|
7
7
|
* Create and start an PXEService instance with the given AztecNode and config.
|
|
8
8
|
*
|
|
@@ -11,7 +11,7 @@ import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
|
11
11
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
12
12
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
13
13
|
*/
|
|
14
|
-
export declare function createPXEService(aztecNode: AztecNode, config: PXEServiceConfig,
|
|
14
|
+
export declare function createPXEService(aztecNode: AztecNode, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined, store?: AztecAsyncKVStore): Promise<PXEService>;
|
|
15
15
|
/**
|
|
16
16
|
* Create and start an PXEService instance with the given AztecNode, SimulationProvider and config.
|
|
17
17
|
*
|
|
@@ -21,5 +21,5 @@ export declare function createPXEService(aztecNode: AztecNode, config: PXEServic
|
|
|
21
21
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
22
22
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
23
23
|
*/
|
|
24
|
-
export declare function createPXEServiceWithSimulationProvider(aztecNode: AztecNode, simulationProvider: SimulationProvider, config: PXEServiceConfig,
|
|
24
|
+
export declare function createPXEServiceWithSimulationProvider(aztecNode: AztecNode, simulationProvider: SimulationProvider, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined, store?: AztecAsyncKVStore): Promise<PXEService>;
|
|
25
25
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,yBAAyB,CAAC;AAEjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,YAAY,GAAE,MAAM,GAAG,OAAO,GAAG,SAAqB,EACtD,KAAK,CAAC,EAAE,iBAAiB,uBAK1B;AAED;;;;;;;;GAQG;AACH,wBAAsB,sCAAsC,CAC1D,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,MAAM,EAAE,gBAAgB,EACxB,YAAY,GAAE,MAAM,GAAG,OAAO,GAAG,SAAqB,EACtD,KAAK,CAAC,EAAE,iBAAiB,uBA+B1B"}
|
|
@@ -3,8 +3,8 @@ import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bu
|
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
5
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { WASMSimulator } from '@aztec/simulator/client';
|
|
7
|
+
import { SimulationProviderRecorderWrapper } from '@aztec/simulator/testing';
|
|
8
8
|
import { PXEService } from '../../pxe_service/pxe_service.js';
|
|
9
9
|
import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
10
10
|
/**
|
|
@@ -14,13 +14,10 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
14
14
|
* @param config - The PXE Service Config to use
|
|
15
15
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
16
16
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
17
|
-
*/ export function createPXEService(aztecNode, config,
|
|
18
|
-
loggers: {}
|
|
19
|
-
}) {
|
|
17
|
+
*/ export function createPXEService(aztecNode, config, useLogSuffix = undefined, store) {
|
|
20
18
|
const simulationProvider = new WASMSimulator();
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, options);
|
|
19
|
+
const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider);
|
|
20
|
+
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, useLogSuffix, store);
|
|
24
21
|
}
|
|
25
22
|
/**
|
|
26
23
|
* Create and start an PXEService instance with the given AztecNode, SimulationProvider and config.
|
|
@@ -30,39 +27,34 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
30
27
|
* @param config - The PXE Service Config to use
|
|
31
28
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
32
29
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
33
|
-
*/ export async function createPXEServiceWithSimulationProvider(aztecNode, simulationProvider, config,
|
|
34
|
-
|
|
35
|
-
}) {
|
|
36
|
-
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
37
|
-
const loggers = options.loggers ?? {};
|
|
30
|
+
*/ export async function createPXEServiceWithSimulationProvider(aztecNode, simulationProvider, config, useLogSuffix = undefined, store) {
|
|
31
|
+
const logSuffix = typeof useLogSuffix === 'boolean' ? useLogSuffix ? randomBytes(3).toString('hex') : undefined : useLogSuffix;
|
|
38
32
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
39
33
|
const configWithContracts = {
|
|
40
34
|
...config,
|
|
41
35
|
l1Contracts,
|
|
42
36
|
l2BlockBatchSize: 200
|
|
43
37
|
};
|
|
44
|
-
if (!
|
|
38
|
+
if (!store) {
|
|
45
39
|
// TODO once https://github.com/AztecProtocol/aztec-packages/issues/13656 is fixed, we can remove this and always
|
|
46
40
|
// import the lmdb-v2 version
|
|
47
41
|
const { createStore } = await import('@aztec/kv-store/lmdb-v2');
|
|
48
|
-
|
|
49
|
-
options.store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, storeLogger);
|
|
42
|
+
store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, createLogger('pxe:data:lmdb'));
|
|
50
43
|
}
|
|
51
|
-
const
|
|
52
|
-
const prover = await createProver(config, simulationProvider, proverLogger);
|
|
44
|
+
const prover = await createProver(config, simulationProvider, logSuffix);
|
|
53
45
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
54
|
-
const
|
|
55
|
-
const pxe = await PXEService.create(aztecNode, options.store, prover, simulationProvider, protocolContractsProvider, config, pxeLogger);
|
|
46
|
+
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, logSuffix);
|
|
56
47
|
return pxe;
|
|
57
48
|
}
|
|
58
|
-
function createProver(config, simulationProvider,
|
|
49
|
+
function createProver(config, simulationProvider, logSuffix) {
|
|
59
50
|
if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
|
|
60
|
-
return new BBWASMBundlePrivateKernelProver(simulationProvider, 16
|
|
51
|
+
return new BBWASMBundlePrivateKernelProver(simulationProvider, 16);
|
|
61
52
|
} else {
|
|
62
53
|
const bbConfig = config;
|
|
54
|
+
const log = createLogger('pxe:bb-native-prover' + (logSuffix ? `:${logSuffix}` : ''));
|
|
63
55
|
return BBNativePrivateKernelProver.new({
|
|
64
56
|
bbSkipCleanup: false,
|
|
65
57
|
...bbConfig
|
|
66
|
-
}, simulationProvider,
|
|
58
|
+
}, simulationProvider, log);
|
|
67
59
|
}
|
|
68
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAKL,KAAK,iCAAiC,EAKtC,KAAK,oCAAoC,EAE1C,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAIV,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAStE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5D;AAED;;;;;GAKG;AACH,qBAAa,4BAA4B;IAIrC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IALpB,OAAO,CAAC,GAAG,CAAuD;gBAGxD,MAAM,EAAE,mBAAmB,EAC3B,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ;IAG5B;;;;;;;;;;OAUG;IACG,gBAAgB,CACpB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAE,kCAI9C,GACA,OAAO,CAAC,iCAAiC,CAAC,oCAAoC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAKL,KAAK,iCAAiC,EAKtC,KAAK,oCAAoC,EAE1C,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAIV,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAStE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5D;AAED;;;;;GAKG;AACH,qBAAa,4BAA4B;IAIrC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IALpB,OAAO,CAAC,GAAG,CAAuD;gBAGxD,MAAM,EAAE,mBAAmB,EAC3B,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ;IAG5B;;;;;;;;;;OAUG;IACG,gBAAgB,CACpB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAE,kCAI9C,GACA,OAAO,CAAC,iCAAiC,CAAC,oCAAoC,CAAC,CAAC;YAoPrE,qBAAqB;CA2CpC"}
|
|
@@ -95,8 +95,7 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
95
95
|
witness: currentExecution.partialWitness,
|
|
96
96
|
vk: currentExecution.vk,
|
|
97
97
|
timings: {
|
|
98
|
-
witgen: currentExecution.profileResult?.timings.witgen ?? 0
|
|
99
|
-
oracles: currentExecution.profileResult?.timings.oracles
|
|
98
|
+
witgen: currentExecution.profileResult?.timings.witgen ?? 0
|
|
100
99
|
}
|
|
101
100
|
});
|
|
102
101
|
const privateCallData = await this.createPrivateCallData(currentExecution);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_service.d.ts","sourceRoot":"","sources":["../../src/pxe_service/pxe_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAiB,KAAK,kBAAkB,EAAsB,MAAM,yBAAyB,CAAC;AACrG,OAAO,EACL,KAAK,gBAAgB,EAQtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,QAAQ,EACb,KAAK,cAAc,EAGpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,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YAAY,EAAE,GACtB,OAAO,CAAC,uBAAuB,CAAC;IAuCtB,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC;IA4BtC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAYxB,gBAAgB,CAAC,CAAC,EAC7B,eAAe,EAAE,YAAY,EAC7B,gBAAgB,EAAE,uBAAuB,EACzC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,YAAY,EAAE,GACzB,OAAO,CAAC,CAAC,EAAE,CAAC;IAuBT,eAAe,CAAC,CAAC,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IA6BxG,iBAAiB;CAGxB"}
|
|
@@ -459,10 +459,9 @@ import { enrichPublicSimulationError, enrichSimulationError } from './error_enri
|
|
|
459
459
|
profileMode: 'none'
|
|
460
460
|
});
|
|
461
461
|
const totalTime = totalTimer.ms();
|
|
462
|
-
const perFunction = executionSteps.map(({ functionName, timings: { witgen
|
|
462
|
+
const perFunction = executionSteps.map(({ functionName, timings: { witgen } })=>({
|
|
463
463
|
functionName,
|
|
464
|
-
time: witgen
|
|
465
|
-
oracles
|
|
464
|
+
time: witgen
|
|
466
465
|
}));
|
|
467
466
|
const timings = {
|
|
468
467
|
total: totalTime,
|
|
@@ -505,13 +504,10 @@ import { enrichPublicSimulationError, enrichSimulationError } from './error_enri
|
|
|
505
504
|
profileMode
|
|
506
505
|
});
|
|
507
506
|
const totalTime = totalTimer.ms();
|
|
508
|
-
const perFunction = executionSteps.map(({ functionName, timings: { witgen
|
|
509
|
-
return {
|
|
507
|
+
const perFunction = executionSteps.map(({ functionName, timings: { witgen } })=>({
|
|
510
508
|
functionName,
|
|
511
|
-
time: witgen
|
|
512
|
-
|
|
513
|
-
};
|
|
514
|
-
});
|
|
509
|
+
time: witgen
|
|
510
|
+
}));
|
|
515
511
|
// Gate computation is time is not relevant for profiling, so we subtract it from the total time.
|
|
516
512
|
const gateCountComputationTime = executionSteps.reduce((acc, { timings })=>acc + (timings.gateCount ?? 0), 0) ?? 0;
|
|
517
513
|
const timings = {
|
|
@@ -577,10 +573,9 @@ import { enrichPublicSimulationError, enrichSimulationError } from './error_enri
|
|
|
577
573
|
}
|
|
578
574
|
const txHash = await simulatedTx.getTxHash();
|
|
579
575
|
const totalTime = totalTimer.ms();
|
|
580
|
-
const perFunction = executionSteps.map(({ functionName, timings: { witgen
|
|
576
|
+
const perFunction = executionSteps.map(({ functionName, timings: { witgen } })=>({
|
|
581
577
|
functionName,
|
|
582
|
-
time: witgen
|
|
583
|
-
oracles
|
|
578
|
+
time: witgen
|
|
584
579
|
}));
|
|
585
580
|
const timings = {
|
|
586
581
|
total: totalTime,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": "./dest/entrypoints/server/index.js",
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@aztec/bb-prover": "0.87.
|
|
61
|
-
"@aztec/bb.js": "0.87.
|
|
62
|
-
"@aztec/builder": "0.87.
|
|
63
|
-
"@aztec/constants": "0.87.
|
|
64
|
-
"@aztec/ethereum": "0.87.
|
|
65
|
-
"@aztec/foundation": "0.87.
|
|
66
|
-
"@aztec/key-store": "0.87.
|
|
67
|
-
"@aztec/kv-store": "0.87.
|
|
68
|
-
"@aztec/noir-protocol-circuits-types": "0.87.
|
|
69
|
-
"@aztec/noir-types": "0.87.
|
|
70
|
-
"@aztec/protocol-contracts": "0.87.
|
|
71
|
-
"@aztec/simulator": "0.87.
|
|
72
|
-
"@aztec/stdlib": "0.87.
|
|
60
|
+
"@aztec/bb-prover": "0.87.5",
|
|
61
|
+
"@aztec/bb.js": "0.87.5",
|
|
62
|
+
"@aztec/builder": "0.87.5",
|
|
63
|
+
"@aztec/constants": "0.87.5",
|
|
64
|
+
"@aztec/ethereum": "0.87.5",
|
|
65
|
+
"@aztec/foundation": "0.87.5",
|
|
66
|
+
"@aztec/key-store": "0.87.5",
|
|
67
|
+
"@aztec/kv-store": "0.87.5",
|
|
68
|
+
"@aztec/noir-protocol-circuits-types": "0.87.5",
|
|
69
|
+
"@aztec/noir-types": "0.87.5",
|
|
70
|
+
"@aztec/protocol-contracts": "0.87.5",
|
|
71
|
+
"@aztec/simulator": "0.87.5",
|
|
72
|
+
"@aztec/stdlib": "0.87.5",
|
|
73
73
|
"koa": "^2.16.1",
|
|
74
74
|
"koa-router": "^12.0.0",
|
|
75
75
|
"lodash.omit": "^4.5.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"viem": "2.23.7"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@aztec/noir-test-contracts.js": "0.87.
|
|
81
|
+
"@aztec/noir-test-contracts.js": "0.87.5",
|
|
82
82
|
"@jest/globals": "^29.5.0",
|
|
83
83
|
"@types/jest": "^29.5.0",
|
|
84
84
|
"@types/lodash.omit": "^4.5.7",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
2
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
5
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -8,7 +7,7 @@ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
|
8
7
|
|
|
9
8
|
import type { PXEServiceConfig } from '../../../config/index.js';
|
|
10
9
|
import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
11
|
-
import type { PXECreationOptions } from '
|
|
10
|
+
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Create and start an PXEService instance with the given AztecNode.
|
|
@@ -25,15 +24,6 @@ export async function createPXEService(
|
|
|
25
24
|
config: PXEServiceConfig,
|
|
26
25
|
options: PXECreationOptions = { loggers: {} },
|
|
27
26
|
) {
|
|
28
|
-
const logSuffix =
|
|
29
|
-
typeof options.useLogSuffix === 'boolean'
|
|
30
|
-
? options.useLogSuffix
|
|
31
|
-
? randomBytes(3).toString('hex')
|
|
32
|
-
: undefined
|
|
33
|
-
: options.useLogSuffix;
|
|
34
|
-
|
|
35
|
-
const loggers = options.loggers ?? {};
|
|
36
|
-
|
|
37
27
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
38
28
|
const configWithContracts = {
|
|
39
29
|
...config,
|
|
@@ -41,19 +31,21 @@ export async function createPXEService(
|
|
|
41
31
|
l2BlockBatchSize: 200,
|
|
42
32
|
} as PXEServiceConfig;
|
|
43
33
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
const store = await createStore(
|
|
35
|
+
'pxe_data',
|
|
36
|
+
configWithContracts,
|
|
37
|
+
options.loggers.store ?? createLogger('pxe:data:indexeddb'),
|
|
38
|
+
);
|
|
47
39
|
|
|
48
40
|
const simulationProvider = new WASMSimulator();
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
const prover =
|
|
42
|
+
options.prover ??
|
|
43
|
+
new BBWASMBundlePrivateKernelProver(
|
|
44
|
+
simulationProvider,
|
|
45
|
+
16,
|
|
46
|
+
options.loggers.prover ?? createLogger('bb:wasm:bundle'),
|
|
47
|
+
);
|
|
54
48
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
55
|
-
|
|
56
|
-
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
57
49
|
const pxe = await PXEService.create(
|
|
58
50
|
aztecNode,
|
|
59
51
|
store,
|
|
@@ -61,7 +53,7 @@ export async function createPXEService(
|
|
|
61
53
|
simulationProvider,
|
|
62
54
|
protocolContractsProvider,
|
|
63
55
|
config,
|
|
64
|
-
|
|
56
|
+
options.loggers.pxe ?? createLogger('pxe:service'),
|
|
65
57
|
);
|
|
66
58
|
return pxe;
|
|
67
59
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/client/wasm/lazy';
|
|
2
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
5
4
|
import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/providers/lazy';
|
|
@@ -8,7 +7,7 @@ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
|
8
7
|
|
|
9
8
|
import type { PXEServiceConfig } from '../../../config/index.js';
|
|
10
9
|
import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
11
|
-
import type { PXECreationOptions } from '
|
|
10
|
+
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Create and start an PXEService instance with the given AztecNode.
|
|
@@ -24,13 +23,6 @@ export async function createPXEService(
|
|
|
24
23
|
config: PXEServiceConfig,
|
|
25
24
|
options: PXECreationOptions = { loggers: {} },
|
|
26
25
|
) {
|
|
27
|
-
const logSuffix =
|
|
28
|
-
typeof options.useLogSuffix === 'boolean'
|
|
29
|
-
? options.useLogSuffix
|
|
30
|
-
? randomBytes(3).toString('hex')
|
|
31
|
-
: undefined
|
|
32
|
-
: options.useLogSuffix;
|
|
33
|
-
|
|
34
26
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
35
27
|
const configWithContracts = {
|
|
36
28
|
...config,
|
|
@@ -38,22 +30,17 @@ export async function createPXEService(
|
|
|
38
30
|
l1Contracts,
|
|
39
31
|
} as PXEServiceConfig;
|
|
40
32
|
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
const store = await createStore(
|
|
34
|
+
'pxe_data',
|
|
35
|
+
configWithContracts,
|
|
36
|
+
options.loggers.store ?? createLogger('pxe:data:indexeddb'),
|
|
37
|
+
);
|
|
46
38
|
|
|
47
39
|
const simulationProvider = new WASMSimulator();
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const prover = options.prover ?? new BBWASMLazyPrivateKernelProver(simulationProvider, 16, proverLogger);
|
|
53
|
-
|
|
40
|
+
const prover =
|
|
41
|
+
options.prover ??
|
|
42
|
+
new BBWASMLazyPrivateKernelProver(simulationProvider, 16, options.loggers.prover ?? createLogger('bb:wasm:lazy'));
|
|
54
43
|
const protocolContractsProvider = new LazyProtocolContractsProvider();
|
|
55
|
-
|
|
56
|
-
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
57
44
|
const pxe = await PXEService.create(
|
|
58
45
|
aztecNode,
|
|
59
46
|
store,
|
|
@@ -61,7 +48,7 @@ export async function createPXEService(
|
|
|
61
48
|
simulationProvider,
|
|
62
49
|
protocolContractsProvider,
|
|
63
50
|
config,
|
|
64
|
-
|
|
51
|
+
options.loggers.pxe ?? createLogger('pxe:service'),
|
|
65
52
|
);
|
|
66
53
|
return pxe;
|
|
67
54
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
3
2
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
4
3
|
|
|
5
4
|
export type PXECreationOptions = {
|
|
6
|
-
loggers
|
|
7
|
-
useLogSuffix?: boolean | string;
|
|
5
|
+
loggers: { store?: Logger; pxe?: Logger; prover?: Logger };
|
|
8
6
|
prover?: PrivateKernelProver;
|
|
9
|
-
store?: AztecAsyncKVStore;
|
|
10
7
|
};
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
2
2
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
|
-
import {
|
|
4
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
5
6
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
type SimulationProvider,
|
|
9
|
-
SimulationProviderRecorderWrapper,
|
|
10
|
-
WASMSimulator,
|
|
11
|
-
} from '@aztec/simulator/client';
|
|
12
|
-
import { FileCircuitRecorder } from '@aztec/simulator/testing';
|
|
7
|
+
import { type SimulationProvider, WASMSimulator } from '@aztec/simulator/client';
|
|
8
|
+
import { SimulationProviderRecorderWrapper } from '@aztec/simulator/testing';
|
|
13
9
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
14
10
|
|
|
15
11
|
import type { PXEServiceConfig } from '../../config/index.js';
|
|
16
12
|
import { PXEService } from '../../pxe_service/pxe_service.js';
|
|
17
13
|
import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
18
|
-
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
19
14
|
|
|
20
15
|
/**
|
|
21
16
|
* Create and start an PXEService instance with the given AztecNode and config.
|
|
@@ -28,14 +23,12 @@ import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
|
28
23
|
export function createPXEService(
|
|
29
24
|
aztecNode: AztecNode,
|
|
30
25
|
config: PXEServiceConfig,
|
|
31
|
-
|
|
26
|
+
useLogSuffix: string | boolean | undefined = undefined,
|
|
27
|
+
store?: AztecAsyncKVStore,
|
|
32
28
|
) {
|
|
33
29
|
const simulationProvider = new WASMSimulator();
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
: new MemoryCircuitRecorder();
|
|
37
|
-
const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider, recorder);
|
|
38
|
-
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, options);
|
|
30
|
+
const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider);
|
|
31
|
+
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, useLogSuffix, store);
|
|
39
32
|
}
|
|
40
33
|
|
|
41
34
|
/**
|
|
@@ -51,15 +44,11 @@ export async function createPXEServiceWithSimulationProvider(
|
|
|
51
44
|
aztecNode: AztecNode,
|
|
52
45
|
simulationProvider: SimulationProvider,
|
|
53
46
|
config: PXEServiceConfig,
|
|
54
|
-
|
|
47
|
+
useLogSuffix: string | boolean | undefined = undefined,
|
|
48
|
+
store?: AztecAsyncKVStore,
|
|
55
49
|
) {
|
|
56
50
|
const logSuffix =
|
|
57
|
-
typeof
|
|
58
|
-
? options.useLogSuffix
|
|
59
|
-
? randomBytes(3).toString('hex')
|
|
60
|
-
: undefined
|
|
61
|
-
: options.useLogSuffix;
|
|
62
|
-
const loggers = options.loggers ?? {};
|
|
51
|
+
typeof useLogSuffix === 'boolean' ? (useLogSuffix ? randomBytes(3).toString('hex') : undefined) : useLogSuffix;
|
|
63
52
|
|
|
64
53
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
65
54
|
const configWithContracts = {
|
|
@@ -68,41 +57,34 @@ export async function createPXEServiceWithSimulationProvider(
|
|
|
68
57
|
l2BlockBatchSize: 200,
|
|
69
58
|
} as PXEServiceConfig;
|
|
70
59
|
|
|
71
|
-
if (!
|
|
60
|
+
if (!store) {
|
|
72
61
|
// TODO once https://github.com/AztecProtocol/aztec-packages/issues/13656 is fixed, we can remove this and always
|
|
73
62
|
// import the lmdb-v2 version
|
|
74
63
|
const { createStore } = await import('@aztec/kv-store/lmdb-v2');
|
|
75
|
-
|
|
76
|
-
? loggers.store
|
|
77
|
-
: createLogger('pxe:data:lmdb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
78
|
-
options.store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, storeLogger);
|
|
64
|
+
store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, createLogger('pxe:data:lmdb'));
|
|
79
65
|
}
|
|
80
|
-
const proverLogger = loggers.prover
|
|
81
|
-
? loggers.prover
|
|
82
|
-
: createLogger('pxe:bb:native' + (logSuffix ? `:${logSuffix}` : ''));
|
|
83
66
|
|
|
84
|
-
const prover = await createProver(config, simulationProvider,
|
|
67
|
+
const prover = await createProver(config, simulationProvider, logSuffix);
|
|
85
68
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
86
|
-
|
|
87
|
-
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
88
69
|
const pxe = await PXEService.create(
|
|
89
70
|
aztecNode,
|
|
90
|
-
|
|
71
|
+
store,
|
|
91
72
|
prover,
|
|
92
73
|
simulationProvider,
|
|
93
74
|
protocolContractsProvider,
|
|
94
75
|
config,
|
|
95
|
-
|
|
76
|
+
logSuffix,
|
|
96
77
|
);
|
|
97
78
|
return pxe;
|
|
98
79
|
}
|
|
99
80
|
|
|
100
|
-
function createProver(config: PXEServiceConfig, simulationProvider: SimulationProvider,
|
|
81
|
+
function createProver(config: PXEServiceConfig, simulationProvider: SimulationProvider, logSuffix?: string) {
|
|
101
82
|
if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
|
|
102
|
-
return new BBWASMBundlePrivateKernelProver(simulationProvider, 16
|
|
83
|
+
return new BBWASMBundlePrivateKernelProver(simulationProvider, 16);
|
|
103
84
|
} else {
|
|
104
85
|
const bbConfig = config as Required<Pick<PXEServiceConfig, 'bbBinaryPath' | 'bbWorkingDirectory'>> &
|
|
105
86
|
PXEServiceConfig;
|
|
106
|
-
|
|
87
|
+
const log = createLogger('pxe:bb-native-prover' + (logSuffix ? `:${logSuffix}` : ''));
|
|
88
|
+
return BBNativePrivateKernelProver.new({ bbSkipCleanup: false, ...bbConfig }, simulationProvider, log);
|
|
107
89
|
}
|
|
108
90
|
}
|
|
@@ -679,10 +679,9 @@ export class PXEService implements PXE {
|
|
|
679
679
|
|
|
680
680
|
const totalTime = totalTimer.ms();
|
|
681
681
|
|
|
682
|
-
const perFunction = executionSteps.map(({ functionName, timings: { witgen
|
|
682
|
+
const perFunction = executionSteps.map(({ functionName, timings: { witgen } }) => ({
|
|
683
683
|
functionName,
|
|
684
684
|
time: witgen,
|
|
685
|
-
oracles,
|
|
686
685
|
}));
|
|
687
686
|
|
|
688
687
|
const timings: ProvingTimings = {
|
|
@@ -747,13 +746,10 @@ export class PXEService implements PXE {
|
|
|
747
746
|
|
|
748
747
|
const totalTime = totalTimer.ms();
|
|
749
748
|
|
|
750
|
-
const perFunction = executionSteps.map(({ functionName, timings: { witgen
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
oracles,
|
|
755
|
-
};
|
|
756
|
-
});
|
|
749
|
+
const perFunction = executionSteps.map(({ functionName, timings: { witgen } }) => ({
|
|
750
|
+
functionName,
|
|
751
|
+
time: witgen,
|
|
752
|
+
}));
|
|
757
753
|
|
|
758
754
|
// Gate computation is time is not relevant for profiling, so we subtract it from the total time.
|
|
759
755
|
const gateCountComputationTime =
|
|
@@ -853,10 +849,9 @@ export class PXEService implements PXE {
|
|
|
853
849
|
|
|
854
850
|
const totalTime = totalTimer.ms();
|
|
855
851
|
|
|
856
|
-
const perFunction = executionSteps.map(({ functionName, timings: { witgen
|
|
852
|
+
const perFunction = executionSteps.map(({ functionName, timings: { witgen } }) => ({
|
|
857
853
|
functionName,
|
|
858
854
|
time: witgen,
|
|
859
|
-
oracles,
|
|
860
855
|
}));
|
|
861
856
|
|
|
862
857
|
const timings: SimulationTimings = {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
|
|
File without changes
|