@aztec/pxe 3.0.0-nightly.20251007 → 3.0.0-nightly.20251008
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/contract_function_simulator/contract_function_simulator.js +2 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +2 -13
- package/package.json +16 -16
- package/src/contract_function_simulator/contract_function_simulator.ts +2 -2
- package/src/private_kernel/private_kernel_execution_prover.ts +2 -16
|
@@ -5,7 +5,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
5
5
|
import { createLogger } from '@aztec/foundation/log';
|
|
6
6
|
import { Timer } from '@aztec/foundation/timer';
|
|
7
7
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
8
|
-
import {
|
|
8
|
+
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
9
9
|
import { ExecutionError, createSimulationError, extractCallStack, resolveAssertionMessageFromError, toACVMWitness, witnessMapToFields } from '@aztec/simulator/client';
|
|
10
10
|
import { FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
|
|
11
11
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
@@ -200,7 +200,7 @@ class OrderedSideEffect {
|
|
|
200
200
|
witness: execution.partialWitness
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
const constantData = new TxConstantData(privateExecutionResult.entrypoint.publicInputs.anchorBlockHeader, privateExecutionResult.entrypoint.publicInputs.txContext, getVKTreeRoot(),
|
|
203
|
+
const constantData = new TxConstantData(privateExecutionResult.entrypoint.publicInputs.anchorBlockHeader, privateExecutionResult.entrypoint.publicInputs.txContext, getVKTreeRoot(), protocolContractsHash);
|
|
204
204
|
const hasPublicCalls = privateExecutionResult.publicFunctionCalldata.length !== 0;
|
|
205
205
|
let inputsForRollup;
|
|
206
206
|
let inputsForPublic;
|
|
@@ -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":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAQL,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;YA0RrE,SAAS;YAST,qBAAqB;CA8BpC"}
|
|
@@ -4,9 +4,8 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
4
4
|
import { pushTestData } from '@aztec/foundation/testing';
|
|
5
5
|
import { Timer } from '@aztec/foundation/timer';
|
|
6
6
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
7
|
-
import {
|
|
7
|
+
import { ProtocolContractsList } from '@aztec/protocol-contracts';
|
|
8
8
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
|
-
import { computeContractAddressFromInstance } from '@aztec/stdlib/contract';
|
|
10
9
|
import { HidingKernelToPublicPrivateInputs, HidingKernelToRollupPrivateInputs, PaddedSideEffectAmounts, PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs, PrivateVerificationKeyHints } from '@aztec/stdlib/kernel';
|
|
11
10
|
import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
12
11
|
import { collectNoteHashLeafIndexMap, collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
|
|
@@ -101,7 +100,7 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
101
100
|
const privateCallData = await this.createPrivateCallData(currentExecution);
|
|
102
101
|
if (firstIteration) {
|
|
103
102
|
const witgenTimer = new Timer();
|
|
104
|
-
const proofInput = new PrivateKernelInitCircuitPrivateInputs(txRequest, getVKTreeRoot(),
|
|
103
|
+
const proofInput = new PrivateKernelInitCircuitPrivateInputs(txRequest, getVKTreeRoot(), ProtocolContractsList, privateCallData, isPrivateOnlyTx, executionResult.firstNullifier);
|
|
105
104
|
this.log.debug(`Calling private kernel init with isPrivateOnly ${isPrivateOnlyTx} and firstNullifierHint ${proofInput.firstNullifierHint}`);
|
|
106
105
|
pushTestData('private-kernel-inputs-init', proofInput);
|
|
107
106
|
output = generateWitnesses ? await this.proofCreator.generateInitOutput(proofInput) : await this.proofCreator.simulateInit(proofInput);
|
|
@@ -252,14 +251,6 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
252
251
|
const { currentContractClassId, publicKeys, saltedInitializationHash } = await this.oracle.getContractAddressPreimage(contractAddress);
|
|
253
252
|
const functionLeafMembershipWitness = await this.oracle.getFunctionMembershipWitness(currentContractClassId, functionSelector);
|
|
254
253
|
const { artifactHash: contractClassArtifactHash, publicBytecodeCommitment: contractClassPublicBytecodeCommitment } = await this.oracle.getContractClassIdPreimage(currentContractClassId);
|
|
255
|
-
// This will be the address computed in the kernel by the executed class. We need to provide non membership of it in the protocol contract tree.
|
|
256
|
-
// This would only be equal to contractAddress if the currentClassId is equal to the original class id (no update happened).
|
|
257
|
-
const computedAddress = await computeContractAddressFromInstance({
|
|
258
|
-
originalContractClassId: currentContractClassId,
|
|
259
|
-
saltedInitializationHash,
|
|
260
|
-
publicKeys
|
|
261
|
-
});
|
|
262
|
-
const { lowLeaf: protocolContractLeaf, witness: protocolContractMembershipWitness } = await getProtocolContractLeafAndMembershipWitness(contractAddress, computedAddress);
|
|
263
254
|
const updatedClassIdHints = await this.oracle.getUpdatedClassIdHints(contractAddress);
|
|
264
255
|
return PrivateCallData.from({
|
|
265
256
|
publicInputs,
|
|
@@ -270,8 +261,6 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
270
261
|
contractClassPublicBytecodeCommitment,
|
|
271
262
|
saltedInitializationHash,
|
|
272
263
|
functionLeafMembershipWitness,
|
|
273
|
-
protocolContractMembershipWitness,
|
|
274
|
-
protocolContractLeaf,
|
|
275
264
|
updatedClassIdHints
|
|
276
265
|
})
|
|
277
266
|
});
|
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.20251008",
|
|
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.20251008",
|
|
65
|
+
"@aztec/bb.js": "3.0.0-nightly.20251008",
|
|
66
|
+
"@aztec/builder": "3.0.0-nightly.20251008",
|
|
67
|
+
"@aztec/constants": "3.0.0-nightly.20251008",
|
|
68
|
+
"@aztec/ethereum": "3.0.0-nightly.20251008",
|
|
69
|
+
"@aztec/foundation": "3.0.0-nightly.20251008",
|
|
70
|
+
"@aztec/key-store": "3.0.0-nightly.20251008",
|
|
71
|
+
"@aztec/kv-store": "3.0.0-nightly.20251008",
|
|
72
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251008",
|
|
73
|
+
"@aztec/noir-types": "3.0.0-nightly.20251008",
|
|
74
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251008",
|
|
75
|
+
"@aztec/simulator": "3.0.0-nightly.20251008",
|
|
76
|
+
"@aztec/stdlib": "3.0.0-nightly.20251008",
|
|
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": "2.23.7"
|
|
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.20251008",
|
|
86
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20251008",
|
|
87
87
|
"@jest/globals": "^30.0.0",
|
|
88
88
|
"@types/jest": "^30.0.0",
|
|
89
89
|
"@types/lodash.omit": "^4.5.7",
|
|
@@ -22,7 +22,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
22
22
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
23
23
|
import { Timer } from '@aztec/foundation/timer';
|
|
24
24
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
25
|
-
import {
|
|
25
|
+
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
26
26
|
import {
|
|
27
27
|
type CircuitSimulator,
|
|
28
28
|
ExecutionError,
|
|
@@ -372,7 +372,7 @@ export async function generateSimulatedProvingResult(
|
|
|
372
372
|
privateExecutionResult.entrypoint.publicInputs.anchorBlockHeader,
|
|
373
373
|
privateExecutionResult.entrypoint.publicInputs.txContext,
|
|
374
374
|
getVKTreeRoot(),
|
|
375
|
-
|
|
375
|
+
protocolContractsHash,
|
|
376
376
|
);
|
|
377
377
|
|
|
378
378
|
const hasPublicCalls = privateExecutionResult.publicFunctionCalldata.length !== 0;
|
|
@@ -4,9 +4,8 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
4
4
|
import { pushTestData } from '@aztec/foundation/testing';
|
|
5
5
|
import { Timer } from '@aztec/foundation/timer';
|
|
6
6
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
7
|
-
import {
|
|
7
|
+
import { ProtocolContractsList } from '@aztec/protocol-contracts';
|
|
8
8
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
|
-
import { computeContractAddressFromInstance } from '@aztec/stdlib/contract';
|
|
10
9
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
11
10
|
import {
|
|
12
11
|
HidingKernelToPublicPrivateInputs,
|
|
@@ -168,7 +167,7 @@ export class PrivateKernelExecutionProver {
|
|
|
168
167
|
const proofInput = new PrivateKernelInitCircuitPrivateInputs(
|
|
169
168
|
txRequest,
|
|
170
169
|
getVKTreeRoot(),
|
|
171
|
-
|
|
170
|
+
ProtocolContractsList,
|
|
172
171
|
privateCallData,
|
|
173
172
|
isPrivateOnlyTx,
|
|
174
173
|
executionResult.firstNullifier,
|
|
@@ -392,17 +391,6 @@ export class PrivateKernelExecutionProver {
|
|
|
392
391
|
const { artifactHash: contractClassArtifactHash, publicBytecodeCommitment: contractClassPublicBytecodeCommitment } =
|
|
393
392
|
await this.oracle.getContractClassIdPreimage(currentContractClassId);
|
|
394
393
|
|
|
395
|
-
// This will be the address computed in the kernel by the executed class. We need to provide non membership of it in the protocol contract tree.
|
|
396
|
-
// This would only be equal to contractAddress if the currentClassId is equal to the original class id (no update happened).
|
|
397
|
-
const computedAddress = await computeContractAddressFromInstance({
|
|
398
|
-
originalContractClassId: currentContractClassId,
|
|
399
|
-
saltedInitializationHash,
|
|
400
|
-
publicKeys,
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
const { lowLeaf: protocolContractLeaf, witness: protocolContractMembershipWitness } =
|
|
404
|
-
await getProtocolContractLeafAndMembershipWitness(contractAddress, computedAddress);
|
|
405
|
-
|
|
406
394
|
const updatedClassIdHints = await this.oracle.getUpdatedClassIdHints(contractAddress);
|
|
407
395
|
return PrivateCallData.from({
|
|
408
396
|
publicInputs,
|
|
@@ -413,8 +401,6 @@ export class PrivateKernelExecutionProver {
|
|
|
413
401
|
contractClassPublicBytecodeCommitment,
|
|
414
402
|
saltedInitializationHash,
|
|
415
403
|
functionLeafMembershipWitness,
|
|
416
|
-
protocolContractMembershipWitness,
|
|
417
|
-
protocolContractLeaf,
|
|
418
404
|
updatedClassIdHints,
|
|
419
405
|
}),
|
|
420
406
|
});
|