@aztec/pxe 0.85.0-nightly.20250424 → 0.86.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/entrypoints/client/bundle/utils.js +1 -1
- package/dest/entrypoints/client/lazy/utils.js +1 -1
- package/dest/entrypoints/server/utils.d.ts +3 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +11 -7
- package/package.json +15 -15
- package/src/entrypoints/client/bundle/utils.ts +1 -1
- package/src/entrypoints/client/lazy/utils.ts +1 -1
- package/src/entrypoints/server/utils.ts +12 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/wasm/bundle';
|
|
1
|
+
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
4
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/wasm/lazy';
|
|
1
|
+
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/client/wasm/lazy';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
4
4
|
import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/providers/lazy';
|
|
@@ -1,3 +1,4 @@
|
|
|
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';
|
|
@@ -10,7 +11,7 @@ import { PXEService } from '../../pxe_service/pxe_service.js';
|
|
|
10
11
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
11
12
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
12
13
|
*/
|
|
13
|
-
export declare function createPXEService(aztecNode: AztecNode, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined): Promise<PXEService>;
|
|
14
|
+
export declare function createPXEService(aztecNode: AztecNode, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined, store?: AztecAsyncKVStore): Promise<PXEService>;
|
|
14
15
|
/**
|
|
15
16
|
* Create and start an PXEService instance with the given AztecNode, SimulationProvider and config.
|
|
16
17
|
*
|
|
@@ -20,5 +21,5 @@ export declare function createPXEService(aztecNode: AztecNode, config: PXEServic
|
|
|
20
21
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
21
22
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
22
23
|
*/
|
|
23
|
-
export declare function createPXEServiceWithSimulationProvider(aztecNode: AztecNode, simulationProvider: SimulationProvider, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined): Promise<PXEService>;
|
|
24
|
+
export declare function createPXEServiceWithSimulationProvider(aztecNode: AztecNode, simulationProvider: SimulationProvider, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined, store?: AztecAsyncKVStore): Promise<PXEService>;
|
|
24
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"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { BBNativePrivateKernelProver } from '@aztec/bb-prover';
|
|
2
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/wasm/bundle';
|
|
1
|
+
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
2
|
+
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
6
5
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
7
6
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
8
7
|
import { SimulationProviderRecorderWrapper } from '@aztec/simulator/testing';
|
|
@@ -15,10 +14,10 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
15
14
|
* @param config - The PXE Service Config to use
|
|
16
15
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
17
16
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
18
|
-
*/ export function createPXEService(aztecNode, config, useLogSuffix = undefined) {
|
|
17
|
+
*/ export function createPXEService(aztecNode, config, useLogSuffix = undefined, store) {
|
|
19
18
|
const simulationProvider = new WASMSimulator();
|
|
20
19
|
const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider);
|
|
21
|
-
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, useLogSuffix);
|
|
20
|
+
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, useLogSuffix, store);
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Create and start an PXEService instance with the given AztecNode, SimulationProvider and config.
|
|
@@ -28,7 +27,7 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
28
27
|
* @param config - The PXE Service Config to use
|
|
29
28
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
30
29
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
31
|
-
*/ export async function createPXEServiceWithSimulationProvider(aztecNode, simulationProvider, config, useLogSuffix = undefined) {
|
|
30
|
+
*/ export async function createPXEServiceWithSimulationProvider(aztecNode, simulationProvider, config, useLogSuffix = undefined, store) {
|
|
32
31
|
const logSuffix = typeof useLogSuffix === 'boolean' ? useLogSuffix ? randomBytes(3).toString('hex') : undefined : useLogSuffix;
|
|
33
32
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
34
33
|
const configWithContracts = {
|
|
@@ -36,7 +35,12 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
36
35
|
l1Contracts,
|
|
37
36
|
l2BlockBatchSize: 200
|
|
38
37
|
};
|
|
39
|
-
|
|
38
|
+
if (!store) {
|
|
39
|
+
// TODO once https://github.com/AztecProtocol/aztec-packages/issues/13656 is fixed, we can remove this and always
|
|
40
|
+
// import the lmdb-v2 version
|
|
41
|
+
const { createStore } = await import('@aztec/kv-store/lmdb-v2');
|
|
42
|
+
store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, createLogger('pxe:data:lmdb'));
|
|
43
|
+
}
|
|
40
44
|
const prover = await createProver(config, simulationProvider, logSuffix);
|
|
41
45
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
42
46
|
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, logSuffix);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0",
|
|
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.
|
|
61
|
-
"@aztec/bb.js": "0.
|
|
62
|
-
"@aztec/builder": "0.
|
|
63
|
-
"@aztec/constants": "0.
|
|
64
|
-
"@aztec/ethereum": "0.
|
|
65
|
-
"@aztec/foundation": "0.
|
|
66
|
-
"@aztec/key-store": "0.
|
|
67
|
-
"@aztec/kv-store": "0.
|
|
68
|
-
"@aztec/noir-protocol-circuits-types": "0.
|
|
69
|
-
"@aztec/noir-types": "0.
|
|
70
|
-
"@aztec/protocol-contracts": "0.
|
|
71
|
-
"@aztec/simulator": "0.
|
|
72
|
-
"@aztec/stdlib": "0.
|
|
60
|
+
"@aztec/bb-prover": "0.86.0",
|
|
61
|
+
"@aztec/bb.js": "0.86.0",
|
|
62
|
+
"@aztec/builder": "0.86.0",
|
|
63
|
+
"@aztec/constants": "0.86.0",
|
|
64
|
+
"@aztec/ethereum": "0.86.0",
|
|
65
|
+
"@aztec/foundation": "0.86.0",
|
|
66
|
+
"@aztec/key-store": "0.86.0",
|
|
67
|
+
"@aztec/kv-store": "0.86.0",
|
|
68
|
+
"@aztec/noir-protocol-circuits-types": "0.86.0",
|
|
69
|
+
"@aztec/noir-types": "0.86.0",
|
|
70
|
+
"@aztec/protocol-contracts": "0.86.0",
|
|
71
|
+
"@aztec/simulator": "0.86.0",
|
|
72
|
+
"@aztec/stdlib": "0.86.0",
|
|
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-contracts.js": "0.
|
|
81
|
+
"@aztec/noir-contracts.js": "0.86.0",
|
|
82
82
|
"@jest/globals": "^29.5.0",
|
|
83
83
|
"@types/jest": "^29.5.0",
|
|
84
84
|
"@types/lodash.omit": "^4.5.7",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/wasm/bundle';
|
|
1
|
+
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
4
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/wasm/lazy';
|
|
1
|
+
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/client/wasm/lazy';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
4
4
|
import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/providers/lazy';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BBNativePrivateKernelProver } from '@aztec/bb-prover';
|
|
2
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/wasm/bundle';
|
|
1
|
+
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
2
|
+
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import {
|
|
5
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
6
6
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
7
7
|
import { type SimulationProvider, WASMSimulator } from '@aztec/simulator/client';
|
|
8
8
|
import { SimulationProviderRecorderWrapper } from '@aztec/simulator/testing';
|
|
@@ -24,10 +24,11 @@ export function createPXEService(
|
|
|
24
24
|
aztecNode: AztecNode,
|
|
25
25
|
config: PXEServiceConfig,
|
|
26
26
|
useLogSuffix: string | boolean | undefined = undefined,
|
|
27
|
+
store?: AztecAsyncKVStore,
|
|
27
28
|
) {
|
|
28
29
|
const simulationProvider = new WASMSimulator();
|
|
29
30
|
const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider);
|
|
30
|
-
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, useLogSuffix);
|
|
31
|
+
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, useLogSuffix, store);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -44,6 +45,7 @@ export async function createPXEServiceWithSimulationProvider(
|
|
|
44
45
|
simulationProvider: SimulationProvider,
|
|
45
46
|
config: PXEServiceConfig,
|
|
46
47
|
useLogSuffix: string | boolean | undefined = undefined,
|
|
48
|
+
store?: AztecAsyncKVStore,
|
|
47
49
|
) {
|
|
48
50
|
const logSuffix =
|
|
49
51
|
typeof useLogSuffix === 'boolean' ? (useLogSuffix ? randomBytes(3).toString('hex') : undefined) : useLogSuffix;
|
|
@@ -55,12 +57,12 @@ export async function createPXEServiceWithSimulationProvider(
|
|
|
55
57
|
l2BlockBatchSize: 200,
|
|
56
58
|
} as PXEServiceConfig;
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
createLogger('pxe:data:lmdb')
|
|
63
|
-
|
|
60
|
+
if (!store) {
|
|
61
|
+
// TODO once https://github.com/AztecProtocol/aztec-packages/issues/13656 is fixed, we can remove this and always
|
|
62
|
+
// import the lmdb-v2 version
|
|
63
|
+
const { createStore } = await import('@aztec/kv-store/lmdb-v2');
|
|
64
|
+
store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, createLogger('pxe:data:lmdb'));
|
|
65
|
+
}
|
|
64
66
|
|
|
65
67
|
const prover = await createProver(config, simulationProvider, logSuffix);
|
|
66
68
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|