@aztec/pxe 0.87.2 → 0.87.3-nightly.20250529
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 +9 -3
- 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 +9 -3
- package/dest/entrypoints/{client/pxe_creation_options.d.ts → pxe_creation_options.d.ts} +4 -1
- package/dest/entrypoints/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 +23 -15
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +30 -30
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +11 -8
- package/dest/pxe_oracle_interface/pxe_oracle_interface.d.ts +4 -4
- package/dest/pxe_oracle_interface/pxe_oracle_interface.d.ts.map +1 -1
- package/dest/pxe_oracle_interface/pxe_oracle_interface.js +26 -21
- package/dest/pxe_service/pxe_service.d.ts.map +1 -1
- package/dest/pxe_service/pxe_service.js +12 -7
- package/package.json +15 -15
- package/src/config/package_info.ts +1 -1
- package/src/entrypoints/client/bundle/utils.ts +22 -14
- package/src/entrypoints/client/lazy/utils.ts +23 -10
- package/src/entrypoints/{client/pxe_creation_options.ts → pxe_creation_options.ts} +4 -1
- package/src/entrypoints/server/utils.ts +38 -20
- package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +35 -34
- package/src/private_kernel/private_kernel_execution_prover.ts +12 -10
- package/src/pxe_oracle_interface/pxe_oracle_interface.ts +33 -21
- package/src/pxe_service/pxe_service.ts +11 -6
- package/dest/entrypoints/client/pxe_creation_options.d.ts.map +0 -1
- /package/dest/entrypoints/{client/pxe_creation_options.js → 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":"AAMA,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,+BAA+B,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,kBAAoC,uBAyC9C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
2
|
+
import { randomBytes } from '@aztec/foundation/crypto';
|
|
2
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
4
5
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
@@ -16,16 +17,21 @@ import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
|
16
17
|
*/ export async function createPXEService(aztecNode, config, options = {
|
|
17
18
|
loggers: {}
|
|
18
19
|
}) {
|
|
20
|
+
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
21
|
+
const loggers = options.loggers ?? {};
|
|
19
22
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
20
23
|
const configWithContracts = {
|
|
21
24
|
...config,
|
|
22
25
|
l1Contracts,
|
|
23
26
|
l2BlockBatchSize: 200
|
|
24
27
|
};
|
|
25
|
-
const
|
|
28
|
+
const storeLogger = loggers.store ? loggers.store : createLogger('pxe:data:idb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
29
|
+
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
26
30
|
const simulationProvider = new WASMSimulator();
|
|
27
|
-
const
|
|
31
|
+
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
32
|
+
const prover = options.prover ?? new BBWASMBundlePrivateKernelProver(simulationProvider, 16, proverLogger);
|
|
28
33
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
29
|
-
const
|
|
34
|
+
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
35
|
+
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, pxeLogger);
|
|
30
36
|
return pxe;
|
|
31
37
|
}
|
|
@@ -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":"AAMA,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,+BAA+B,CAAC;AAExE;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,kBAAoC,uBA0C9C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BBWASMLazyPrivateKernelProver } from '@aztec/bb-prover/client/wasm/lazy';
|
|
2
|
+
import { randomBytes } from '@aztec/foundation/crypto';
|
|
2
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
4
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
4
5
|
import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/providers/lazy';
|
|
@@ -15,16 +16,21 @@ import { PXEService } from '../../../pxe_service/pxe_service.js';
|
|
|
15
16
|
*/ export async function createPXEService(aztecNode, config, options = {
|
|
16
17
|
loggers: {}
|
|
17
18
|
}) {
|
|
19
|
+
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
18
20
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
19
21
|
const configWithContracts = {
|
|
20
22
|
...config,
|
|
21
23
|
l2BlockBatchSize: 200,
|
|
22
24
|
l1Contracts
|
|
23
25
|
};
|
|
24
|
-
const
|
|
26
|
+
const loggers = options.loggers ?? {};
|
|
27
|
+
const storeLogger = loggers.store ? loggers.store : createLogger('pxe:data:idb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
28
|
+
const store = options.store ?? await createStore('pxe_data', configWithContracts, storeLogger);
|
|
25
29
|
const simulationProvider = new WASMSimulator();
|
|
26
|
-
const
|
|
30
|
+
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:wasm:bundle' + (logSuffix ? `:${logSuffix}` : ''));
|
|
31
|
+
const prover = options.prover ?? new BBWASMLazyPrivateKernelProver(simulationProvider, 16, proverLogger);
|
|
27
32
|
const protocolContractsProvider = new LazyProtocolContractsProvider();
|
|
28
|
-
const
|
|
33
|
+
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
34
|
+
const pxe = await PXEService.create(aztecNode, store, prover, simulationProvider, protocolContractsProvider, config, pxeLogger);
|
|
29
35
|
return pxe;
|
|
30
36
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
2
3
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
3
4
|
export type PXECreationOptions = {
|
|
4
|
-
loggers
|
|
5
|
+
loggers?: {
|
|
5
6
|
store?: Logger;
|
|
6
7
|
pxe?: Logger;
|
|
7
8
|
prover?: Logger;
|
|
8
9
|
};
|
|
10
|
+
useLogSuffix?: boolean | string;
|
|
9
11
|
prover?: PrivateKernelProver;
|
|
12
|
+
store?: AztecAsyncKVStore;
|
|
10
13
|
};
|
|
11
14
|
//# sourceMappingURL=pxe_creation_options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
2
1
|
import { type SimulationProvider } from '@aztec/simulator/client';
|
|
3
2
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
4
3
|
import type { PXEServiceConfig } from '../../config/index.js';
|
|
5
4
|
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 { PXEService } from '../../pxe_service/pxe_service.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, options?: PXECreationOptions): 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, options?: PXECreationOptions): 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":"AAKA,OAAO,EAEL,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAC;AAEjC,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;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,kBAAoC,uBAQ9C;AAED;;;;;;;;GAQG;AACH,wBAAsB,sCAAsC,CAC1D,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,kBAAoC,uBA4C9C"}
|
|
@@ -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 { WASMSimulator } from '@aztec/simulator/client';
|
|
7
|
-
import {
|
|
6
|
+
import { MemoryCircuitRecorder, SimulationProviderRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
|
|
7
|
+
import { FileCircuitRecorder } 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,10 +14,13 @@ 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,
|
|
17
|
+
*/ export function createPXEService(aztecNode, config, options = {
|
|
18
|
+
loggers: {}
|
|
19
|
+
}) {
|
|
18
20
|
const simulationProvider = new WASMSimulator();
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
+
const recorder = process.env.CIRCUIT_RECORD_DIR ? new FileCircuitRecorder(process.env.CIRCUIT_RECORD_DIR) : new MemoryCircuitRecorder();
|
|
22
|
+
const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider, recorder);
|
|
23
|
+
return createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, config, options);
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Create and start an PXEService instance with the given AztecNode, SimulationProvider and config.
|
|
@@ -27,34 +30,39 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
27
30
|
* @param config - The PXE Service Config to use
|
|
28
31
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
29
32
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
30
|
-
*/ export async function createPXEServiceWithSimulationProvider(aztecNode, simulationProvider, config,
|
|
31
|
-
|
|
33
|
+
*/ export async function createPXEServiceWithSimulationProvider(aztecNode, simulationProvider, config, options = {
|
|
34
|
+
loggers: {}
|
|
35
|
+
}) {
|
|
36
|
+
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
37
|
+
const loggers = options.loggers ?? {};
|
|
32
38
|
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
33
39
|
const configWithContracts = {
|
|
34
40
|
...config,
|
|
35
41
|
l1Contracts,
|
|
36
42
|
l2BlockBatchSize: 200
|
|
37
43
|
};
|
|
38
|
-
if (!store) {
|
|
44
|
+
if (!options.store) {
|
|
39
45
|
// TODO once https://github.com/AztecProtocol/aztec-packages/issues/13656 is fixed, we can remove this and always
|
|
40
46
|
// import the lmdb-v2 version
|
|
41
47
|
const { createStore } = await import('@aztec/kv-store/lmdb-v2');
|
|
42
|
-
|
|
48
|
+
const storeLogger = loggers.store ? loggers.store : createLogger('pxe:data:lmdb' + (logSuffix ? `:${logSuffix}` : ''));
|
|
49
|
+
options.store = await createStore('pxe_data', PXE_DATA_SCHEMA_VERSION, configWithContracts, storeLogger);
|
|
43
50
|
}
|
|
44
|
-
const
|
|
51
|
+
const proverLogger = loggers.prover ? loggers.prover : createLogger('pxe:bb:native' + (logSuffix ? `:${logSuffix}` : ''));
|
|
52
|
+
const prover = await createProver(config, simulationProvider, proverLogger);
|
|
45
53
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
46
|
-
const
|
|
54
|
+
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
55
|
+
const pxe = await PXEService.create(aztecNode, options.store, prover, simulationProvider, protocolContractsProvider, config, pxeLogger);
|
|
47
56
|
return pxe;
|
|
48
57
|
}
|
|
49
|
-
function createProver(config, simulationProvider,
|
|
58
|
+
function createProver(config, simulationProvider, logger) {
|
|
50
59
|
if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
|
|
51
|
-
return new BBWASMBundlePrivateKernelProver(simulationProvider, 16);
|
|
60
|
+
return new BBWASMBundlePrivateKernelProver(simulationProvider, 16, logger);
|
|
52
61
|
} else {
|
|
53
62
|
const bbConfig = config;
|
|
54
|
-
const log = createLogger('pxe:bb-native-prover' + (logSuffix ? `:${logSuffix}` : ''));
|
|
55
63
|
return BBNativePrivateKernelProver.new({
|
|
56
64
|
bbSkipCleanup: false,
|
|
57
65
|
...bbConfig
|
|
58
|
-
}, simulationProvider,
|
|
66
|
+
}, simulationProvider, logger);
|
|
59
67
|
}
|
|
60
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAIL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAkBjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAiB,MAAM,kBAAkB,CAAC;AAGlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC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H_READ_REQUESTS_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_NULLIFIER_READ_REQUESTS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, NULLIFIER_TREE_HEIGHT } from '@aztec/constants';
|
|
2
2
|
import { makeTuple } from '@aztec/foundation/array';
|
|
3
3
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
4
4
|
import { assertLength } from '@aztec/foundation/serialize';
|
|
5
5
|
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
6
6
|
import { privateKernelResetDimensionsConfig } from '@aztec/noir-protocol-circuits-types/client';
|
|
7
|
-
import { KeyValidationHint, PrivateKernelData, PrivateKernelResetCircuitPrivateInputs, PrivateKernelResetDimensions, PrivateKernelResetHints, ReadRequestResetStates, ReadRequestState, ScopedNoteHash, ScopedNullifier, ScopedReadRequest, TransientDataIndexHint, buildNoteHashReadRequestHintsFromResetStates, buildNullifierReadRequestHintsFromResetStates, buildTransientDataHints, countAccumulatedItems, findPrivateKernelResetDimensions, getNonEmptyItems, getNoteHashReadRequestResetStates, getNullifierReadRequestResetStates, privateKernelResetDimensionNames } from '@aztec/stdlib/kernel';
|
|
7
|
+
import { KeyValidationHint, PaddedSideEffects, PrivateKernelData, PrivateKernelResetCircuitPrivateInputs, PrivateKernelResetDimensions, PrivateKernelResetHints, ReadRequestResetStates, ReadRequestState, ScopedNoteHash, ScopedNullifier, ScopedReadRequest, TransientDataIndexHint, buildNoteHashReadRequestHintsFromResetStates, buildNullifierReadRequestHintsFromResetStates, buildTransientDataHints, countAccumulatedItems, findPrivateKernelResetDimensions, getNonEmptyItems, getNoteHashReadRequestResetStates, getNullifierReadRequestResetStates, privateKernelResetDimensionNames } from '@aztec/stdlib/kernel';
|
|
8
8
|
import { collectNested } from '@aztec/stdlib/tx';
|
|
9
|
+
import { VkData } from '@aztec/stdlib/vks';
|
|
9
10
|
function collectNestedReadRequests(executionStack, extractReadRequests) {
|
|
10
11
|
return collectNested(executionStack, (executionResult)=>{
|
|
11
12
|
const nonEmptyReadRequests = getNonEmptyItems(extractReadRequests(executionResult));
|
|
@@ -25,17 +26,13 @@ function getNullifierMembershipWitnessResolver(oracle) {
|
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
|
-
async function getMasterSecretKeysAndAppKeyGenerators(keyValidationRequests, oracle) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const request = keyValidationRequests[i].request;
|
|
32
|
-
if (request.isEmpty()) {
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
29
|
+
async function getMasterSecretKeysAndAppKeyGenerators(keyValidationRequests, numRequestsToVerify, oracle) {
|
|
30
|
+
const numRequests = countAccumulatedItems(keyValidationRequests);
|
|
31
|
+
const keysHints = await Promise.all(keyValidationRequests.slice(0, Math.min(numRequests, numRequestsToVerify)).map(async ({ request })=>{
|
|
35
32
|
const secretKeys = await oracle.getMasterSecretKey(request.request.pkM);
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
return padArrayEnd(keysHints, KeyValidationHint.
|
|
33
|
+
return new KeyValidationHint(secretKeys);
|
|
34
|
+
}));
|
|
35
|
+
return padArrayEnd(keysHints, KeyValidationHint.empty(), MAX_KEY_VALIDATION_REQUESTS_PER_TX);
|
|
39
36
|
}
|
|
40
37
|
export class PrivateKernelResetPrivateInputsBuilder {
|
|
41
38
|
previousKernelOutput;
|
|
@@ -97,12 +94,15 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
97
94
|
const allowRemainder = isInner;
|
|
98
95
|
const dimensions = findPrivateKernelResetDimensions(this.requestedDimensions, privateKernelResetDimensionsConfig, isInner, allowRemainder);
|
|
99
96
|
const previousVkMembershipWitness = await oracle.getVkMembershipWitness(this.previousKernelOutput.verificationKey.keyAsFields);
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
this.reduceReadRequestStates(this.
|
|
103
|
-
|
|
97
|
+
const vkData = new VkData(this.previousKernelOutput.verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
|
|
98
|
+
const previousKernelData = new PrivateKernelData(this.previousKernelOutput.publicInputs, vkData);
|
|
99
|
+
this.reduceReadRequestStates(this.noteHashResetStates, dimensions.NOTE_HASH_PENDING_READ, dimensions.NOTE_HASH_SETTLED_READ);
|
|
100
|
+
this.reduceReadRequestStates(this.nullifierResetStates, dimensions.NULLIFIER_PENDING_READ, dimensions.NULLIFIER_SETTLED_READ);
|
|
101
|
+
// TODO: Enable padding when we have a better idea what are the final amounts we should pad to.
|
|
102
|
+
const paddedSideEffects = PaddedSideEffects.empty();
|
|
103
|
+
return new PrivateKernelResetCircuitPrivateInputs(previousKernelData, paddedSideEffects, new PrivateKernelResetHints(await buildNoteHashReadRequestHintsFromResetStates(oracle, this.previousKernel.validationRequests.noteHashReadRequests, this.previousKernel.end.noteHashes, this.noteHashResetStates, noteHashLeafIndexMap), await buildNullifierReadRequestHintsFromResetStates({
|
|
104
104
|
getNullifierMembershipWitness: getNullifierMembershipWitnessResolver(oracle)
|
|
105
|
-
}, this.previousKernel.validationRequests.nullifierReadRequests, this.nullifierResetStates), await getMasterSecretKeysAndAppKeyGenerators(this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators, oracle), this.transientDataIndexHints, this.validationRequestsSplitCounter), dimensions);
|
|
105
|
+
}, this.previousKernel.validationRequests.nullifierReadRequests, this.nullifierResetStates), await getMasterSecretKeysAndAppKeyGenerators(this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators, dimensions.KEY_VALIDATION, oracle), this.transientDataIndexHints, this.validationRequestsSplitCounter), dimensions);
|
|
106
106
|
}
|
|
107
107
|
reduceReadRequestStates(resetStates, maxPending, maxSettled) {
|
|
108
108
|
let numPending = 0;
|
|
@@ -141,16 +141,16 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
141
141
|
const numSettledReads = resetStates.states.reduce((accum, state)=>accum + (state === ReadRequestState.SETTLED ? 1 : 0), 0);
|
|
142
142
|
if (!this.nextIteration) {
|
|
143
143
|
this.noteHashResetStates = resetStates;
|
|
144
|
-
this.requestedDimensions.
|
|
145
|
-
this.requestedDimensions.
|
|
144
|
+
this.requestedDimensions.NOTE_HASH_PENDING_READ = numPendingReads;
|
|
145
|
+
this.requestedDimensions.NOTE_HASH_SETTLED_READ = numSettledReads;
|
|
146
146
|
} else {
|
|
147
147
|
// Pick only one dimension to reset if next iteration is not empty.
|
|
148
148
|
if (numPendingReads > numSettledReads) {
|
|
149
|
-
this.requestedDimensions.
|
|
149
|
+
this.requestedDimensions.NOTE_HASH_PENDING_READ = numPendingReads;
|
|
150
150
|
this.noteHashResetStates.states = assertLength(resetStates.states.map((state)=>state === ReadRequestState.PENDING ? state : ReadRequestState.NADA), MAX_NOTE_HASH_READ_REQUESTS_PER_TX);
|
|
151
151
|
this.noteHashResetStates.pendingReadHints = resetStates.pendingReadHints;
|
|
152
152
|
} else {
|
|
153
|
-
this.requestedDimensions.
|
|
153
|
+
this.requestedDimensions.NOTE_HASH_SETTLED_READ = numSettledReads;
|
|
154
154
|
this.noteHashResetStates.states = assertLength(resetStates.states.map((state)=>state === ReadRequestState.SETTLED ? state : ReadRequestState.NADA), MAX_NOTE_HASH_READ_REQUESTS_PER_TX);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -172,16 +172,16 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
172
172
|
const numSettledReads = resetStates.states.reduce((accum, state)=>accum + (state === ReadRequestState.SETTLED ? 1 : 0), 0);
|
|
173
173
|
if (!this.nextIteration) {
|
|
174
174
|
this.nullifierResetStates = resetStates;
|
|
175
|
-
this.requestedDimensions.
|
|
176
|
-
this.requestedDimensions.
|
|
175
|
+
this.requestedDimensions.NULLIFIER_PENDING_READ = numPendingReads;
|
|
176
|
+
this.requestedDimensions.NULLIFIER_SETTLED_READ = numSettledReads;
|
|
177
177
|
} else {
|
|
178
178
|
// Pick only one dimension to reset if next iteration is not empty.
|
|
179
179
|
if (numPendingReads > numSettledReads) {
|
|
180
|
-
this.requestedDimensions.
|
|
180
|
+
this.requestedDimensions.NULLIFIER_PENDING_READ = numPendingReads;
|
|
181
181
|
this.nullifierResetStates.states = assertLength(resetStates.states.map((state)=>state === ReadRequestState.PENDING ? state : ReadRequestState.NADA), MAX_NULLIFIER_READ_REQUESTS_PER_TX);
|
|
182
182
|
this.nullifierResetStates.pendingReadHints = resetStates.pendingReadHints;
|
|
183
183
|
} else {
|
|
184
|
-
this.requestedDimensions.
|
|
184
|
+
this.requestedDimensions.NULLIFIER_SETTLED_READ = numSettledReads;
|
|
185
185
|
this.nullifierResetStates.states = assertLength(resetStates.states.map((state)=>state === ReadRequestState.SETTLED ? state : ReadRequestState.NADA), MAX_NULLIFIER_READ_REQUESTS_PER_TX);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -194,7 +194,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
194
194
|
if (numCurr + numNext <= maxAmountToKeep) {
|
|
195
195
|
return false;
|
|
196
196
|
}
|
|
197
|
-
this.requestedDimensions.
|
|
197
|
+
this.requestedDimensions.KEY_VALIDATION = numCurr;
|
|
198
198
|
return true;
|
|
199
199
|
}
|
|
200
200
|
needsResetTransientData() {
|
|
@@ -231,7 +231,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
231
231
|
}
|
|
232
232
|
this.numTransientData = numTransientData;
|
|
233
233
|
this.transientDataIndexHints = transientDataIndexHints;
|
|
234
|
-
this.requestedDimensions.
|
|
234
|
+
this.requestedDimensions.TRANSIENT_DATA_SQUASHING = numTransientData;
|
|
235
235
|
return numTransientData > 0;
|
|
236
236
|
}
|
|
237
237
|
needsSiloNoteHashes() {
|
|
@@ -240,7 +240,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
240
240
|
}
|
|
241
241
|
const numNoteHashes = this.previousKernel.end.noteHashes.filter((n)=>!n.contractAddress.isZero()).length;
|
|
242
242
|
const numToSilo = Math.max(0, numNoteHashes - this.numTransientData);
|
|
243
|
-
this.requestedDimensions.
|
|
243
|
+
this.requestedDimensions.NOTE_HASH_SILOING = numToSilo;
|
|
244
244
|
return numToSilo > 0;
|
|
245
245
|
}
|
|
246
246
|
needsSiloNullifiers() {
|
|
@@ -253,7 +253,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
253
253
|
// The reset circuit checks that capped_size must be greater than or equal to all non-empty nullifiers.
|
|
254
254
|
// Which includes the first nullifier, even though its contract address is always zero and doesn't need siloing.
|
|
255
255
|
const cappedSize = numToSilo ? numToSilo + 1 : 0;
|
|
256
|
-
this.requestedDimensions.
|
|
256
|
+
this.requestedDimensions.NULLIFIER_SILOING = cappedSize;
|
|
257
257
|
return numToSilo > 0;
|
|
258
258
|
}
|
|
259
259
|
needsSiloPrivateLogs() {
|
|
@@ -266,7 +266,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
266
266
|
const squashedNoteHashCounters = this.transientDataIndexHints.filter((h)=>h.noteHashIndex < noteHashes.length).map((h)=>noteHashes[h.noteHashIndex].counter);
|
|
267
267
|
const numSquashedLogs = privateLogs.filter((l)=>squashedNoteHashCounters.includes(l.inner.noteHashCounter)).length;
|
|
268
268
|
const numToSilo = numLogs - numSquashedLogs;
|
|
269
|
-
this.requestedDimensions.
|
|
269
|
+
this.requestedDimensions.PRIVATE_LOG_SILOING = numToSilo;
|
|
270
270
|
return numToSilo > 0;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAML,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;YAuPrE,qBAAqB;CA2CpC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { VK_TREE_HEIGHT } from '@aztec/constants';
|
|
2
1
|
import { vkAsFieldsMegaHonk } from '@aztec/foundation/crypto';
|
|
3
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import { assertLength } from '@aztec/foundation/serialize';
|
|
6
4
|
import { pushTestData } from '@aztec/foundation/testing';
|
|
7
5
|
import { Timer } from '@aztec/foundation/timer';
|
|
8
6
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
@@ -10,10 +8,10 @@ import { getProtocolContractLeafAndMembershipWitness, protocolContractTreeRoot }
|
|
|
10
8
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
11
9
|
import { computeContractAddressFromInstance } from '@aztec/stdlib/contract';
|
|
12
10
|
import { hashVK } from '@aztec/stdlib/hash';
|
|
13
|
-
import { PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs, PrivateVerificationKeyHints } from '@aztec/stdlib/kernel';
|
|
11
|
+
import { PaddedSideEffectAmounts, PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs, PrivateVerificationKeyHints } from '@aztec/stdlib/kernel';
|
|
14
12
|
import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
15
13
|
import { collectNoteHashLeafIndexMap, collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
|
|
16
|
-
import { VerificationKeyAsFields, VerificationKeyData } from '@aztec/stdlib/vks';
|
|
14
|
+
import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
17
15
|
import { PrivateKernelResetPrivateInputsBuilder } from './hints/build_private_kernel_reset_private_inputs.js';
|
|
18
16
|
const NULL_SIMULATE_OUTPUT = {
|
|
19
17
|
publicInputs: PrivateKernelCircuitPublicInputs.empty(),
|
|
@@ -95,7 +93,8 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
95
93
|
witness: currentExecution.partialWitness,
|
|
96
94
|
vk: currentExecution.vk,
|
|
97
95
|
timings: {
|
|
98
|
-
witgen: currentExecution.profileResult?.timings.witgen ?? 0
|
|
96
|
+
witgen: currentExecution.profileResult?.timings.witgen ?? 0,
|
|
97
|
+
oracles: currentExecution.profileResult?.timings.oracles
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
100
|
const privateCallData = await this.createPrivateCallData(currentExecution);
|
|
@@ -116,7 +115,8 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
116
115
|
});
|
|
117
116
|
} else {
|
|
118
117
|
const previousVkMembershipWitness = await this.oracle.getVkMembershipWitness(output.verificationKey.keyAsFields);
|
|
119
|
-
const
|
|
118
|
+
const vkData = new VkData(output.verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
|
|
119
|
+
const previousKernelData = new PrivateKernelData(output.publicInputs, vkData);
|
|
120
120
|
const proofInput = new PrivateKernelInnerCircuitPrivateInputs(previousKernelData, privateCallData);
|
|
121
121
|
pushTestData('private-kernel-inputs-inner', proofInput);
|
|
122
122
|
const witgenTimer = new Timer();
|
|
@@ -158,9 +158,12 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
158
158
|
}
|
|
159
159
|
// Private tail.
|
|
160
160
|
const previousVkMembershipWitness = await this.oracle.getVkMembershipWitness(output.verificationKey.keyAsFields);
|
|
161
|
-
const
|
|
161
|
+
const vkData = new VkData(output.verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
|
|
162
|
+
const previousKernelData = new PrivateKernelData(output.publicInputs, vkData);
|
|
162
163
|
this.log.debug(`Calling private kernel tail with hwm ${previousKernelData.publicInputs.minRevertibleSideEffectCounter}`);
|
|
163
|
-
|
|
164
|
+
// TODO: Enable padding when we have a better what are the final amounts we should pad to.
|
|
165
|
+
const paddedSideEffectAmounts = PaddedSideEffectAmounts.empty();
|
|
166
|
+
const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts);
|
|
164
167
|
pushTestData('private-kernel-inputs-ordering', privateInputs);
|
|
165
168
|
const witgenTimer = new Timer();
|
|
166
169
|
const tailOutput = generateWitnesses ? await this.proofCreator.generateTailOutput(privateInputs) : await this.proofCreator.simulateTail(privateInputs);
|
|
@@ -8,7 +8,7 @@ import type { L2Block } from '@aztec/stdlib/block';
|
|
|
8
8
|
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
9
9
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
10
10
|
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
11
|
-
import { IndexedTaggingSecret,
|
|
11
|
+
import { IndexedTaggingSecret, PublicLogWithTxData } from '@aztec/stdlib/logs';
|
|
12
12
|
import { Note, type NoteStatus } from '@aztec/stdlib/note';
|
|
13
13
|
import { MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
14
14
|
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
@@ -124,8 +124,8 @@ export declare class PXEOracleInterface implements ExecutionDataProvider {
|
|
|
124
124
|
*/
|
|
125
125
|
syncTaggedLogsAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
|
|
126
126
|
/**
|
|
127
|
-
* Synchronizes the logs tagged with scoped addresses and all the senders in the address book. Stores the found
|
|
128
|
-
* in CapsuleArray ready for a later retrieval in Aztec.nr.
|
|
127
|
+
* Synchronizes the private logs tagged with scoped addresses and all the senders in the address book. Stores the found
|
|
128
|
+
* logs in CapsuleArray ready for a later retrieval in Aztec.nr.
|
|
129
129
|
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
130
130
|
* @param pendingTaggedLogArrayBaseSlot - The base slot of the pending tagged logs capsule array in which
|
|
131
131
|
* found logs will be stored.
|
|
@@ -134,7 +134,7 @@ export declare class PXEOracleInterface implements ExecutionDataProvider {
|
|
|
134
134
|
*/
|
|
135
135
|
syncTaggedLogs(contractAddress: AztecAddress, pendingTaggedLogArrayBaseSlot: Fr, scopes?: AztecAddress[]): Promise<void>;
|
|
136
136
|
deliverNote(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: TxHash, recipient: AztecAddress): Promise<void>;
|
|
137
|
-
|
|
137
|
+
getPublicLogByTag(tag: Fr, contractAddress: AztecAddress): Promise<PublicLogWithTxData | null>;
|
|
138
138
|
removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
|
|
139
139
|
storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
|
|
140
140
|
loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/pxe_oracle_interface/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,KAAK,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EACL,aAAa,EACb,KAAK,gCAAgC,EACrC,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAC3B,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,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EACL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/pxe_oracle_interface/pxe_oracle_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAA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