@aztec/prover-client 0.85.0-alpha-testnet.2 → 0.85.0-nightly.20250417
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BBProverConfig } from '@aztec/bb-prover';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import type { Logger } from '@aztec/foundation/log';
|
|
4
|
-
import { PublicProcessor, PublicTxSimulationTester
|
|
4
|
+
import { PublicProcessor, PublicTxSimulationTester } from '@aztec/simulator/server';
|
|
5
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import type { L2Block } from '@aztec/stdlib/block';
|
|
7
7
|
import type { ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
|
|
@@ -13,7 +13,6 @@ import { ProvingOrchestrator } from '../orchestrator/index.js';
|
|
|
13
13
|
import { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facade.js';
|
|
14
14
|
import { TestBroker } from '../test/mock_prover.js';
|
|
15
15
|
export declare class TestContext {
|
|
16
|
-
publicTxSimulator: PublicTxSimulator;
|
|
17
16
|
worldState: MerkleTreeAdminDatabase;
|
|
18
17
|
publicProcessor: PublicProcessor;
|
|
19
18
|
globalVariables: GlobalVariables;
|
|
@@ -28,7 +27,7 @@ export declare class TestContext {
|
|
|
28
27
|
logger: Logger;
|
|
29
28
|
private headers;
|
|
30
29
|
private feePayerBalance;
|
|
31
|
-
constructor(
|
|
30
|
+
constructor(worldState: MerkleTreeAdminDatabase, publicProcessor: PublicProcessor, globalVariables: GlobalVariables, prover: ServerCircuitProver, broker: TestBroker, brokerProverFacade: BrokerCircuitProverFacade, orchestrator: TestProvingOrchestrator, blockNumber: number, feePayer: AztecAddress, initialFeePayerBalance: Fr, directoriesToCleanup: string[], tester: PublicTxSimulationTester, logger: Logger);
|
|
32
31
|
get epochProver(): TestProvingOrchestrator;
|
|
33
32
|
static new(logger: Logger, proverCount?: number, createProver?: (bbConfig: BBProverConfig) => Promise<ServerCircuitProver>, blockNumber?: number): Promise<TestContext>;
|
|
34
33
|
getFork(): Promise<import("@aztec/stdlib/trees").MerkleTreeWriteOperations>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test_context.d.ts","sourceRoot":"","sources":["../../src/mocks/test_context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,
|
|
1
|
+
{"version":3,"file":"test_context.d.ts","sourceRoot":"","sources":["../../src/mocks/test_context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,EACL,eAAe,EAEf,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,KAAK,sBAAsB,EAAsB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAiB,KAAK,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACpH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AASlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,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e,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAC1F,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAuBjE,8EAA8E;IACjE,gBAAgB,CAC3B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAAU,EACnB,iBAAiB,GAAE,eAAe,GAAG,MAA6B,EAClE,mBAAmB,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAc;;;;;IAiB/F,sBAAsB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM;IAIzD,YAAY,CAAC,GAAG,EAAE,WAAW,EAAE;CAsB7C;AAED,cAAM,uBAAwB,SAAQ,mBAAmB;IAChD,2CAA2C,UAAS;cAIxC,kCAAkC,CACnD,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,sBAAsB,GACjC,OAAO,CAAC,IAAI,CAAC;CAMjB"}
|
|
@@ -4,7 +4,7 @@ import { TestDateProvider } from '@aztec/foundation/timer';
|
|
|
4
4
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
5
5
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
6
6
|
import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice';
|
|
7
|
-
import {
|
|
7
|
+
import { PublicProcessorFactory, PublicTxSimulationTester, SimpleContractDataSource } from '@aztec/simulator/server';
|
|
8
8
|
import { PublicDataWrite } from '@aztec/stdlib/avm';
|
|
9
9
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
10
10
|
import { makeBloatedProcessedTx } from '@aztec/stdlib/testing';
|
|
@@ -21,7 +21,6 @@ import { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facad
|
|
|
21
21
|
import { TestBroker } from '../test/mock_prover.js';
|
|
22
22
|
import { getEnvironmentConfig, getSimulationProvider, makeGlobals, updateExpectedTreesFromTxs } from './fixtures.js';
|
|
23
23
|
export class TestContext {
|
|
24
|
-
publicTxSimulator;
|
|
25
24
|
worldState;
|
|
26
25
|
publicProcessor;
|
|
27
26
|
globalVariables;
|
|
@@ -36,8 +35,7 @@ export class TestContext {
|
|
|
36
35
|
logger;
|
|
37
36
|
headers;
|
|
38
37
|
feePayerBalance;
|
|
39
|
-
constructor(
|
|
40
|
-
this.publicTxSimulator = publicTxSimulator;
|
|
38
|
+
constructor(worldState, publicProcessor, globalVariables, prover, broker, brokerProverFacade, orchestrator, blockNumber, feePayer, initialFeePayerBalance, directoriesToCleanup, tester, logger){
|
|
41
39
|
this.worldState = worldState;
|
|
42
40
|
this.publicProcessor = publicProcessor;
|
|
43
41
|
this.globalVariables = globalVariables;
|
|
@@ -66,14 +64,12 @@ export class TestContext {
|
|
|
66
64
|
new PublicDataTreeLeaf(feePayerSlot, initialFeePayerBalance)
|
|
67
65
|
];
|
|
68
66
|
// Separated dbs for public processor and prover - see public_processor for context
|
|
69
|
-
const ws = await NativeWorldStateService.tmp(
|
|
67
|
+
const ws = await NativeWorldStateService.tmp(/*rollupAddress=*/ undefined, /*cleanupTmpDir=*/ true, prefilledPublicData);
|
|
70
68
|
const merkleTrees = await ws.fork();
|
|
71
69
|
const contractDataSource = new SimpleContractDataSource();
|
|
72
|
-
const treesDB = new PublicTreesDB(merkleTrees);
|
|
73
|
-
const contractsDB = new PublicContractsDB(contractDataSource);
|
|
74
70
|
const tester = new PublicTxSimulationTester(merkleTrees, contractDataSource);
|
|
75
|
-
const
|
|
76
|
-
const processor =
|
|
71
|
+
const processorFactory = new PublicProcessorFactory(contractDataSource, new TestDateProvider());
|
|
72
|
+
const processor = processorFactory.create(merkleTrees, globalVariables, /*skipFeeEnforcement=*/ false);
|
|
77
73
|
let localProver;
|
|
78
74
|
const config = await getEnvironmentConfig(logger);
|
|
79
75
|
if (!config) {
|
|
@@ -96,7 +92,7 @@ export class TestContext {
|
|
|
96
92
|
const orchestrator = new TestProvingOrchestrator(ws, facade, Fr.ZERO);
|
|
97
93
|
await broker.start();
|
|
98
94
|
facade.start();
|
|
99
|
-
return new this(
|
|
95
|
+
return new this(ws, processor, globalVariables, localProver, broker, facade, orchestrator, blockNumber, feePayer, initialFeePayerBalance, directoriesToCleanup, tester, logger);
|
|
100
96
|
}
|
|
101
97
|
getFork() {
|
|
102
98
|
return this.worldState.fork();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-client",
|
|
3
|
-
"version": "0.85.0-
|
|
3
|
+
"version": "0.85.0-nightly.20250417",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -25,8 +25,6 @@
|
|
|
25
25
|
"build": "yarn clean && tsc -b",
|
|
26
26
|
"build:dev": "tsc -b --watch",
|
|
27
27
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
28
|
-
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
|
|
29
|
-
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
|
|
30
28
|
"bb": "node --no-warnings ./dest/bb/index.js",
|
|
31
29
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=3500000 --forceExit",
|
|
32
30
|
"test:debug": "LOG_LEVEL=debug NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=1500000 --forceExit --testNamePattern prover/bb_prover/parity",
|
|
@@ -66,19 +64,19 @@
|
|
|
66
64
|
]
|
|
67
65
|
},
|
|
68
66
|
"dependencies": {
|
|
69
|
-
"@aztec/bb-prover": "0.85.0-
|
|
70
|
-
"@aztec/blob-lib": "0.85.0-
|
|
71
|
-
"@aztec/constants": "0.85.0-
|
|
72
|
-
"@aztec/ethereum": "0.85.0-
|
|
73
|
-
"@aztec/foundation": "0.85.0-
|
|
74
|
-
"@aztec/kv-store": "0.85.0-
|
|
75
|
-
"@aztec/noir-protocol-circuits-types": "0.85.0-
|
|
76
|
-
"@aztec/noir-types": "0.85.0-
|
|
77
|
-
"@aztec/protocol-contracts": "0.85.0-
|
|
78
|
-
"@aztec/simulator": "0.85.0-
|
|
79
|
-
"@aztec/stdlib": "0.85.0-
|
|
80
|
-
"@aztec/telemetry-client": "0.85.0-
|
|
81
|
-
"@aztec/world-state": "0.85.0-
|
|
67
|
+
"@aztec/bb-prover": "0.85.0-nightly.20250417",
|
|
68
|
+
"@aztec/blob-lib": "0.85.0-nightly.20250417",
|
|
69
|
+
"@aztec/constants": "0.85.0-nightly.20250417",
|
|
70
|
+
"@aztec/ethereum": "0.85.0-nightly.20250417",
|
|
71
|
+
"@aztec/foundation": "0.85.0-nightly.20250417",
|
|
72
|
+
"@aztec/kv-store": "0.85.0-nightly.20250417",
|
|
73
|
+
"@aztec/noir-protocol-circuits-types": "0.85.0-nightly.20250417",
|
|
74
|
+
"@aztec/noir-types": "0.85.0-nightly.20250417",
|
|
75
|
+
"@aztec/protocol-contracts": "0.85.0-nightly.20250417",
|
|
76
|
+
"@aztec/simulator": "0.85.0-nightly.20250417",
|
|
77
|
+
"@aztec/stdlib": "0.85.0-nightly.20250417",
|
|
78
|
+
"@aztec/telemetry-client": "0.85.0-nightly.20250417",
|
|
79
|
+
"@aztec/world-state": "0.85.0-nightly.20250417",
|
|
82
80
|
"@google-cloud/storage": "^7.15.0",
|
|
83
81
|
"@iarna/toml": "^2.2.5",
|
|
84
82
|
"commander": "^12.1.0",
|
|
@@ -88,7 +86,7 @@
|
|
|
88
86
|
"zod": "^3.23.8"
|
|
89
87
|
},
|
|
90
88
|
"devDependencies": {
|
|
91
|
-
"@aztec/noir-contracts.js": "0.85.0-
|
|
89
|
+
"@aztec/noir-contracts.js": "0.85.0-nightly.20250417",
|
|
92
90
|
"@jest/globals": "^29.5.0",
|
|
93
91
|
"@types/jest": "^29.5.0",
|
|
94
92
|
"@types/node": "^18.7.23",
|
|
@@ -7,11 +7,9 @@ import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
|
7
7
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
8
8
|
import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice';
|
|
9
9
|
import {
|
|
10
|
-
PublicContractsDB,
|
|
11
10
|
PublicProcessor,
|
|
12
|
-
|
|
11
|
+
PublicProcessorFactory,
|
|
13
12
|
PublicTxSimulationTester,
|
|
14
|
-
PublicTxSimulator,
|
|
15
13
|
SimpleContractDataSource,
|
|
16
14
|
} from '@aztec/simulator/server';
|
|
17
15
|
import { PublicDataWrite } from '@aztec/stdlib/avm';
|
|
@@ -40,7 +38,6 @@ export class TestContext {
|
|
|
40
38
|
private feePayerBalance: Fr;
|
|
41
39
|
|
|
42
40
|
constructor(
|
|
43
|
-
public publicTxSimulator: PublicTxSimulator,
|
|
44
41
|
public worldState: MerkleTreeAdminDatabase,
|
|
45
42
|
public publicProcessor: PublicProcessor,
|
|
46
43
|
public globalVariables: GlobalVariables,
|
|
@@ -79,26 +76,17 @@ export class TestContext {
|
|
|
79
76
|
|
|
80
77
|
// Separated dbs for public processor and prover - see public_processor for context
|
|
81
78
|
const ws = await NativeWorldStateService.tmp(
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
/*rollupAddress=*/ undefined,
|
|
80
|
+
/*cleanupTmpDir=*/ true,
|
|
84
81
|
prefilledPublicData,
|
|
85
82
|
);
|
|
86
83
|
const merkleTrees = await ws.fork();
|
|
87
84
|
|
|
88
85
|
const contractDataSource = new SimpleContractDataSource();
|
|
89
|
-
const treesDB = new PublicTreesDB(merkleTrees);
|
|
90
|
-
const contractsDB = new PublicContractsDB(contractDataSource);
|
|
91
|
-
|
|
92
86
|
const tester = new PublicTxSimulationTester(merkleTrees, contractDataSource);
|
|
93
87
|
|
|
94
|
-
const
|
|
95
|
-
const processor =
|
|
96
|
-
globalVariables,
|
|
97
|
-
treesDB,
|
|
98
|
-
contractsDB,
|
|
99
|
-
publicTxSimulator,
|
|
100
|
-
new TestDateProvider(),
|
|
101
|
-
);
|
|
88
|
+
const processorFactory = new PublicProcessorFactory(contractDataSource, new TestDateProvider());
|
|
89
|
+
const processor = processorFactory.create(merkleTrees, globalVariables, /*skipFeeEnforcement=*/ false);
|
|
102
90
|
|
|
103
91
|
let localProver: ServerCircuitProver;
|
|
104
92
|
const config = await getEnvironmentConfig(logger);
|
|
@@ -127,7 +115,6 @@ export class TestContext {
|
|
|
127
115
|
facade.start();
|
|
128
116
|
|
|
129
117
|
return new this(
|
|
130
|
-
publicTxSimulator,
|
|
131
118
|
ws,
|
|
132
119
|
processor,
|
|
133
120
|
globalVariables,
|