@aztec/pxe 3.0.0-nightly.20251115 → 3.0.0-nightly.20251119
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/index.d.ts +1 -9
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +7 -13
- package/dest/contract_function_simulator/execution_data_provider.d.ts +1 -10
- package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -9
- package/dest/entrypoints/client/bundle/utils.js +2 -2
- package/dest/entrypoints/client/lazy/utils.js +2 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +4 -15
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts +1 -11
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.js +0 -12
- package/package.json +16 -16
- package/src/config/index.ts +8 -23
- package/src/contract_function_simulator/execution_data_provider.ts +1 -11
- package/src/contract_function_simulator/pxe_oracle_interface.ts +1 -18
- package/src/entrypoints/client/bundle/utils.ts +2 -2
- package/src/entrypoints/client/lazy/utils.ts +2 -2
- package/src/entrypoints/server/utils.ts +4 -18
- package/src/storage/contract_data_provider/contract_data_provider.ts +0 -17
package/dest/config/index.d.ts
CHANGED
|
@@ -2,14 +2,6 @@ import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
|
2
2
|
import { type DataStoreConfig } from '@aztec/kv-store/config';
|
|
3
3
|
import { type ChainConfig } from '@aztec/stdlib/config';
|
|
4
4
|
export { getPackageInfo } from './package_info.js';
|
|
5
|
-
/**
|
|
6
|
-
* Temporary configuration until WASM can be used instead of native
|
|
7
|
-
*/
|
|
8
|
-
export interface BBProverConfig {
|
|
9
|
-
bbWorkingDirectory?: string;
|
|
10
|
-
bbBinaryPath?: string;
|
|
11
|
-
bbSkipCleanup?: boolean;
|
|
12
|
-
}
|
|
13
5
|
/**
|
|
14
6
|
* Configuration settings for the prover factory
|
|
15
7
|
*/
|
|
@@ -24,7 +16,7 @@ export interface SynchronizerConfig {
|
|
|
24
16
|
/** Maximum amount of blocks to pull from the stream in one request when synchronizing */
|
|
25
17
|
l2BlockBatchSize: number;
|
|
26
18
|
}
|
|
27
|
-
export type PXEConfig = KernelProverConfig &
|
|
19
|
+
export type PXEConfig = KernelProverConfig & DataStoreConfig & ChainConfig & SynchronizerConfig;
|
|
28
20
|
export type CliPXEOptions = {
|
|
29
21
|
/** Custom Aztec Node URL to connect to */
|
|
30
22
|
nodeUrl?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yFAAyF;IACzF,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,SAAS,GAAG,kBAAkB,GAAG,eAAe,GAAG,WAAW,GAAG,kBAAkB,CAAC;AAEhG,MAAM,MAAM,aAAa,GAAG;IAC1B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,kBAAkB,CAAC,SAAS,CAoB3D,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAExC;AAED,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,CAAC,aAAa,CAKlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,CAAC,aAAa,GAAG,SAAS,CAW9E,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,SAAS,CAQ5D"}
|
package/dest/config/index.js
CHANGED
|
@@ -10,19 +10,13 @@ export const pxeConfigMappings = {
|
|
|
10
10
|
...numberConfigHelper(50),
|
|
11
11
|
description: 'Maximum amount of blocks to pull from the stream in one request when synchronizing'
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
bbSkipCleanup: {
|
|
22
|
-
env: 'BB_SKIP_CLEANUP',
|
|
23
|
-
description: 'True to skip cleanup of temporary files for debugging purposes',
|
|
24
|
-
...booleanConfigHelper()
|
|
25
|
-
},
|
|
13
|
+
// TODO: We're losing this feature in moving to bb.js api.
|
|
14
|
+
// Reimplement it as a setting that dumps the msgpack data on the bb.js backend if needed.
|
|
15
|
+
// bbSkipCleanup: {
|
|
16
|
+
// env: 'BB_SKIP_CLEANUP',
|
|
17
|
+
// description: 'True to skip cleanup of temporary files for debugging purposes',
|
|
18
|
+
// ...booleanConfigHelper(),
|
|
19
|
+
// },
|
|
26
20
|
proverEnabled: {
|
|
27
21
|
env: 'PXE_PROVER_ENABLED',
|
|
28
22
|
description: 'Enable real proofs',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
2
|
import type { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
-
import type {
|
|
3
|
+
import type { FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
import type { L2Block } from '@aztec/stdlib/block';
|
|
6
6
|
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
@@ -80,15 +80,6 @@ export interface ExecutionDataProvider {
|
|
|
80
80
|
* @param selector - The corresponding function selector.
|
|
81
81
|
*/
|
|
82
82
|
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
83
|
-
/**
|
|
84
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
85
|
-
* The function is identified by its name, which is unique within a contract.
|
|
86
|
-
*
|
|
87
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
88
|
-
* @param functionName - The name of the function.
|
|
89
|
-
* @returns The corresponding function's artifact as an object.
|
|
90
|
-
*/
|
|
91
|
-
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
|
|
92
83
|
/**
|
|
93
84
|
* Gets the index of a nullifier in the nullifier tree.
|
|
94
85
|
* @param nullifier - The nullifier.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution_data_provider.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"execution_data_provider.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,eAAe,EAAE,MAAM;CAGpC;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,eAAe,EAAE,MAAM;CAGpC;AAKD,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,YAAY,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,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implements ExecutionDataProvider {
|
|
|
52
52
|
index: bigint;
|
|
53
53
|
}[]>;
|
|
54
54
|
getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName>;
|
|
55
|
-
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifactWithContractName | undefined>;
|
|
56
55
|
/**
|
|
57
56
|
* Fetches a message from the db, given its key.
|
|
58
57
|
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/pxe_oracle_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/pxe_oracle_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAW,OAAO,EAAiB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,iCAAiC,C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eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjG,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IA2B1E,QAAQ,IAAI,cAAc;CAM3B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { timesParallel } from '@aztec/foundation/collection';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { getFunctionArtifact } from '@aztec/stdlib/abi';
|
|
4
3
|
import { computeUniqueNoteHash, siloNoteHash, siloNullifier, siloPrivateLog } from '@aztec/stdlib/hash';
|
|
5
4
|
import { MAX_RPC_LEN } from '@aztec/stdlib/interfaces/client';
|
|
6
5
|
import { computeAddressSecret } from '@aztec/stdlib/keys';
|
|
@@ -88,14 +87,6 @@ import { NoteValidationRequest } from './noir-structs/note_validation_request.js
|
|
|
88
87
|
debug
|
|
89
88
|
};
|
|
90
89
|
}
|
|
91
|
-
async getFunctionArtifactByName(contractAddress, functionName) {
|
|
92
|
-
const instance = await this.contractDataProvider.getContractInstance(contractAddress);
|
|
93
|
-
if (!instance) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const artifact = await this.contractDataProvider.getContractArtifact(instance.currentContractClassId);
|
|
97
|
-
return artifact && getFunctionArtifact(artifact, functionName);
|
|
98
|
-
}
|
|
99
90
|
/**
|
|
100
91
|
* Fetches a message from the db, given its key.
|
|
101
92
|
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
2
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
@@ -28,7 +28,7 @@ import { PXE } from '../../../pxe.js';
|
|
|
28
28
|
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
29
29
|
const simulator = new WASMSimulator();
|
|
30
30
|
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
31
|
-
const prover = options.prover ?? new
|
|
31
|
+
const prover = options.prover ?? new BBBundlePrivateKernelProver(simulator, proverLogger);
|
|
32
32
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
33
33
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
34
34
|
const pxe = await PXE.create(aztecNode, store, prover, simulator, protocolContractsProvider, config, pxeLogger);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BBLazyPrivateKernelProver } from '@aztec/bb-prover/client/lazy';
|
|
2
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
@@ -27,7 +27,7 @@ import { PXE } from '../../../pxe.js';
|
|
|
27
27
|
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
28
28
|
const simulator = new WASMSimulator();
|
|
29
29
|
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
30
|
-
const prover = options.prover ?? new
|
|
30
|
+
const prover = options.prover ?? new BBLazyPrivateKernelProver(simulator, proverLogger);
|
|
31
31
|
const protocolContractsProvider = new LazyProtocolContractsProvider();
|
|
32
32
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
33
33
|
const pxe = await PXE.create(aztecNode, store, prover, simulator, protocolContractsProvider, config, pxeLogger);
|
|
@@ -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":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,KAAK,wBAAwB,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,WAAW,GAAG,kBAAkB,GAAG,eAAe,CAAC,CAAC;AAEpH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,kBAAoC,gBAmD9C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
3
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -30,22 +29,12 @@ export async function createPXE(aztecNode, config, options = {
|
|
|
30
29
|
options.store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, storeLogger);
|
|
31
30
|
}
|
|
32
31
|
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:native' + (logSuffix ? `:${logSuffix}` : ''));
|
|
33
|
-
const prover = options.prover ??
|
|
32
|
+
const prover = options.prover ?? createProver(simulator, proverLogger);
|
|
34
33
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
35
34
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
36
35
|
const pxe = await PXE.create(aztecNode, options.store, prover, simulator, protocolContractsProvider, configWithContracts, pxeLogger);
|
|
37
36
|
return pxe;
|
|
38
37
|
}
|
|
39
|
-
function createProver(
|
|
40
|
-
|
|
41
|
-
return new BBWASMBundlePrivateKernelProver(simulator, 16, logger);
|
|
42
|
-
} else {
|
|
43
|
-
const bbConfig = config;
|
|
44
|
-
return BBNativePrivateKernelProver.new({
|
|
45
|
-
bbSkipCleanup: false,
|
|
46
|
-
numConcurrentIVCVerifiers: 1,
|
|
47
|
-
bbIVCConcurrency: 1,
|
|
48
|
-
...bbConfig
|
|
49
|
-
}, simulator, logger);
|
|
50
|
-
}
|
|
38
|
+
function createProver(simulator, logger) {
|
|
39
|
+
return new BBBundlePrivateKernelProver(simulator, logger);
|
|
51
40
|
}
|
|
@@ -2,7 +2,7 @@ import type { FUNCTION_TREE_HEIGHT } from '@aztec/constants';
|
|
|
2
2
|
import type { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import type { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
4
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
5
|
-
import { type ContractArtifact, type FunctionAbi, type
|
|
5
|
+
import { type ContractArtifact, type FunctionAbi, type FunctionArtifactWithContractName, type FunctionDebugMetadata, FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
6
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
7
|
import { type ContractClass, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
8
8
|
/**
|
|
@@ -35,16 +35,6 @@ export declare class ContractDataProvider {
|
|
|
35
35
|
*/
|
|
36
36
|
getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName | undefined>;
|
|
37
37
|
getPublicFunctionArtifact(contractAddress: AztecAddress): Promise<FunctionArtifactWithContractName | undefined>;
|
|
38
|
-
/**
|
|
39
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
40
|
-
* The function is identified by its name, which is unique within a contract.
|
|
41
|
-
* Throws if the contract has not been added to the database.
|
|
42
|
-
*
|
|
43
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
44
|
-
* @param functionName - The name of the function.
|
|
45
|
-
* @returns The corresponding function's artifact as an object
|
|
46
|
-
*/
|
|
47
|
-
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
|
|
48
38
|
getFunctionAbi(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionAbi | undefined>;
|
|
49
39
|
/**
|
|
50
40
|
* Retrieves the debug metadata of a specified function within a given contract.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_data_provider/contract_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACxE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"contract_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_data_provider/contract_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,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Ae,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAKnC;;;;;;;;;OASG;IACU,wBAAwB,CACnC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IAMhC,8BAA8B,CACzC,eAAe,EAAE,YAAY,GAC5B,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IAM7C;;;;;;;;OAQG;IACU,4BAA4B,CACvC,eAAe,EAAE,EAAE,EACnB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,OAAO,oBAAoB,CAAC,GAAG,SAAS,CAAC;IAKzD,oBAAoB,CAAC,eAAe,EAAE,YAAY;IAKlD,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB;CAiC5F"}
|
|
@@ -123,18 +123,6 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
|
|
|
123
123
|
contractName: artifact.name
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
128
|
-
* The function is identified by its name, which is unique within a contract.
|
|
129
|
-
* Throws if the contract has not been added to the database.
|
|
130
|
-
*
|
|
131
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
132
|
-
* @param functionName - The name of the function.
|
|
133
|
-
* @returns The corresponding function's artifact as an object
|
|
134
|
-
*/ async getFunctionArtifactByName(contractAddress, functionName) {
|
|
135
|
-
const artifact = await this.#getContractArtifactByAddress(contractAddress);
|
|
136
|
-
return artifact?.functions.find((fn)=>fn.name === functionName);
|
|
137
|
-
}
|
|
138
126
|
async getFunctionAbi(contractAddress, selector) {
|
|
139
127
|
const artifact = await this.#getContractArtifactByAddress(contractAddress);
|
|
140
128
|
return artifact && await this.#findFunctionAbiBySelector(artifact, selector);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251119",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": "./dest/entrypoints/server/index.js",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
65
|
-
"@aztec/bb.js": "3.0.0-nightly.
|
|
66
|
-
"@aztec/builder": "3.0.0-nightly.
|
|
67
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
68
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
69
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
70
|
-
"@aztec/key-store": "3.0.0-nightly.
|
|
71
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
72
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
73
|
-
"@aztec/noir-types": "3.0.0-nightly.
|
|
74
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
75
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
76
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
64
|
+
"@aztec/bb-prover": "3.0.0-nightly.20251119",
|
|
65
|
+
"@aztec/bb.js": "3.0.0-nightly.20251119",
|
|
66
|
+
"@aztec/builder": "3.0.0-nightly.20251119",
|
|
67
|
+
"@aztec/constants": "3.0.0-nightly.20251119",
|
|
68
|
+
"@aztec/ethereum": "3.0.0-nightly.20251119",
|
|
69
|
+
"@aztec/foundation": "3.0.0-nightly.20251119",
|
|
70
|
+
"@aztec/key-store": "3.0.0-nightly.20251119",
|
|
71
|
+
"@aztec/kv-store": "3.0.0-nightly.20251119",
|
|
72
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251119",
|
|
73
|
+
"@aztec/noir-types": "3.0.0-nightly.20251119",
|
|
74
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251119",
|
|
75
|
+
"@aztec/simulator": "3.0.0-nightly.20251119",
|
|
76
|
+
"@aztec/stdlib": "3.0.0-nightly.20251119",
|
|
77
77
|
"koa": "^2.16.1",
|
|
78
78
|
"koa-router": "^13.1.1",
|
|
79
79
|
"lodash.omit": "^4.5.0",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@aztec/merkle-tree": "3.0.0-nightly.
|
|
86
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
85
|
+
"@aztec/merkle-tree": "3.0.0-nightly.20251119",
|
|
86
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20251119",
|
|
87
87
|
"@jest/globals": "^30.0.0",
|
|
88
88
|
"@types/jest": "^30.0.0",
|
|
89
89
|
"@types/lodash.omit": "^4.5.7",
|
package/src/config/index.ts
CHANGED
|
@@ -10,15 +10,6 @@ import { type ChainConfig, chainConfigMappings } from '@aztec/stdlib/config';
|
|
|
10
10
|
|
|
11
11
|
export { getPackageInfo } from './package_info.js';
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Temporary configuration until WASM can be used instead of native
|
|
15
|
-
*/
|
|
16
|
-
export interface BBProverConfig {
|
|
17
|
-
bbWorkingDirectory?: string;
|
|
18
|
-
bbBinaryPath?: string;
|
|
19
|
-
bbSkipCleanup?: boolean;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
13
|
/**
|
|
23
14
|
* Configuration settings for the prover factory
|
|
24
15
|
*/
|
|
@@ -35,7 +26,7 @@ export interface SynchronizerConfig {
|
|
|
35
26
|
l2BlockBatchSize: number;
|
|
36
27
|
}
|
|
37
28
|
|
|
38
|
-
export type PXEConfig = KernelProverConfig &
|
|
29
|
+
export type PXEConfig = KernelProverConfig & DataStoreConfig & ChainConfig & SynchronizerConfig;
|
|
39
30
|
|
|
40
31
|
export type CliPXEOptions = {
|
|
41
32
|
/** Custom Aztec Node URL to connect to */
|
|
@@ -50,19 +41,13 @@ export const pxeConfigMappings: ConfigMappingsType<PXEConfig> = {
|
|
|
50
41
|
...numberConfigHelper(50),
|
|
51
42
|
description: 'Maximum amount of blocks to pull from the stream in one request when synchronizing',
|
|
52
43
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
bbSkipCleanup: {
|
|
62
|
-
env: 'BB_SKIP_CLEANUP',
|
|
63
|
-
description: 'True to skip cleanup of temporary files for debugging purposes',
|
|
64
|
-
...booleanConfigHelper(),
|
|
65
|
-
},
|
|
44
|
+
// TODO: We're losing this feature in moving to bb.js api.
|
|
45
|
+
// Reimplement it as a setting that dumps the msgpack data on the bb.js backend if needed.
|
|
46
|
+
// bbSkipCleanup: {
|
|
47
|
+
// env: 'BB_SKIP_CLEANUP',
|
|
48
|
+
// description: 'True to skip cleanup of temporary files for debugging purposes',
|
|
49
|
+
// ...booleanConfigHelper(),
|
|
50
|
+
// },
|
|
66
51
|
proverEnabled: {
|
|
67
52
|
env: 'PXE_PROVER_ENABLED',
|
|
68
53
|
description: 'Enable real proofs',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
2
|
import type { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
-
import type {
|
|
3
|
+
import type { FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
import type { L2Block } from '@aztec/stdlib/block';
|
|
6
6
|
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
@@ -106,16 +106,6 @@ export interface ExecutionDataProvider {
|
|
|
106
106
|
*/
|
|
107
107
|
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
108
108
|
|
|
109
|
-
/**
|
|
110
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
111
|
-
* The function is identified by its name, which is unique within a contract.
|
|
112
|
-
*
|
|
113
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
114
|
-
* @param functionName - The name of the function.
|
|
115
|
-
* @returns The corresponding function's artifact as an object.
|
|
116
|
-
*/
|
|
117
|
-
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
|
|
118
|
-
|
|
119
109
|
/**
|
|
120
110
|
* Gets the index of a nullifier in the nullifier tree.
|
|
121
111
|
* @param nullifier - The nullifier.
|
|
@@ -3,12 +3,7 @@ import { timesParallel } from '@aztec/foundation/collection';
|
|
|
3
3
|
import { Fr, Point } from '@aztec/foundation/fields';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
5
|
import type { KeyStore } from '@aztec/key-store';
|
|
6
|
-
import {
|
|
7
|
-
EventSelector,
|
|
8
|
-
type FunctionArtifactWithContractName,
|
|
9
|
-
FunctionSelector,
|
|
10
|
-
getFunctionArtifact,
|
|
11
|
-
} from '@aztec/stdlib/abi';
|
|
6
|
+
import { EventSelector, type FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
|
|
12
7
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
13
8
|
import type { InBlock, L2Block, L2BlockNumber } from '@aztec/stdlib/block';
|
|
14
9
|
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
@@ -129,18 +124,6 @@ export class PXEOracleInterface implements ExecutionDataProvider {
|
|
|
129
124
|
};
|
|
130
125
|
}
|
|
131
126
|
|
|
132
|
-
async getFunctionArtifactByName(
|
|
133
|
-
contractAddress: AztecAddress,
|
|
134
|
-
functionName: string,
|
|
135
|
-
): Promise<FunctionArtifactWithContractName | undefined> {
|
|
136
|
-
const instance = await this.contractDataProvider.getContractInstance(contractAddress);
|
|
137
|
-
if (!instance) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
const artifact = await this.contractDataProvider.getContractArtifact(instance.currentContractClassId);
|
|
141
|
-
return artifact && getFunctionArtifact(artifact, functionName);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
127
|
/**
|
|
145
128
|
* Fetches a message from the db, given its key.
|
|
146
129
|
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
2
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
@@ -49,7 +49,7 @@ export async function createPXE(
|
|
|
49
49
|
? loggers.prover
|
|
50
50
|
: createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
51
51
|
|
|
52
|
-
const prover = options.prover ?? new
|
|
52
|
+
const prover = options.prover ?? new BBBundlePrivateKernelProver(simulator, proverLogger);
|
|
53
53
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
54
54
|
|
|
55
55
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BBLazyPrivateKernelProver } from '@aztec/bb-prover/client/lazy';
|
|
2
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
@@ -48,7 +48,7 @@ export async function createPXE(
|
|
|
48
48
|
? loggers.prover
|
|
49
49
|
: createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
50
50
|
|
|
51
|
-
const prover = options.prover ?? new
|
|
51
|
+
const prover = options.prover ?? new BBLazyPrivateKernelProver(simulator, proverLogger);
|
|
52
52
|
|
|
53
53
|
const protocolContractsProvider = new LazyProtocolContractsProvider();
|
|
54
54
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
3
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
3
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
5
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -59,7 +58,7 @@ export async function createPXE(
|
|
|
59
58
|
? loggers.prover
|
|
60
59
|
: createLogger('pxe:bb:native' + (logSuffix ? `:${logSuffix}` : ''));
|
|
61
60
|
|
|
62
|
-
const prover = options.prover ??
|
|
61
|
+
const prover = options.prover ?? createProver(simulator, proverLogger);
|
|
63
62
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
64
63
|
|
|
65
64
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
@@ -75,19 +74,6 @@ export async function createPXE(
|
|
|
75
74
|
return pxe;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
function createProver(
|
|
79
|
-
|
|
80
|
-
simulator: CircuitSimulator,
|
|
81
|
-
logger?: Logger,
|
|
82
|
-
) {
|
|
83
|
-
if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
|
|
84
|
-
return new BBWASMBundlePrivateKernelProver(simulator, 16, logger);
|
|
85
|
-
} else {
|
|
86
|
-
const bbConfig = config as Required<Pick<PXEConfig, 'bbBinaryPath' | 'bbWorkingDirectory'>> & PXEConfig;
|
|
87
|
-
return BBNativePrivateKernelProver.new(
|
|
88
|
-
{ bbSkipCleanup: false, numConcurrentIVCVerifiers: 1, bbIVCConcurrency: 1, ...bbConfig },
|
|
89
|
-
simulator,
|
|
90
|
-
logger,
|
|
91
|
-
);
|
|
92
|
-
}
|
|
77
|
+
function createProver(simulator: CircuitSimulator, logger?: Logger) {
|
|
78
|
+
return new BBBundlePrivateKernelProver(simulator, logger);
|
|
93
79
|
}
|
|
@@ -184,23 +184,6 @@ export class ContractDataProvider {
|
|
|
184
184
|
return fnArtifact && { ...fnArtifact, contractName: artifact.name };
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
/**
|
|
188
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
189
|
-
* The function is identified by its name, which is unique within a contract.
|
|
190
|
-
* Throws if the contract has not been added to the database.
|
|
191
|
-
*
|
|
192
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
193
|
-
* @param functionName - The name of the function.
|
|
194
|
-
* @returns The corresponding function's artifact as an object
|
|
195
|
-
*/
|
|
196
|
-
public async getFunctionArtifactByName(
|
|
197
|
-
contractAddress: AztecAddress,
|
|
198
|
-
functionName: string,
|
|
199
|
-
): Promise<FunctionArtifact | undefined> {
|
|
200
|
-
const artifact = await this.#getContractArtifactByAddress(contractAddress);
|
|
201
|
-
return artifact?.functions.find(fn => fn.name === functionName);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
187
|
public async getFunctionAbi(
|
|
205
188
|
contractAddress: AztecAddress,
|
|
206
189
|
selector: FunctionSelector,
|