@aztec/prover-client 1.0.0-nightly.20250624 → 1.0.0-nightly.20250625
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx-proving-state.d.ts","sourceRoot":"","sources":["../../src/orchestrator/tx-proving-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,
|
|
1
|
+
{"version":3,"file":"tx-proving-state.d.ts","sourceRoot":"","sources":["../../src/orchestrator/tx-proving-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EAIpC,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAEL,KAAK,eAAe,EAEpB,uBAAuB,EAGvB,sBAAsB,EAEtB,UAAU,EACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD;;;;GAIG;AACH,qBAAa,cAAc;;aAKP,WAAW,EAAE,WAAW;IACxC,OAAO,CAAC,QAAQ,CAAC,eAAe;aAChB,aAAa,EAAE,GAAG,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAN1E,OAAO,CAAC,IAAI,CAAC,CAAoD;IACjE,OAAO,CAAC,GAAG,CAAC,CAAuE;gBAGjE,WAAW,EAAE,WAAW,EACvB,eAAe,EAAE,eAAe,EACjC,aAAa,EAAE,GAAG,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAG1E,IAAI,eAAe,YAElB;IAEM,KAAK;IAIL,aAAa;IAIb,YAAY,IAAI,gBAAgB;IAIhC,0BAA0B;;;;;;;IAc1B,YAAY,CAAC,cAAc,EAAE,uBAAuB,CAAC,OAAO,iBAAiB,CAAC;IAI9E,WAAW,CAAC,aAAa,EAAE,uBAAuB,CAAC,OAAO,oCAAoC,CAAC;CAwDvG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AVM_VK_INDEX,
|
|
2
|
-
import {
|
|
1
|
+
import { AVM_VK_INDEX, PRIVATE_TUBE_VK_INDEX, PUBLIC_TUBE_VK_INDEX } from '@aztec/constants';
|
|
2
|
+
import { getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
3
3
|
import { AvmProofData, PrivateBaseRollupHints, PrivateBaseRollupInputs, PrivateTubeData, PublicBaseRollupHints, PublicBaseRollupInputs, PublicTubeData, TubeInputs } from '@aztec/stdlib/rollup';
|
|
4
4
|
import { VkData } from '@aztec/stdlib/vks';
|
|
5
5
|
/**
|
|
@@ -52,7 +52,7 @@ import { VkData } from '@aztec/stdlib/vks';
|
|
|
52
52
|
if (!this.tube) {
|
|
53
53
|
throw new Error('Tx not ready for proving base rollup.');
|
|
54
54
|
}
|
|
55
|
-
const vkData = this.#
|
|
55
|
+
const vkData = this.#getVkData(this.tube.verificationKey, PRIVATE_TUBE_VK_INDEX);
|
|
56
56
|
const tubeData = new PrivateTubeData(this.processedTx.data.toPrivateToRollupKernelCircuitPublicInputs(), this.tube.proof, vkData);
|
|
57
57
|
if (!(this.baseRollupHints instanceof PrivateBaseRollupHints)) {
|
|
58
58
|
throw new Error('Mismatched base rollup hints, expected private base rollup hints');
|
|
@@ -69,26 +69,15 @@ import { VkData } from '@aztec/stdlib/vks';
|
|
|
69
69
|
if (!this.avm) {
|
|
70
70
|
throw new Error('Tx not ready for proving base rollup: avm proof undefined');
|
|
71
71
|
}
|
|
72
|
-
const tubeData = new PublicTubeData(this.processedTx.data.toPrivateToPublicKernelCircuitPublicInputs(), this.tube.proof, this.#
|
|
73
|
-
const avmProofData = new AvmProofData(this.processedTx.avmProvingRequest.inputs.publicInputs, this.avm.proof, this.#
|
|
72
|
+
const tubeData = new PublicTubeData(this.processedTx.data.toPrivateToPublicKernelCircuitPublicInputs(), this.tube.proof, this.#getVkData(this.tube.verificationKey, PUBLIC_TUBE_VK_INDEX));
|
|
73
|
+
const avmProofData = new AvmProofData(this.processedTx.avmProvingRequest.inputs.publicInputs, this.avm.proof, this.#getVkData(this.avm.verificationKey, AVM_VK_INDEX));
|
|
74
74
|
if (!(this.baseRollupHints instanceof PublicBaseRollupHints)) {
|
|
75
75
|
throw new Error('Mismatched base rollup hints, expected public base rollup hints');
|
|
76
76
|
}
|
|
77
77
|
return new PublicBaseRollupInputs(tubeData, avmProofData, this.baseRollupHints);
|
|
78
78
|
}
|
|
79
|
-
#
|
|
80
|
-
let vkIndex = TUBE_VK_INDEX;
|
|
81
|
-
try {
|
|
82
|
-
vkIndex = getVKIndex(this.tube.verificationKey);
|
|
83
|
-
} catch {
|
|
84
|
-
// TODO(#7410) The VK for the tube won't be in the tree for now, so we manually set it to the tube vk index
|
|
85
|
-
}
|
|
86
|
-
const vkPath = getVKSiblingPath(vkIndex);
|
|
87
|
-
return new VkData(this.tube.verificationKey, vkIndex, vkPath);
|
|
88
|
-
}
|
|
89
|
-
#getAvmVkData() {
|
|
90
|
-
const vkIndex = AVM_VK_INDEX;
|
|
79
|
+
#getVkData(verificationKey, vkIndex) {
|
|
91
80
|
const vkPath = getVKSiblingPath(vkIndex);
|
|
92
|
-
return new VkData(
|
|
81
|
+
return new VkData(verificationKey, vkIndex, vkPath);
|
|
93
82
|
}
|
|
94
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-client",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250625",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
72
|
-
"@aztec/blob-lib": "1.0.0-nightly.
|
|
73
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
74
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
75
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
76
|
-
"@aztec/kv-store": "1.0.0-nightly.
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
78
|
-
"@aztec/noir-types": "1.0.0-nightly.
|
|
79
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
80
|
-
"@aztec/simulator": "1.0.0-nightly.
|
|
81
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
82
|
-
"@aztec/telemetry-client": "1.0.0-nightly.
|
|
83
|
-
"@aztec/world-state": "1.0.0-nightly.
|
|
71
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250625",
|
|
72
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250625",
|
|
73
|
+
"@aztec/constants": "1.0.0-nightly.20250625",
|
|
74
|
+
"@aztec/ethereum": "1.0.0-nightly.20250625",
|
|
75
|
+
"@aztec/foundation": "1.0.0-nightly.20250625",
|
|
76
|
+
"@aztec/kv-store": "1.0.0-nightly.20250625",
|
|
77
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250625",
|
|
78
|
+
"@aztec/noir-types": "1.0.0-nightly.20250625",
|
|
79
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250625",
|
|
80
|
+
"@aztec/simulator": "1.0.0-nightly.20250625",
|
|
81
|
+
"@aztec/stdlib": "1.0.0-nightly.20250625",
|
|
82
|
+
"@aztec/telemetry-client": "1.0.0-nightly.20250625",
|
|
83
|
+
"@aztec/world-state": "1.0.0-nightly.20250625",
|
|
84
84
|
"@google-cloud/storage": "^7.15.0",
|
|
85
85
|
"@iarna/toml": "^2.2.5",
|
|
86
86
|
"commander": "^12.1.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"zod": "^3.23.8"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@aztec/noir-contracts.js": "1.0.0-nightly.
|
|
93
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250625",
|
|
94
94
|
"@jest/globals": "^30.0.0",
|
|
95
95
|
"@types/jest": "^30.0.0",
|
|
96
96
|
"@types/node": "^22.15.17",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
|
|
3
3
|
AVM_VK_INDEX,
|
|
4
|
+
PRIVATE_TUBE_VK_INDEX,
|
|
5
|
+
PUBLIC_TUBE_VK_INDEX,
|
|
4
6
|
type TUBE_PROOF_LENGTH,
|
|
5
|
-
TUBE_VK_INDEX,
|
|
6
7
|
} from '@aztec/constants';
|
|
7
|
-
import {
|
|
8
|
+
import { getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
8
9
|
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
9
10
|
import type { ProofAndVerificationKey } from '@aztec/stdlib/interfaces/server';
|
|
10
11
|
import {
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
import type { CircuitName } from '@aztec/stdlib/stats';
|
|
22
23
|
import type { AppendOnlyTreeSnapshot, MerkleTreeId } from '@aztec/stdlib/trees';
|
|
23
24
|
import type { ProcessedTx } from '@aztec/stdlib/tx';
|
|
24
|
-
import { VkData } from '@aztec/stdlib/vks';
|
|
25
|
+
import { VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Helper class to manage the proving cycle of a transaction
|
|
@@ -81,7 +82,7 @@ export class TxProvingState {
|
|
|
81
82
|
throw new Error('Tx not ready for proving base rollup.');
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
const vkData = this.#
|
|
85
|
+
const vkData = this.#getVkData(this.tube!.verificationKey, PRIVATE_TUBE_VK_INDEX);
|
|
85
86
|
const tubeData = new PrivateTubeData(
|
|
86
87
|
this.processedTx.data.toPrivateToRollupKernelCircuitPublicInputs(),
|
|
87
88
|
this.tube.proof,
|
|
@@ -108,13 +109,13 @@ export class TxProvingState {
|
|
|
108
109
|
const tubeData = new PublicTubeData(
|
|
109
110
|
this.processedTx.data.toPrivateToPublicKernelCircuitPublicInputs(),
|
|
110
111
|
this.tube.proof,
|
|
111
|
-
this.#
|
|
112
|
+
this.#getVkData(this.tube!.verificationKey, PUBLIC_TUBE_VK_INDEX),
|
|
112
113
|
);
|
|
113
114
|
|
|
114
115
|
const avmProofData = new AvmProofData(
|
|
115
116
|
this.processedTx.avmProvingRequest.inputs.publicInputs,
|
|
116
117
|
this.avm.proof,
|
|
117
|
-
this.#
|
|
118
|
+
this.#getVkData(this.avm!.verificationKey, AVM_VK_INDEX),
|
|
118
119
|
);
|
|
119
120
|
|
|
120
121
|
if (!(this.baseRollupHints instanceof PublicBaseRollupHints)) {
|
|
@@ -124,21 +125,8 @@ export class TxProvingState {
|
|
|
124
125
|
return new PublicBaseRollupInputs(tubeData, avmProofData, this.baseRollupHints);
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
#
|
|
128
|
-
let vkIndex = TUBE_VK_INDEX;
|
|
129
|
-
try {
|
|
130
|
-
vkIndex = getVKIndex(this.tube!.verificationKey);
|
|
131
|
-
} catch {
|
|
132
|
-
// TODO(#7410) The VK for the tube won't be in the tree for now, so we manually set it to the tube vk index
|
|
133
|
-
}
|
|
134
|
-
const vkPath = getVKSiblingPath(vkIndex);
|
|
135
|
-
|
|
136
|
-
return new VkData(this.tube!.verificationKey, vkIndex, vkPath);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
#getAvmVkData() {
|
|
140
|
-
const vkIndex = AVM_VK_INDEX;
|
|
128
|
+
#getVkData(verificationKey: VerificationKeyData, vkIndex: number) {
|
|
141
129
|
const vkPath = getVKSiblingPath(vkIndex);
|
|
142
|
-
return new VkData(
|
|
130
|
+
return new VkData(verificationKey, vkIndex, vkPath);
|
|
143
131
|
}
|
|
144
132
|
}
|