@aztec/bb-prover 0.82.2 → 0.82.3

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.
@@ -3,12 +3,13 @@ import { SimpleContractDataSource } from '@aztec/simulator/server';
3
3
  import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
4
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
6
+ import type { GlobalVariables } from '@aztec/stdlib/tx';
6
7
  import { type BBResult, type BBSuccess } from '../bb/execute.js';
7
8
  export declare class AvmProvingTester extends PublicTxSimulationTester {
8
9
  private bbWorkingDirectory;
9
10
  private checkCircuitOnly;
10
- constructor(bbWorkingDirectory: string, checkCircuitOnly: boolean, merkleTree: MerkleTreeWriteOperations, contractDataSource: SimpleContractDataSource);
11
- static create(checkCircuitOnly?: boolean): Promise<AvmProvingTester>;
11
+ constructor(bbWorkingDirectory: string, checkCircuitOnly: boolean, merkleTree: MerkleTreeWriteOperations, contractDataSource: SimpleContractDataSource, globals?: GlobalVariables);
12
+ static new(checkCircuitOnly?: boolean, globals?: GlobalVariables): Promise<AvmProvingTester>;
12
13
  prove(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult>;
13
14
  verify(proofRes: BBSuccess): Promise<BBResult>;
14
15
  simProveVerify(sender: AztecAddress, setupCalls: TestEnqueuedCall[], appCalls: TestEnqueuedCall[], teardownCall: TestEnqueuedCall | undefined, expectRevert: boolean | undefined, feePayer?: AztecAddress): Promise<void>;
@@ -16,8 +17,8 @@ export declare class AvmProvingTester extends PublicTxSimulationTester {
16
17
  }
17
18
  export declare class AvmProvingTesterV2 extends PublicTxSimulationTester {
18
19
  private bbWorkingDirectory;
19
- constructor(bbWorkingDirectory: string, contractDataSource: SimpleContractDataSource, merkleTrees: MerkleTreeWriteOperations);
20
- static create(): Promise<AvmProvingTesterV2>;
20
+ constructor(bbWorkingDirectory: string, contractDataSource: SimpleContractDataSource, merkleTrees: MerkleTreeWriteOperations, globals?: GlobalVariables);
21
+ static new(globals?: GlobalVariables): Promise<AvmProvingTesterV2>;
21
22
  proveV2(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult>;
22
23
  verifyV2(proofRes: BBSuccess): Promise<BBResult>;
23
24
  simProveVerifyV2(sender: AztecAddress, setupCalls: TestEnqueuedCall[], appCalls: TestEnqueuedCall[], teardownCall: TestEnqueuedCall | undefined, expectRevert: boolean | undefined, feePayer?: AztecAddress): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"avm_proving_tester.d.ts","sourceRoot":"","sources":["../../src/avm_proving_tests/avm_proving_tester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AASjF,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,SAAS,EAMf,MAAM,kBAAkB,CAAC;AAK1B,qBAAa,gBAAiB,SAAQ,wBAAwB;IAE1D,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,gBAAgB;gBADhB,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,OAAO,EACjC,UAAU,EAAE,yBAAyB,EACrC,kBAAkB,EAAE,wBAAwB;WAKxB,MAAM,CAAC,gBAAgB,GAAE,OAAe;IAQxD,KAAK,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAe5D,MAAM,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;IAgBvC,cAAc,CACzB,MAAM,EAAE,YAAY,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,EAAE,gBAAgB,EAAE,EAC5B,YAAY,EAAE,gBAAgB,GAAG,SAAS,EAC1C,YAAY,EAAE,OAAO,GAAG,SAAS,EACjC,QAAQ,eAAS;CAYpB"}
@@ -13,14 +13,15 @@ const BB_PATH = path.resolve('../../barretenberg/cpp/build/bin/bb');
13
13
  export class AvmProvingTester extends PublicTxSimulationTester {
14
14
  bbWorkingDirectory;
15
15
  checkCircuitOnly;
16
- constructor(bbWorkingDirectory, checkCircuitOnly, merkleTree, contractDataSource){
17
- super(merkleTree, contractDataSource), this.bbWorkingDirectory = bbWorkingDirectory, this.checkCircuitOnly = checkCircuitOnly;
16
+ constructor(bbWorkingDirectory, checkCircuitOnly, merkleTree, contractDataSource, globals){
17
+ super(merkleTree, contractDataSource, globals), this.bbWorkingDirectory = bbWorkingDirectory, this.checkCircuitOnly = checkCircuitOnly;
18
18
  }
19
- static async create(checkCircuitOnly = false) {
19
+ // overriding parent class' create is a pain, so we use a different nam
20
+ static async new(checkCircuitOnly = false, globals) {
20
21
  const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
21
22
  const contractDataSource = new SimpleContractDataSource();
22
23
  const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
23
- return new AvmProvingTester(bbWorkingDirectory, checkCircuitOnly, merkleTrees, contractDataSource);
24
+ return new AvmProvingTester(bbWorkingDirectory, checkCircuitOnly, merkleTrees, contractDataSource, globals);
24
25
  }
25
26
  async prove(avmCircuitInputs) {
26
27
  // Then we prove.
@@ -67,14 +68,14 @@ export class AvmProvingTester extends PublicTxSimulationTester {
67
68
  }
68
69
  export class AvmProvingTesterV2 extends PublicTxSimulationTester {
69
70
  bbWorkingDirectory;
70
- constructor(bbWorkingDirectory, contractDataSource, merkleTrees){
71
- super(merkleTrees, contractDataSource), this.bbWorkingDirectory = bbWorkingDirectory;
71
+ constructor(bbWorkingDirectory, contractDataSource, merkleTrees, globals){
72
+ super(merkleTrees, contractDataSource, globals), this.bbWorkingDirectory = bbWorkingDirectory;
72
73
  }
73
- static async create() {
74
+ static async new(globals) {
74
75
  const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
75
76
  const contractDataSource = new SimpleContractDataSource();
76
77
  const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
77
- return new AvmProvingTesterV2(bbWorkingDirectory, contractDataSource, merkleTrees);
78
+ return new AvmProvingTesterV2(bbWorkingDirectory, contractDataSource, merkleTrees, globals);
78
79
  }
79
80
  async proveV2(avmCircuitInputs) {
80
81
  // Then we prove.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/bb-prover",
3
- "version": "0.82.2",
3
+ "version": "0.82.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -68,16 +68,16 @@
68
68
  ]
69
69
  },
70
70
  "dependencies": {
71
- "@aztec/bb.js": "0.82.2",
72
- "@aztec/constants": "0.82.2",
73
- "@aztec/foundation": "0.82.2",
74
- "@aztec/noir-noirc_abi": "0.82.2",
75
- "@aztec/noir-protocol-circuits-types": "0.82.2",
76
- "@aztec/noir-types": "0.82.2",
77
- "@aztec/simulator": "0.82.2",
78
- "@aztec/stdlib": "0.82.2",
79
- "@aztec/telemetry-client": "0.82.2",
80
- "@aztec/world-state": "0.82.2",
71
+ "@aztec/bb.js": "0.82.3",
72
+ "@aztec/constants": "0.82.3",
73
+ "@aztec/foundation": "0.82.3",
74
+ "@aztec/noir-noirc_abi": "0.82.3",
75
+ "@aztec/noir-protocol-circuits-types": "0.82.3",
76
+ "@aztec/noir-types": "0.82.3",
77
+ "@aztec/simulator": "0.82.3",
78
+ "@aztec/stdlib": "0.82.3",
79
+ "@aztec/telemetry-client": "0.82.3",
80
+ "@aztec/world-state": "0.82.3",
81
81
  "@msgpack/msgpack": "^3.0.0-beta2",
82
82
  "commander": "^12.1.0",
83
83
  "pako": "^2.1.0",
@@ -85,10 +85,10 @@
85
85
  "tslib": "^2.4.0"
86
86
  },
87
87
  "devDependencies": {
88
- "@aztec/ethereum": "0.82.2",
89
- "@aztec/kv-store": "0.82.2",
90
- "@aztec/noir-contracts.js": "0.82.2",
91
- "@aztec/protocol-contracts": "0.82.2",
88
+ "@aztec/ethereum": "0.82.3",
89
+ "@aztec/kv-store": "0.82.3",
90
+ "@aztec/noir-contracts.js": "0.82.3",
91
+ "@aztec/protocol-contracts": "0.82.3",
92
92
  "@jest/globals": "^29.5.0",
93
93
  "@types/jest": "^29.5.0",
94
94
  "@types/memdown": "^3.0.0",
@@ -4,6 +4,7 @@ import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
4
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
6
6
  import { makeAvmCircuitInputs } from '@aztec/stdlib/testing';
7
+ import type { GlobalVariables } from '@aztec/stdlib/tx';
7
8
  import { VerificationKeyData } from '@aztec/stdlib/vks';
8
9
  import { NativeWorldStateService } from '@aztec/world-state';
9
10
 
@@ -30,16 +31,18 @@ export class AvmProvingTester extends PublicTxSimulationTester {
30
31
  private checkCircuitOnly: boolean,
31
32
  merkleTree: MerkleTreeWriteOperations,
32
33
  contractDataSource: SimpleContractDataSource,
34
+ globals?: GlobalVariables,
33
35
  ) {
34
- super(merkleTree, contractDataSource);
36
+ super(merkleTree, contractDataSource, globals);
35
37
  }
36
38
 
37
- static override async create(checkCircuitOnly: boolean = false) {
39
+ // overriding parent class' create is a pain, so we use a different nam
40
+ static async new(checkCircuitOnly: boolean = false, globals?: GlobalVariables) {
38
41
  const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
39
42
 
40
43
  const contractDataSource = new SimpleContractDataSource();
41
44
  const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
42
- return new AvmProvingTester(bbWorkingDirectory, checkCircuitOnly, merkleTrees, contractDataSource);
45
+ return new AvmProvingTester(bbWorkingDirectory, checkCircuitOnly, merkleTrees, contractDataSource, globals);
43
46
  }
44
47
 
45
48
  async prove(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult> {
@@ -108,16 +111,17 @@ export class AvmProvingTesterV2 extends PublicTxSimulationTester {
108
111
  private bbWorkingDirectory: string,
109
112
  contractDataSource: SimpleContractDataSource,
110
113
  merkleTrees: MerkleTreeWriteOperations,
114
+ globals?: GlobalVariables,
111
115
  ) {
112
- super(merkleTrees, contractDataSource);
116
+ super(merkleTrees, contractDataSource, globals);
113
117
  }
114
118
 
115
- static override async create() {
119
+ static async new(globals?: GlobalVariables) {
116
120
  const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
117
121
 
118
122
  const contractDataSource = new SimpleContractDataSource();
119
123
  const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
120
- return new AvmProvingTesterV2(bbWorkingDirectory, contractDataSource, merkleTrees);
124
+ return new AvmProvingTesterV2(bbWorkingDirectory, contractDataSource, merkleTrees, globals);
121
125
  }
122
126
 
123
127
  async proveV2(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult> {