@aztec/stdlib 1.0.0-nightly.20250607 → 1.0.0-nightly.20250610
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/block/l2_block.js +1 -1
- package/dest/hash/hash.d.ts +8 -2
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +8 -16
- package/dest/interfaces/epoch-prover.d.ts +3 -1
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +1 -1
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/service.d.ts +1 -1
- package/dest/interfaces/service.d.ts.map +1 -1
- package/dest/kernel/index.d.ts +0 -1
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +0 -1
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +9 -3
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts +3 -3
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/base_or_merge_rollup_public_inputs.js +3 -3
- package/dest/rollup/base_rollup_hints.d.ts +15 -14
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +13 -12
- package/dest/rollup/block_constant_data.d.ts +37 -0
- package/dest/rollup/block_constant_data.d.ts.map +1 -0
- package/dest/rollup/{constant_rollup_data.js → block_constant_data.js} +10 -13
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +12 -27
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.js +8 -15
- package/dest/rollup/block_root_rollup.d.ts +24 -9
- package/dest/rollup/block_root_rollup.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup.js +15 -7
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts +4 -4
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/empty_block_root_rollup_inputs.js +2 -2
- package/dest/rollup/epoch_constant_data.d.ts +39 -0
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -0
- package/dest/rollup/epoch_constant_data.js +40 -0
- package/dest/rollup/index.d.ts +2 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +2 -1
- package/dest/rollup/root_rollup.d.ts +7 -11
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/root_rollup.js +7 -10
- package/dest/snapshots/types.d.ts +4 -4
- package/dest/tests/factories.d.ts +1 -10
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +23 -36
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +3 -3
- package/dest/trees/append_only_tree_snapshot.d.ts +6 -2
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +17 -2
- package/dest/tx/block_header.js +3 -3
- package/dest/tx/content_commitment.d.ts +3 -0
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/tx/content_commitment.js +12 -1
- package/dest/tx/global_variables.js +1 -1
- package/dest/tx/index.d.ts +1 -0
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- package/dest/tx/offchain_message.d.ts +15 -0
- package/dest/tx/offchain_message.d.ts.map +1 -0
- package/dest/tx/offchain_message.js +4 -0
- package/dest/tx/partial_state_reference.d.ts +8 -0
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +19 -2
- package/dest/tx/private_execution_result.d.ts +18 -0
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +32 -2
- package/dest/tx/processed_tx.d.ts +2 -3
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +18 -8
- package/dest/tx/proposed_block_header.d.ts +3 -0
- package/dest/tx/proposed_block_header.d.ts.map +1 -1
- package/dest/tx/proposed_block_header.js +19 -1
- package/dest/tx/proven_tx.d.ts +2 -0
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +4 -1
- package/dest/tx/public_simulation_output.d.ts +3 -3
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +7 -7
- package/dest/tx/state_reference.d.ts +4 -0
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +20 -3
- package/dest/tx/tree_snapshots.js +3 -3
- package/dest/tx/tx.d.ts +1 -1
- package/dest/tx/tx.js +1 -1
- package/dest/tx/tx_hash.d.ts +1 -0
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +1 -0
- package/package.json +7 -7
- package/src/block/l2_block.ts +1 -1
- package/src/hash/hash.ts +16 -19
- package/src/interfaces/epoch-prover.ts +8 -2
- package/src/interfaces/service.ts +1 -1
- package/src/kernel/index.ts +0 -1
- package/src/p2p/consensus_payload.ts +13 -3
- package/src/rollup/base_or_merge_rollup_public_inputs.ts +4 -4
- package/src/rollup/base_rollup_hints.ts +12 -11
- package/src/rollup/block_constant_data.ts +63 -0
- package/src/rollup/block_root_or_block_merge_public_inputs.ts +10 -21
- package/src/rollup/block_root_rollup.ts +17 -5
- package/src/rollup/empty_block_root_rollup_inputs.ts +3 -3
- package/src/rollup/epoch_constant_data.ts +44 -0
- package/src/rollup/index.ts +2 -1
- package/src/rollup/root_rollup.ts +10 -12
- package/src/tests/factories.ts +36 -58
- package/src/tests/mocks.ts +3 -2
- package/src/trees/append_only_tree_snapshot.ts +18 -2
- package/src/tx/block_header.ts +3 -3
- package/src/tx/content_commitment.ts +19 -1
- package/src/tx/global_variables.ts +1 -1
- package/src/tx/index.ts +1 -0
- package/src/tx/offchain_message.ts +16 -0
- package/src/tx/partial_state_reference.ts +29 -4
- package/src/tx/private_execution_result.ts +30 -0
- package/src/tx/processed_tx.ts +26 -13
- package/src/tx/proposed_block_header.ts +31 -1
- package/src/tx/proven_tx.ts +10 -1
- package/src/tx/public_simulation_output.ts +5 -5
- package/src/tx/state_reference.ts +22 -3
- package/src/tx/tree_snapshots.ts +9 -9
- package/src/tx/tx.ts +1 -1
- package/src/tx/tx_hash.ts +1 -0
- package/dest/kernel/combined_constant_data.d.ts +0 -71
- package/dest/kernel/combined_constant_data.d.ts.map +0 -1
- package/dest/kernel/combined_constant_data.js +0 -73
- package/dest/rollup/constant_rollup_data.d.ts +0 -45
- package/dest/rollup/constant_rollup_data.d.ts.map +0 -1
- package/src/kernel/combined_constant_data.ts +0 -128
- package/src/rollup/constant_rollup_data.ts +0 -54
|
@@ -2,12 +2,14 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
2
2
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { NoteSelector } from '../abi/note_selector.js';
|
|
5
|
+
import { AztecAddress } from '../aztec-address/index.js';
|
|
5
6
|
import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inputs.js';
|
|
6
7
|
import type { IsEmpty } from '../kernel/utils/interfaces.js';
|
|
7
8
|
import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
|
|
8
9
|
import { Note } from '../note/note.js';
|
|
9
10
|
import { type ZodFor } from '../schemas/index.js';
|
|
10
11
|
import { HashedValues } from './hashed_values.js';
|
|
12
|
+
import type { OffchainMessage } from './offchain_message.js';
|
|
11
13
|
/**
|
|
12
14
|
* The contents of a new note.
|
|
13
15
|
*/
|
|
@@ -116,6 +118,11 @@ export declare class PrivateCallExecutionResult {
|
|
|
116
118
|
noteHashNullifierCounterMap: Map<number, number>;
|
|
117
119
|
/** The raw return values of the executed function. */
|
|
118
120
|
returnValues: Fr[];
|
|
121
|
+
/** The offchain messages emitted during execution of this function call via the `emit_offchain_message` oracle. */
|
|
122
|
+
offchainMessages: {
|
|
123
|
+
message: Fr[];
|
|
124
|
+
recipient: AztecAddress;
|
|
125
|
+
}[];
|
|
119
126
|
/** The nested executions. */
|
|
120
127
|
nestedExecutions: PrivateCallExecutionResult[];
|
|
121
128
|
/**
|
|
@@ -142,6 +149,11 @@ export declare class PrivateCallExecutionResult {
|
|
|
142
149
|
noteHashNullifierCounterMap: Map<number, number>,
|
|
143
150
|
/** The raw return values of the executed function. */
|
|
144
151
|
returnValues: Fr[],
|
|
152
|
+
/** The offchain messages emitted during execution of this function call via the `emit_offchain_message` oracle. */
|
|
153
|
+
offchainMessages: {
|
|
154
|
+
message: Fr[];
|
|
155
|
+
recipient: AztecAddress;
|
|
156
|
+
}[],
|
|
145
157
|
/** The nested executions. */
|
|
146
158
|
nestedExecutions: PrivateCallExecutionResult[],
|
|
147
159
|
/**
|
|
@@ -162,6 +174,12 @@ export declare function collectNoteHashNullifierCounterMap(execResult: PrivateEx
|
|
|
162
174
|
* @returns All contract class logs.
|
|
163
175
|
*/
|
|
164
176
|
export declare function collectSortedContractClassLogs(execResult: PrivateExecutionResult): ContractClassLogFields[];
|
|
177
|
+
/**
|
|
178
|
+
* Collect all offchain messages emitted across all nested executions.
|
|
179
|
+
* @param execResult - The execution result to collect messages from.
|
|
180
|
+
* @returns Array of offchain messages.
|
|
181
|
+
*/
|
|
182
|
+
export declare function collectOffchainMessages(execResult: PrivateExecutionResult): OffchainMessage[];
|
|
165
183
|
export declare function getFinalMinRevertibleSideEffectCounter(execResult: PrivateExecutionResult): number;
|
|
166
184
|
export declare function collectNested<T>(executionStack: PrivateCallExecutionResult[], extractExecutionItems: (execution: PrivateCallExecutionResult) => T[]): T[];
|
|
167
185
|
export declare class PrivateExecutionProfileResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_execution_result.d.ts","sourceRoot":"","sources":["../../src/tx/private_execution_result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD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3,7 @@ import { randomBytes, randomInt } from '@aztec/foundation/crypto';
|
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { NoteSelector } from '../abi/note_selector.js';
|
|
6
|
+
import { AztecAddress } from '../aztec-address/index.js';
|
|
6
7
|
import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inputs.js';
|
|
7
8
|
import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
|
|
8
9
|
import { ContractClassLog } from '../logs/contract_class_log.js';
|
|
@@ -96,12 +97,13 @@ export class PrivateExecutionResult {
|
|
|
96
97
|
newNotes;
|
|
97
98
|
noteHashNullifierCounterMap;
|
|
98
99
|
returnValues;
|
|
100
|
+
offchainMessages;
|
|
99
101
|
nestedExecutions;
|
|
100
102
|
contractClassLogs;
|
|
101
103
|
profileResult;
|
|
102
104
|
constructor(// Needed for prover
|
|
103
105
|
/** The ACIR bytecode. */ acir, /** The verification key. */ vk, /** The partial witness. */ partialWitness, // Needed for the verifier (kernel)
|
|
104
|
-
/** The call stack item. */ publicInputs, /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */ noteHashLeafIndexMap, /** The notes created in the executed function. */ newNotes, /** Mapping of note hash counter to the counter of its nullifier. */ noteHashNullifierCounterMap, /** The raw return values of the executed function. */ returnValues, /** The nested executions. */ nestedExecutions, /**
|
|
106
|
+
/** The call stack item. */ publicInputs, /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */ noteHashLeafIndexMap, /** The notes created in the executed function. */ newNotes, /** Mapping of note hash counter to the counter of its nullifier. */ noteHashNullifierCounterMap, /** The raw return values of the executed function. */ returnValues, /** The offchain messages emitted during execution of this function call via the `emit_offchain_message` oracle. */ offchainMessages, /** The nested executions. */ nestedExecutions, /**
|
|
105
107
|
* Contract class logs emitted during execution of this function call.
|
|
106
108
|
* Note: We only need to collect the ContractClassLogFields as preimages for the tx.
|
|
107
109
|
* But keep them as ContractClassLog so that we can verify the log hashes before submitting the tx (TODO).
|
|
@@ -114,6 +116,7 @@ export class PrivateExecutionResult {
|
|
|
114
116
|
this.newNotes = newNotes;
|
|
115
117
|
this.noteHashNullifierCounterMap = noteHashNullifierCounterMap;
|
|
116
118
|
this.returnValues = returnValues;
|
|
119
|
+
this.offchainMessages = offchainMessages;
|
|
117
120
|
this.nestedExecutions = nestedExecutions;
|
|
118
121
|
this.contractClassLogs = contractClassLogs;
|
|
119
122
|
this.profileResult = profileResult;
|
|
@@ -128,12 +131,16 @@ export class PrivateExecutionResult {
|
|
|
128
131
|
newNotes: z.array(NoteAndSlot.schema),
|
|
129
132
|
noteHashNullifierCounterMap: mapSchema(z.coerce.number(), z.number()),
|
|
130
133
|
returnValues: z.array(schemas.Fr),
|
|
134
|
+
offchainMessages: z.array(z.object({
|
|
135
|
+
message: z.array(schemas.Fr),
|
|
136
|
+
recipient: AztecAddress.schema
|
|
137
|
+
})),
|
|
131
138
|
nestedExecutions: z.array(z.lazy(()=>PrivateCallExecutionResult.schema)),
|
|
132
139
|
contractClassLogs: z.array(CountedContractClassLog.schema)
|
|
133
140
|
}).transform(PrivateCallExecutionResult.from);
|
|
134
141
|
}
|
|
135
142
|
static from(fields) {
|
|
136
|
-
return new PrivateCallExecutionResult(fields.acir, fields.vk, fields.partialWitness, fields.publicInputs, fields.noteHashLeafIndexMap, fields.newNotes, fields.noteHashNullifierCounterMap, fields.returnValues, fields.nestedExecutions, fields.contractClassLogs);
|
|
143
|
+
return new PrivateCallExecutionResult(fields.acir, fields.vk, fields.partialWitness, fields.publicInputs, fields.noteHashLeafIndexMap, fields.newNotes, fields.noteHashNullifierCounterMap, fields.returnValues, fields.offchainMessages, fields.nestedExecutions, fields.contractClassLogs);
|
|
137
144
|
}
|
|
138
145
|
static async random(nested = 1) {
|
|
139
146
|
return new PrivateCallExecutionResult(randomBytes(4), randomBytes(4), new Map([
|
|
@@ -155,6 +162,13 @@ export class PrivateExecutionResult {
|
|
|
155
162
|
]
|
|
156
163
|
]), [
|
|
157
164
|
Fr.random()
|
|
165
|
+
], [
|
|
166
|
+
{
|
|
167
|
+
message: [
|
|
168
|
+
Fr.random()
|
|
169
|
+
],
|
|
170
|
+
recipient: await AztecAddress.random()
|
|
171
|
+
}
|
|
158
172
|
], await timesParallel(nested, ()=>PrivateCallExecutionResult.random(0)), [
|
|
159
173
|
new CountedContractClassLog(await ContractClassLog.random(), randomInt(10))
|
|
160
174
|
]);
|
|
@@ -197,6 +211,22 @@ export function collectNoteHashNullifierCounterMap(execResult) {
|
|
|
197
211
|
const sortedLogs = sortByCounter(allLogs);
|
|
198
212
|
return sortedLogs.map((l)=>l.log.fields);
|
|
199
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Collect all offchain messages emitted across all nested executions.
|
|
216
|
+
* @param execResult - The execution result to collect messages from.
|
|
217
|
+
* @returns Array of offchain messages.
|
|
218
|
+
*/ export function collectOffchainMessages(execResult) {
|
|
219
|
+
const collectMessagesRecursive = (callResult)=>{
|
|
220
|
+
return [
|
|
221
|
+
...callResult.offchainMessages.map((msg)=>({
|
|
222
|
+
...msg,
|
|
223
|
+
contractAddress: callResult.publicInputs.callContext.contractAddress
|
|
224
|
+
})),
|
|
225
|
+
...callResult.nestedExecutions.flatMap((nested)=>collectMessagesRecursive(nested))
|
|
226
|
+
];
|
|
227
|
+
};
|
|
228
|
+
return collectMessagesRecursive(execResult.entrypoint);
|
|
229
|
+
}
|
|
200
230
|
export function getFinalMinRevertibleSideEffectCounter(execResult) {
|
|
201
231
|
const collectFinalMinRevertibleSideEffectCounterRecursive = (callResult)=>{
|
|
202
232
|
return callResult.nestedExecutions.reduce((counter, exec)=>{
|
|
@@ -4,7 +4,6 @@ import type { PublicDataWrite } from '../avm/public_data_write.js';
|
|
|
4
4
|
import { RevertCode } from '../avm/revert_code.js';
|
|
5
5
|
import type { SimulationError } from '../errors/simulation_error.js';
|
|
6
6
|
import type { GasUsed } from '../gas/gas_used.js';
|
|
7
|
-
import { CombinedConstantData } from '../kernel/combined_constant_data.js';
|
|
8
7
|
import type { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
9
8
|
import type { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
10
9
|
import type { GlobalVariables } from './global_variables.js';
|
|
@@ -38,9 +37,9 @@ export type ProcessedTx = {
|
|
|
38
37
|
*/
|
|
39
38
|
avmProvingRequest: AvmProvingRequest | undefined;
|
|
40
39
|
/**
|
|
41
|
-
*
|
|
40
|
+
* `GlobalVariables` injected by the sequencer. It's the same for all the txs in a block.
|
|
42
41
|
*/
|
|
43
|
-
|
|
42
|
+
globalVariables: GlobalVariables;
|
|
44
43
|
/**
|
|
45
44
|
* Output data of the tx.
|
|
46
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processed_tx.d.ts","sourceRoot":"","sources":["../../src/tx/processed_tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,
|
|
1
|
+
{"version":3,"file":"processed_tx.d.ts","sourceRoot":"","sources":["../../src/tx/processed_tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CA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AAe,EAAE,eAAe,GAC/B,OAAO,CAAC,WAAW,CAAC,CA4CtB;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,MAAM,CAI1D;AAED,wBAAsB,oCAAoC,CACxD,EAAE,EAAE,EAAE,EACN,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,eAAe,GAAG,SAAS,GACxC,OAAO,CAAC,WAAW,CAAC,CAkDtB"}
|
package/dest/tx/processed_tx.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RevertCode } from '../avm/revert_code.js';
|
|
2
2
|
import { Gas } from '../gas/gas.js';
|
|
3
|
-
import {
|
|
4
|
-
import { CombinedConstantData } from '../kernel/combined_constant_data.js';
|
|
3
|
+
import { computeL2ToL1MessageHash } from '../hash/hash.js';
|
|
5
4
|
import { TxEffect } from './tx_effect.js';
|
|
6
5
|
export var TxExecutionPhase = /*#__PURE__*/ function(TxExecutionPhase) {
|
|
7
6
|
TxExecutionPhase[TxExecutionPhase["SETUP"] = 0] = "SETUP";
|
|
@@ -10,9 +9,14 @@ export var TxExecutionPhase = /*#__PURE__*/ function(TxExecutionPhase) {
|
|
|
10
9
|
return TxExecutionPhase;
|
|
11
10
|
}({});
|
|
12
11
|
export async function makeProcessedTxFromPrivateOnlyTx(tx, transactionFee, feePaymentPublicDataWrite, globalVariables) {
|
|
13
|
-
const constants = CombinedConstantData.combine(tx.data.constants, globalVariables);
|
|
14
12
|
const data = tx.data.forRollup;
|
|
15
|
-
const txEffect = new TxEffect(RevertCode.OK, await tx.getTxHash(), transactionFee, data.end.noteHashes.filter((h)=>!h.isZero()), data.end.nullifiers.filter((h)=>!h.isZero()), data.end.l2ToL1Msgs.
|
|
13
|
+
const txEffect = new TxEffect(RevertCode.OK, await tx.getTxHash(), transactionFee, data.end.noteHashes.filter((h)=>!h.isZero()), data.end.nullifiers.filter((h)=>!h.isZero()), data.end.l2ToL1Msgs.filter((msg)=>!msg.contractAddress.isZero()).map((msg)=>computeL2ToL1MessageHash({
|
|
14
|
+
l2Sender: msg.contractAddress,
|
|
15
|
+
l1Recipient: msg.message.recipient,
|
|
16
|
+
content: msg.message.content,
|
|
17
|
+
rollupVersion: globalVariables.version,
|
|
18
|
+
chainId: globalVariables.chainId
|
|
19
|
+
})), [
|
|
16
20
|
feePaymentPublicDataWrite
|
|
17
21
|
], data.end.privateLogs.filter((l)=>!l.isEmpty()), [], tx.getContractClassLogs());
|
|
18
22
|
const gasUsed = {
|
|
@@ -27,7 +31,7 @@ export async function makeProcessedTxFromPrivateOnlyTx(tx, transactionFee, feePa
|
|
|
27
31
|
data: tx.data,
|
|
28
32
|
clientIvcProof: tx.clientIvcProof,
|
|
29
33
|
avmProvingRequest: undefined,
|
|
30
|
-
|
|
34
|
+
globalVariables,
|
|
31
35
|
txEffect,
|
|
32
36
|
gasUsed,
|
|
33
37
|
revertCode: RevertCode.OK,
|
|
@@ -41,20 +45,26 @@ export function toNumBlobFields(txs) {
|
|
|
41
45
|
}
|
|
42
46
|
export async function makeProcessedTxFromTxWithPublicCalls(tx, avmProvingRequest, gasUsed, revertCode, revertReason) {
|
|
43
47
|
const avmPublicInputs = avmProvingRequest.inputs.publicInputs;
|
|
44
|
-
const
|
|
48
|
+
const globalVariables = avmPublicInputs.globalVariables;
|
|
45
49
|
const publicDataWrites = avmPublicInputs.accumulatedData.publicDataWrites.filter((w)=>!w.isEmpty());
|
|
46
50
|
const privateLogs = [
|
|
47
51
|
...tx.data.forPublic.nonRevertibleAccumulatedData.privateLogs,
|
|
48
52
|
...revertCode.isOK() ? tx.data.forPublic.revertibleAccumulatedData.privateLogs : []
|
|
49
53
|
].filter((l)=>!l.isEmpty());
|
|
50
54
|
const contractClassLogs = revertCode.isOK() ? tx.getContractClassLogs() : tx.getSplitContractClassLogs(false);
|
|
51
|
-
const txEffect = new TxEffect(revertCode, await tx.getTxHash(), avmPublicInputs.transactionFee, avmPublicInputs.accumulatedData.noteHashes.filter((h)=>!h.isZero()), avmPublicInputs.accumulatedData.nullifiers.filter((h)=>!h.isZero()), avmPublicInputs.accumulatedData.l2ToL1Msgs.
|
|
55
|
+
const txEffect = new TxEffect(revertCode, await tx.getTxHash(), avmPublicInputs.transactionFee, avmPublicInputs.accumulatedData.noteHashes.filter((h)=>!h.isZero()), avmPublicInputs.accumulatedData.nullifiers.filter((h)=>!h.isZero()), avmPublicInputs.accumulatedData.l2ToL1Msgs.filter((msg)=>!msg.contractAddress.isZero()).map((msg)=>computeL2ToL1MessageHash({
|
|
56
|
+
l2Sender: msg.contractAddress,
|
|
57
|
+
l1Recipient: msg.message.recipient,
|
|
58
|
+
content: msg.message.content,
|
|
59
|
+
rollupVersion: globalVariables.version,
|
|
60
|
+
chainId: globalVariables.chainId
|
|
61
|
+
})), publicDataWrites, privateLogs, avmPublicInputs.accumulatedData.publicLogs.filter((l)=>!l.isEmpty()), contractClassLogs);
|
|
52
62
|
return {
|
|
53
63
|
hash: txEffect.txHash,
|
|
54
64
|
data: tx.data,
|
|
55
65
|
clientIvcProof: tx.clientIvcProof,
|
|
56
66
|
avmProvingRequest,
|
|
57
|
-
|
|
67
|
+
globalVariables,
|
|
58
68
|
txEffect,
|
|
59
69
|
gasUsed,
|
|
60
70
|
revertCode,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ViemHeader } from '@aztec/ethereum';
|
|
1
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
4
|
import type { ZodFor } from '@aztec/foundation/schemas';
|
|
@@ -57,6 +58,8 @@ export declare class ProposedBlockHeader {
|
|
|
57
58
|
*/
|
|
58
59
|
toString(): `0x${string}`;
|
|
59
60
|
static fromString(str: string): ProposedBlockHeader;
|
|
61
|
+
static fromViem(header: ViemHeader): ProposedBlockHeader;
|
|
62
|
+
toViem(): ViemHeader;
|
|
60
63
|
toInspect(): {
|
|
61
64
|
lastArchive: `0x${string}`;
|
|
62
65
|
contentCommitment: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposed_block_header.d.ts","sourceRoot":"","sources":["../../src/tx/proposed_block_header.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"proposed_block_header.d.ts","sourceRoot":"","sources":["../../src/tx/proposed_block_header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAuC,MAAM,6BAA6B,CAAC;AAEhG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,0CAA0C;AAC1C,qBAAa,mBAAmB;IAE5B,2DAA2D;IACpD,eAAe,EAAE,EAAE;IAC1B,0CAA0C;IACnC,iBAAiB,EAAE,iBAAiB;IAC3C,kCAAkC;IAC3B,UAAU,EAAE,EAAE;IACrB,iCAAiC;IAC1B,SAAS,EAAE,MAAM;IACxB,iCAAiC;IAC1B,QAAQ,EAAE,UAAU;IAC3B,+BAA+B;IACxB,YAAY,EAAE,YAAY;IACjC,wCAAwC;IACjC,OAAO,EAAE,OAAO;IACvB,wEAAwE;IACjE,aAAa,EAAE,EAAE;;IAfxB,2DAA2D;IACpD,eAAe,EAAE,EAAE;IAC1B,0CAA0C;IACnC,iBAAiB,EAAE,iBAAiB;IAC3C,kCAAkC;IAC3B,UAAU,EAAE,EAAE;IACrB,iCAAiC;IAC1B,SAAS,EAAE,MAAM;IACxB,iCAAiC;IAC1B,QAAQ,EAAE,UAAU;IAC3B,+BAA+B;IACxB,YAAY,EAAE,YAAY;IACjC,wCAAwC;IACjC,OAAO,EAAE,OAAO;IACvB,wEAAwE;IACjE,aAAa,EAAE,EAAE;IAG1B,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAa/C;IAED,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAatD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAIjD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,mBAAmB;IAerE,QAAQ;IAcR,IAAI,IAAI,EAAE;IAIV,MAAM,CAAC,KAAK,CAAC,MAAM,GAAE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAM,GAAG,mBAAmB;IActF,OAAO,IAAI,OAAO;IAalB;;;OAGG;IACI,QAAQ;IAIf,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB;IAInD,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU;IAalC,MAAM,IAAI,UAAU;IAgBpB,SAAS;;;;;;;;;;;;;;;;;;IAaT,CAAC,OAAO,CAAC,MAAM,CAAC;CAajB"}
|
|
@@ -60,7 +60,7 @@ import { ContentCommitment } from './content_commitment.js';
|
|
|
60
60
|
return new ProposedBlockHeader(reader.readObject(Fr), reader.readObject(ContentCommitment), Fr.fromBuffer(reader), reader.readUInt64(), reader.readObject(EthAddress), reader.readObject(AztecAddress), reader.readObject(GasFees), reader.readObject(Fr));
|
|
61
61
|
}
|
|
62
62
|
toBuffer() {
|
|
63
|
-
// Note: The order here must match the order in the
|
|
63
|
+
// Note: The order here must match the order in the ProposedHeaderLib solidity library.
|
|
64
64
|
return serializeToBuffer([
|
|
65
65
|
this.lastArchiveRoot,
|
|
66
66
|
this.contentCommitment,
|
|
@@ -102,6 +102,24 @@ import { ContentCommitment } from './content_commitment.js';
|
|
|
102
102
|
static fromString(str) {
|
|
103
103
|
return ProposedBlockHeader.fromBuffer(hexToBuffer(str));
|
|
104
104
|
}
|
|
105
|
+
static fromViem(header) {
|
|
106
|
+
return new ProposedBlockHeader(Fr.fromString(header.lastArchiveRoot), ContentCommitment.fromViem(header.contentCommitment), new Fr(header.slotNumber), header.timestamp, new EthAddress(hexToBuffer(header.coinbase)), new AztecAddress(hexToBuffer(header.feeRecipient)), new GasFees(header.gasFees.feePerDaGas, header.gasFees.feePerL2Gas), new Fr(header.totalManaUsed));
|
|
107
|
+
}
|
|
108
|
+
toViem() {
|
|
109
|
+
return {
|
|
110
|
+
lastArchiveRoot: this.lastArchiveRoot.toString(),
|
|
111
|
+
contentCommitment: this.contentCommitment.toViem(),
|
|
112
|
+
slotNumber: this.slotNumber.toBigInt(),
|
|
113
|
+
timestamp: this.timestamp,
|
|
114
|
+
coinbase: this.coinbase.toString(),
|
|
115
|
+
feeRecipient: `0x${this.feeRecipient.toBuffer().toString('hex').padStart(64, '0')}`,
|
|
116
|
+
gasFees: {
|
|
117
|
+
feePerDaGas: this.gasFees.feePerDaGas,
|
|
118
|
+
feePerL2Gas: this.gasFees.feePerL2Gas
|
|
119
|
+
},
|
|
120
|
+
totalManaUsed: this.totalManaUsed.toBigInt()
|
|
121
|
+
};
|
|
122
|
+
}
|
|
105
123
|
toInspect() {
|
|
106
124
|
return {
|
|
107
125
|
lastArchive: this.lastArchiveRoot.toString(),
|
package/dest/tx/proven_tx.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { FieldsOf } from '@aztec/foundation/types';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
4
4
|
import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
5
|
+
import type { OffchainMessage } from './offchain_message.js';
|
|
5
6
|
import { PrivateExecutionResult } from './private_execution_result.js';
|
|
6
7
|
import { type ProvingStats } from './profiling.js';
|
|
7
8
|
import { Tx } from './tx.js';
|
|
@@ -12,6 +13,7 @@ export declare class TxProvingResult {
|
|
|
12
13
|
stats?: ProvingStats | undefined;
|
|
13
14
|
constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, clientIvcProof: ClientIvcProof, stats?: ProvingStats | undefined);
|
|
14
15
|
toTx(): Tx;
|
|
16
|
+
getOffchainMessages(): OffchainMessage[];
|
|
15
17
|
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
16
18
|
privateExecutionResult: import("@aztec/foundation/schemas").ZodFor<PrivateExecutionResult>;
|
|
17
19
|
publicInputs: z.ZodType<PrivateKernelTailCircuitPublicInputs, any, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proven_tx.d.ts","sourceRoot":"","sources":["../../src/tx/proven_tx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"proven_tx.d.ts","sourceRoot":"","sources":["../../src/tx/proven_tx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EACL,sBAAsB,EAGvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qBAAa,eAAe;IAEjB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;IAClD,cAAc,EAAE,cAAc;IAC9B,KAAK,CAAC,EAAE,YAAY;gBAHpB,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC,EAClD,cAAc,EAAE,cAAc,EAC9B,KAAK,CAAC,EAAE,YAAY,YAAA;IAG7B,IAAI,IAAI,EAAE;IAYV,mBAAmB,IAAI,eAAe,EAAE;IAIxC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAShB;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC;WAIhC,MAAM;CAOpB"}
|
package/dest/tx/proven_tx.js
CHANGED
|
@@ -2,7 +2,7 @@ import { optional } from '@aztec/foundation/schemas';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
4
4
|
import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
5
|
-
import { PrivateExecutionResult, collectSortedContractClassLogs } from './private_execution_result.js';
|
|
5
|
+
import { PrivateExecutionResult, collectOffchainMessages, collectSortedContractClassLogs } from './private_execution_result.js';
|
|
6
6
|
import { ProvingTimingsSchema } from './profiling.js';
|
|
7
7
|
import { Tx } from './tx.js';
|
|
8
8
|
export class TxProvingResult {
|
|
@@ -21,6 +21,9 @@ export class TxProvingResult {
|
|
|
21
21
|
const tx = new Tx(this.publicInputs, this.clientIvcProof, contractClassLogs, this.privateExecutionResult.publicFunctionCalldata);
|
|
22
22
|
return tx;
|
|
23
23
|
}
|
|
24
|
+
getOffchainMessages() {
|
|
25
|
+
return collectOffchainMessages(this.privateExecutionResult);
|
|
26
|
+
}
|
|
24
27
|
static get schema() {
|
|
25
28
|
return z.object({
|
|
26
29
|
privateExecutionResult: PrivateExecutionResult.schema,
|
|
@@ -2,8 +2,8 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
2
2
|
import { type ZodFor } from '@aztec/foundation/schemas';
|
|
3
3
|
import { SimulationError } from '../errors/simulation_error.js';
|
|
4
4
|
import type { GasUsed } from '../gas/gas_used.js';
|
|
5
|
-
import { CombinedConstantData } from '../kernel/combined_constant_data.js';
|
|
6
5
|
import { TxEffect } from '../tx/tx_effect.js';
|
|
6
|
+
import { GlobalVariables } from './global_variables.js';
|
|
7
7
|
/** Return values of simulating a circuit. */
|
|
8
8
|
export type ProcessReturnValues = Fr[] | undefined;
|
|
9
9
|
/** Return values of simulating complete callstack. */
|
|
@@ -20,11 +20,11 @@ export declare class NestedProcessReturnValues {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare class PublicSimulationOutput {
|
|
22
22
|
revertReason: SimulationError | undefined;
|
|
23
|
-
|
|
23
|
+
globalVariables: GlobalVariables;
|
|
24
24
|
txEffect: TxEffect;
|
|
25
25
|
publicReturnValues: NestedProcessReturnValues[];
|
|
26
26
|
gasUsed: GasUsed;
|
|
27
|
-
constructor(revertReason: SimulationError | undefined,
|
|
27
|
+
constructor(revertReason: SimulationError | undefined, globalVariables: GlobalVariables, txEffect: TxEffect, publicReturnValues: NestedProcessReturnValues[], gasUsed: GasUsed);
|
|
28
28
|
static get schema(): ZodFor<PublicSimulationOutput>;
|
|
29
29
|
static random(): Promise<PublicSimulationOutput>;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public_simulation_output.d.ts","sourceRoot":"","sources":["../../src/tx/public_simulation_output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,2BAA2B,CAAC;AAKjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"public_simulation_output.d.ts","sourceRoot":"","sources":["../../src/tx/public_simulation_output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,2BAA2B,CAAC;AAKjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAAG,EAAE,EAAE,GAAG,SAAS,CAAC;AAEnD,sDAAsD;AACtD,qBAAa,yBAAyB;IACpC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,yBAAyB,EAAE,CAAC;gBAExB,MAAM,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,yBAAyB,EAAE;IAK7E,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,yBAAyB,CAAC,CAOrD;IAED,MAAM,CAAC,KAAK;IAIZ,MAAM,CAAC,MAAM,CAAC,KAAK,SAAI,GAAG,yBAAyB;CAMpD;AAED;;GAEG;AACH,qBAAa,sBAAsB;IAExB,YAAY,EAAE,eAAe,GAAG,SAAS;IACzC,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,QAAQ;IAClB,kBAAkB,EAAE,yBAAyB,EAAE;IAC/C,OAAO,EAAE,OAAO;gBAJhB,YAAY,EAAE,eAAe,GAAG,SAAS,EACzC,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,yBAAyB,EAAE,EAC/C,OAAO,EAAE,OAAO;IAGzB,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,sBAAsB,CAAC,CAwBlD;WAEY,MAAM;CASpB"}
|
|
@@ -4,8 +4,8 @@ import times from 'lodash.times';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { SimulationError } from '../errors/simulation_error.js';
|
|
6
6
|
import { Gas } from '../gas/gas.js';
|
|
7
|
-
import { CombinedConstantData } from '../kernel/combined_constant_data.js';
|
|
8
7
|
import { TxEffect } from '../tx/tx_effect.js';
|
|
8
|
+
import { GlobalVariables } from './global_variables.js';
|
|
9
9
|
/** Return values of simulating complete callstack. */ export class NestedProcessReturnValues {
|
|
10
10
|
values;
|
|
11
11
|
nested;
|
|
@@ -32,13 +32,13 @@ import { TxEffect } from '../tx/tx_effect.js';
|
|
|
32
32
|
* Outputs of processing the public component of a transaction.
|
|
33
33
|
*/ export class PublicSimulationOutput {
|
|
34
34
|
revertReason;
|
|
35
|
-
|
|
35
|
+
globalVariables;
|
|
36
36
|
txEffect;
|
|
37
37
|
publicReturnValues;
|
|
38
38
|
gasUsed;
|
|
39
|
-
constructor(revertReason,
|
|
39
|
+
constructor(revertReason, globalVariables, txEffect, publicReturnValues, gasUsed){
|
|
40
40
|
this.revertReason = revertReason;
|
|
41
|
-
this.
|
|
41
|
+
this.globalVariables = globalVariables;
|
|
42
42
|
this.txEffect = txEffect;
|
|
43
43
|
this.publicReturnValues = publicReturnValues;
|
|
44
44
|
this.gasUsed = gasUsed;
|
|
@@ -46,7 +46,7 @@ import { TxEffect } from '../tx/tx_effect.js';
|
|
|
46
46
|
static get schema() {
|
|
47
47
|
return z.object({
|
|
48
48
|
revertReason: SimulationError.schema.optional(),
|
|
49
|
-
|
|
49
|
+
globalVariables: GlobalVariables.schema,
|
|
50
50
|
txEffect: TxEffect.schema,
|
|
51
51
|
publicReturnValues: z.array(NestedProcessReturnValues.schema),
|
|
52
52
|
gasUsed: z.object({
|
|
@@ -55,10 +55,10 @@ import { TxEffect } from '../tx/tx_effect.js';
|
|
|
55
55
|
publicGas: Gas.schema,
|
|
56
56
|
billedGas: Gas.schema
|
|
57
57
|
})
|
|
58
|
-
}).transform((fields)=>new PublicSimulationOutput(fields.revertReason, fields.
|
|
58
|
+
}).transform((fields)=>new PublicSimulationOutput(fields.revertReason, fields.globalVariables, fields.txEffect, fields.publicReturnValues, fields.gasUsed));
|
|
59
59
|
}
|
|
60
60
|
static async random() {
|
|
61
|
-
return new PublicSimulationOutput(await SimulationError.random(),
|
|
61
|
+
return new PublicSimulationOutput(await SimulationError.random(), GlobalVariables.empty(), TxEffect.empty(), times(2, NestedProcessReturnValues.random), {
|
|
62
62
|
teardownGas: Gas.random(),
|
|
63
63
|
totalGas: Gas.random(),
|
|
64
64
|
publicGas: Gas.random(),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ViemStateReference } from '@aztec/ethereum';
|
|
1
2
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
3
4
|
import { inspect } from 'util';
|
|
@@ -149,7 +150,10 @@ export declare class StateReference {
|
|
|
149
150
|
toFields(): Fr[];
|
|
150
151
|
static fromBuffer(buffer: Buffer | BufferReader): StateReference;
|
|
151
152
|
static fromFields(fields: Fr[] | FieldReader): StateReference;
|
|
153
|
+
static fromViem(stateReference: ViemStateReference): StateReference;
|
|
152
154
|
static empty(): StateReference;
|
|
155
|
+
toViem(): ViemStateReference;
|
|
156
|
+
toAbi(): [ReturnType<AppendOnlyTreeSnapshot['toAbi']>, ReturnType<PartialStateReference['toAbi']>];
|
|
153
157
|
isEmpty(): boolean;
|
|
154
158
|
toInspect(): {
|
|
155
159
|
l1ToL2MessageTree: `0x${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state_reference.d.ts","sourceRoot":"","sources":["../../src/tx/state_reference.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAqB,MAAM,6BAA6B,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;GAEG;AACH,qBAAa,cAAc;IAEvB,6CAA6C;IACtC,iBAAiB,EAAE,sBAAsB;IAChD,0CAA0C;IACnC,OAAO,EAAE,qBAAqB;;IAHrC,6CAA6C;IACtC,iBAAiB,EAAE,sBAAsB;IAChD,0CAA0C;IACnC,OAAO,EAAE,qBAAqB;IAGvC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAOhB;IAED,OAAO;IAIP,QAAQ;IAKR,QAAQ,IAAI,EAAE,EAAE;IAUhB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,cAAc;IAKhE,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,cAAc;IAS7D,MAAM,CAAC,KAAK,IAAI,cAAc;IAI9B,OAAO,IAAI,OAAO;IAIlB,SAAS;;;;;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K,IAAI,cAAc;IAI9B,MAAM,IAAI,kBAAkB;IAO5B,KAAK,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;IAIlG,OAAO,IAAI,OAAO;IAIlB,SAAS;;;;;;IAST,CAAC,OAAO,CAAC,MAAM,CAAC;IAST,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO;CAGpC"}
|
|
@@ -23,7 +23,7 @@ import { PartialStateReference } from './partial_state_reference.js';
|
|
|
23
23
|
return this.l1ToL2MessageTree.getSize() + this.partial.getSize();
|
|
24
24
|
}
|
|
25
25
|
toBuffer() {
|
|
26
|
-
// Note: The order here must match the order in the
|
|
26
|
+
// Note: The order here must match the order in the ProposedHeaderLib solidity library.
|
|
27
27
|
return serializeToBuffer(this.l1ToL2MessageTree, this.partial);
|
|
28
28
|
}
|
|
29
29
|
toFields() {
|
|
@@ -46,11 +46,28 @@ import { PartialStateReference } from './partial_state_reference.js';
|
|
|
46
46
|
const partial = PartialStateReference.fromFields(reader);
|
|
47
47
|
return new StateReference(l1ToL2MessageTree, partial);
|
|
48
48
|
}
|
|
49
|
+
static fromViem(stateReference) {
|
|
50
|
+
return new StateReference(AppendOnlyTreeSnapshot.fromViem(stateReference.l1ToL2MessageTree), PartialStateReference.fromViem(stateReference.partialStateReference));
|
|
51
|
+
}
|
|
49
52
|
static empty() {
|
|
50
|
-
return new StateReference(AppendOnlyTreeSnapshot.
|
|
53
|
+
return new StateReference(AppendOnlyTreeSnapshot.empty(), PartialStateReference.empty());
|
|
54
|
+
}
|
|
55
|
+
toViem() {
|
|
56
|
+
return {
|
|
57
|
+
l1ToL2MessageTree: this.l1ToL2MessageTree.toViem(),
|
|
58
|
+
partialStateReference: this.partial.toViem()
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
toAbi() {
|
|
62
|
+
return [
|
|
63
|
+
this.l1ToL2MessageTree.toAbi(),
|
|
64
|
+
[
|
|
65
|
+
...this.partial.toAbi()
|
|
66
|
+
]
|
|
67
|
+
];
|
|
51
68
|
}
|
|
52
69
|
isEmpty() {
|
|
53
|
-
return this.l1ToL2MessageTree.
|
|
70
|
+
return this.l1ToL2MessageTree.isEmpty() && this.partial.isEmpty();
|
|
54
71
|
}
|
|
55
72
|
toInspect() {
|
|
56
73
|
return {
|
|
@@ -32,7 +32,7 @@ import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
|
32
32
|
return new TreeSnapshots(reader.readObject(AppendOnlyTreeSnapshot), reader.readObject(AppendOnlyTreeSnapshot), reader.readObject(AppendOnlyTreeSnapshot), reader.readObject(AppendOnlyTreeSnapshot));
|
|
33
33
|
}
|
|
34
34
|
toBuffer() {
|
|
35
|
-
// Note: The order here must match the order in the
|
|
35
|
+
// Note: The order here must match the order in the ProposedHeaderLib solidity library.
|
|
36
36
|
return serializeToBuffer(this.l1ToL2MessageTree, this.noteHashTree, this.nullifierTree, this.publicDataTree);
|
|
37
37
|
}
|
|
38
38
|
static fromFields(fields) {
|
|
@@ -56,10 +56,10 @@ import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
|
56
56
|
return fields;
|
|
57
57
|
}
|
|
58
58
|
static empty() {
|
|
59
|
-
return new TreeSnapshots(AppendOnlyTreeSnapshot.
|
|
59
|
+
return new TreeSnapshots(AppendOnlyTreeSnapshot.empty(), AppendOnlyTreeSnapshot.empty(), AppendOnlyTreeSnapshot.empty(), AppendOnlyTreeSnapshot.empty());
|
|
60
60
|
}
|
|
61
61
|
isEmpty() {
|
|
62
|
-
return this.l1ToL2MessageTree.
|
|
62
|
+
return this.l1ToL2MessageTree.isEmpty() && this.noteHashTree.isEmpty() && this.nullifierTree.isEmpty() && this.publicDataTree.isEmpty();
|
|
63
63
|
}
|
|
64
64
|
[inspect.custom]() {
|
|
65
65
|
return `TreeSnapshots {
|
package/dest/tx/tx.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ export declare class Tx extends Gossipable {
|
|
|
93
93
|
getContractClassLogs(): ContractClassLog[];
|
|
94
94
|
/**
|
|
95
95
|
* Gets either revertible or non revertible contract class logs emitted by this tx.
|
|
96
|
-
* @param revertible - true for revertible only logs, false for non
|
|
96
|
+
* @param revertible - true for revertible only logs, false for non revertible only logs.
|
|
97
97
|
* @returns The requested logs.
|
|
98
98
|
*/
|
|
99
99
|
getSplitContractClassLogs(revertible: boolean): ContractClassLog[];
|
package/dest/tx/tx.js
CHANGED
|
@@ -122,7 +122,7 @@ import { TxHash } from './tx_hash.js';
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Gets either revertible or non revertible contract class logs emitted by this tx.
|
|
125
|
-
* @param revertible - true for revertible only logs, false for non
|
|
125
|
+
* @param revertible - true for revertible only logs, false for non revertible only logs.
|
|
126
126
|
* @returns The requested logs.
|
|
127
127
|
*/ getSplitContractClassLogs(revertible) {
|
|
128
128
|
if (!this.data.forPublic) {
|
package/dest/tx/tx_hash.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
2
2
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
3
|
/**
|
|
4
4
|
* A class representing hash of Aztec transaction.
|
|
5
|
+
* @dev Computed by hashing the public inputs of the private kernel tail circuit (see Tx::getTxHash function).
|
|
5
6
|
*/
|
|
6
7
|
export declare class TxHash {
|
|
7
8
|
/** A field representing the tx hash (tx hash is an output of poseidon hash hence it's a field). */
|
package/dest/tx/tx_hash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx_hash.d.ts","sourceRoot":"","sources":["../../src/tx/tx_hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D
|
|
1
|
+
{"version":3,"file":"tx_hash.d.ts","sourceRoot":"","sources":["../../src/tx/tx_hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D;;;GAGG;AACH,qBAAa,MAAM;IAEf,mGAAmG;aACnF,IAAI,EAAE,EAAE;;IADxB,mGAAmG;IACnF,IAAI,EAAE,EAAE;IAG1B,MAAM,CAAC,MAAM;IAIb,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY;IAKnD,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM;IAI/B,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE;IAInB,QAAQ;IAIR,QAAQ;IAIR,QAAQ;IAIf,MAAM;IAIC,MAAM,CAAC,KAAK,EAAE,MAAM;IAI3B,MAAM,KAAK,MAAM,iNAEhB;IAED,MAAM,CAAC,IAAI;IAIX,MAAM,KAAK,IAAI,WAEd;CACF"}
|
package/dest/tx/tx_hash.js
CHANGED
|
@@ -3,6 +3,7 @@ import { BufferReader } from '@aztec/foundation/serialize';
|
|
|
3
3
|
import { schemas } from '../schemas/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* A class representing hash of Aztec transaction.
|
|
6
|
+
* @dev Computed by hashing the public inputs of the private kernel tail circuit (see Tx::getTxHash function).
|
|
6
7
|
*/ export class TxHash {
|
|
7
8
|
hash;
|
|
8
9
|
constructor(/** A field representing the tx hash (tx hash is an output of poseidon hash hence it's a field). */ hash){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250610",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@aztec/bb.js": "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/noir-noirc_abi": "1.0.0-nightly.
|
|
71
|
+
"@aztec/bb.js": "1.0.0-nightly.20250610",
|
|
72
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250610",
|
|
73
|
+
"@aztec/constants": "1.0.0-nightly.20250610",
|
|
74
|
+
"@aztec/ethereum": "1.0.0-nightly.20250610",
|
|
75
|
+
"@aztec/foundation": "1.0.0-nightly.20250610",
|
|
76
|
+
"@aztec/noir-noirc_abi": "1.0.0-nightly.20250610",
|
|
77
77
|
"@google-cloud/storage": "^7.15.0",
|
|
78
78
|
"axios": "^1.9.0",
|
|
79
79
|
"json-stringify-deterministic": "1.0.12",
|
package/src/block/l2_block.ts
CHANGED
|
@@ -103,7 +103,7 @@ export class L2Block {
|
|
|
103
103
|
* @returns The L2 block.
|
|
104
104
|
*/
|
|
105
105
|
static empty(): L2Block {
|
|
106
|
-
return new L2Block(AppendOnlyTreeSnapshot.
|
|
106
|
+
return new L2Block(AppendOnlyTreeSnapshot.empty(), BlockHeader.empty(), Body.empty());
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
get number(): number {
|