@aztec/stdlib 0.87.2 → 0.87.3-nightly.20250529
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/abi/abi.d.ts +3 -0
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +38 -0
- package/dest/avm/avm.d.ts +696 -12
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +16 -8
- package/dest/avm/avm_accumulated_data.d.ts +77 -0
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +67 -0
- package/dest/avm/avm_circuit_public_inputs.d.ts +73 -3
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +19 -9
- package/dest/avm/avm_proving_request.d.ts +366 -0
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/block/body.d.ts +1 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +2 -2
- package/dest/block/index.d.ts +1 -0
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -0
- package/dest/block/l2_block.d.ts +3 -2
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +10 -5
- package/dest/block/l2_block_source.d.ts +9 -4
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +1 -0
- package/dest/block/proposal/committee_attestation.d.ts +34 -0
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -0
- package/dest/block/proposal/committee_attestation.js +59 -0
- package/dest/block/proposal/index.d.ts +2 -0
- package/dest/block/proposal/index.d.ts.map +1 -0
- package/dest/block/proposal/index.js +1 -0
- package/dest/block/published_l2_block.d.ts +99 -69
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +38 -12
- package/dest/block/test/l2_tips_store_test_suite.js +1 -1
- package/dest/interfaces/archiver.js +2 -2
- package/dest/interfaces/aztec-node.js +2 -2
- package/dest/interfaces/p2p.d.ts +5 -2
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -2
- package/dest/interfaces/prover-agent.d.ts +31 -6
- package/dest/interfaces/prover-agent.d.ts.map +1 -1
- package/dest/interfaces/prover-agent.js +15 -6
- package/dest/interfaces/proving-job.d.ts +370 -4
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +2 -2
- package/dest/interfaces/server_circuit_prover.d.ts +3 -2
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -1
- package/dest/kernel/hints/key_validation_hint.d.ts +2 -6
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_hint.js +5 -7
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +7 -7
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.js +8 -4
- package/dest/kernel/hints/read_request_hints.d.ts +8 -8
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/index.d.ts +1 -0
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +1 -0
- package/dest/kernel/padded_side_effects.d.ts +26 -0
- package/dest/kernel/padded_side_effects.d.ts.map +1 -0
- package/dest/kernel/padded_side_effects.js +51 -0
- package/dest/kernel/private_kernel_data.d.ts +6 -25
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.js +8 -19
- package/dest/kernel/private_kernel_prover_output.d.ts +3 -0
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +7 -4
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.js +10 -6
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +10 -10
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.js +29 -29
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +10 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +8 -3
- package/dest/kernel/public_call_request.d.ts +54 -0
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +58 -0
- package/dest/logs/contract_class_log.d.ts +0 -4
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +0 -33
- package/dest/logs/log_with_tx_data.d.ts +3 -3
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/log_with_tx_data.js +9 -13
- package/dest/logs/pending_tagged_log.d.ts +1 -1
- package/dest/logs/pending_tagged_log.js +1 -1
- package/dest/logs/private_log.d.ts +1 -0
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +3 -0
- package/dest/logs/public_log.d.ts +1 -0
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +3 -0
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +1 -0
- package/dest/rollup/avm_proof_data.d.ts +7 -5
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +12 -4
- package/dest/rollup/base_rollup_hints.d.ts +4 -4
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +8 -8
- package/dest/rollup/previous_rollup_block_data.d.ts +6 -15
- package/dest/rollup/previous_rollup_block_data.d.ts.map +1 -1
- package/dest/rollup/previous_rollup_block_data.js +8 -13
- package/dest/rollup/previous_rollup_data.d.ts +6 -15
- package/dest/rollup/previous_rollup_data.d.ts.map +1 -1
- package/dest/rollup/previous_rollup_data.js +8 -13
- package/dest/rollup/private_tube_data.d.ts +3 -3
- package/dest/rollup/private_tube_data.d.ts.map +1 -1
- package/dest/rollup/private_tube_data.js +3 -3
- package/dest/rollup/public_tube_data.d.ts +3 -3
- package/dest/rollup/public_tube_data.d.ts.map +1 -1
- package/dest/rollup/public_tube_data.js +3 -3
- package/dest/rollup/root_rollup.d.ts +9 -10
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/root_rollup.js +9 -20
- package/dest/tests/factories.d.ts +2 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +25 -19
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +4 -3
- package/dest/tx/private_execution_result.d.ts +6 -0
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +2 -5
- package/dest/tx/profiling.d.ts +41 -0
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +4 -1
- package/dest/tx/proven_tx.d.ts +40 -18
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +2 -2
- package/dest/tx/tx.d.ts +10 -25
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +25 -50
- package/dest/tx/tx_effect.d.ts +1 -1
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +2 -2
- package/dest/validators/types.d.ts +4 -0
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/vks/index.d.ts +1 -1
- package/dest/vks/index.d.ts.map +1 -1
- package/dest/vks/index.js +1 -1
- package/dest/vks/{vk_witness_data.d.ts → vk_data.d.ts} +8 -8
- package/dest/vks/vk_data.d.ts.map +1 -0
- package/dest/vks/{vk_witness_data.js → vk_data.js} +10 -10
- package/package.json +7 -7
- package/src/abi/abi.ts +37 -0
- package/src/avm/avm.ts +14 -0
- package/src/avm/avm_accumulated_data.ts +93 -0
- package/src/avm/avm_circuit_public_inputs.ts +22 -2
- package/src/block/body.ts +7 -2
- package/src/block/index.ts +1 -0
- package/src/block/l2_block.ts +8 -3
- package/src/block/l2_block_source.ts +9 -3
- package/src/block/proposal/committee_attestation.ts +70 -0
- package/src/block/proposal/index.ts +1 -0
- package/src/block/published_l2_block.ts +38 -24
- package/src/block/test/l2_tips_store_test_suite.ts +1 -1
- package/src/interfaces/archiver.ts +2 -2
- package/src/interfaces/aztec-node.ts +2 -2
- package/src/interfaces/p2p.ts +8 -3
- package/src/interfaces/prover-agent.ts +9 -10
- package/src/interfaces/proving-job.ts +3 -3
- package/src/interfaces/server_circuit_prover.ts +3 -2
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +3 -3
- package/src/kernel/hints/key_validation_hint.ts +4 -6
- package/src/kernel/hints/private_kernel_reset_hints.ts +34 -43
- package/src/kernel/hints/read_request_hints.ts +27 -15
- package/src/kernel/index.ts +1 -0
- package/src/kernel/padded_side_effects.ts +73 -0
- package/src/kernel/private_kernel_data.ts +7 -29
- package/src/kernel/private_kernel_prover_output.ts +1 -0
- package/src/kernel/private_kernel_reset_circuit_private_inputs.ts +16 -13
- package/src/kernel/private_kernel_reset_dimensions.ts +27 -27
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +10 -2
- package/src/kernel/public_call_request.ts +66 -0
- package/src/logs/contract_class_log.ts +0 -36
- package/src/logs/log_with_tx_data.ts +7 -11
- package/src/logs/pending_tagged_log.ts +1 -1
- package/src/logs/private_log.ts +4 -0
- package/src/logs/public_log.ts +4 -0
- package/src/logs/tx_scoped_l2_log.ts +1 -0
- package/src/rollup/avm_proof_data.ts +14 -7
- package/src/rollup/base_rollup_hints.ts +4 -4
- package/src/rollup/previous_rollup_block_data.ts +6 -12
- package/src/rollup/previous_rollup_data.ts +6 -12
- package/src/rollup/private_tube_data.ts +4 -4
- package/src/rollup/public_tube_data.ts +4 -4
- package/src/rollup/root_rollup.ts +6 -19
- package/src/tests/factories.ts +36 -32
- package/src/tests/mocks.ts +6 -3
- package/src/tx/private_execution_result.ts +1 -1
- package/src/tx/processed_tx.ts +4 -5
- package/src/tx/profiling.ts +6 -1
- package/src/tx/proven_tx.ts +2 -2
- package/src/tx/tx.ts +28 -54
- package/src/tx/tx_effect.ts +23 -5
- package/src/validators/types.ts +2 -0
- package/src/vks/index.ts +1 -1
- package/src/vks/{vk_witness_data.ts → vk_data.ts} +6 -6
- package/dest/vks/vk_witness_data.d.ts.map +0 -1
|
@@ -9,10 +9,10 @@ import { z } from 'zod';
|
|
|
9
9
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
10
10
|
import { Gas, GasSettings } from '../gas/index.js';
|
|
11
11
|
import { PrivateToAvmAccumulatedData, PrivateToAvmAccumulatedDataArrayLengths } from '../kernel/private_to_avm_accumulated_data.js';
|
|
12
|
-
import { PublicCallRequest } from '../kernel/public_call_request.js';
|
|
12
|
+
import { PublicCallRequest, PublicCallRequestArrayLengths } from '../kernel/public_call_request.js';
|
|
13
13
|
import { GlobalVariables } from '../tx/global_variables.js';
|
|
14
14
|
import { TreeSnapshots } from '../tx/tree_snapshots.js';
|
|
15
|
-
import { AvmAccumulatedData } from './avm_accumulated_data.js';
|
|
15
|
+
import { AvmAccumulatedData, AvmAccumulatedDataArrayLengths } from './avm_accumulated_data.js';
|
|
16
16
|
import { serializeWithMessagePack } from './message_pack.js';
|
|
17
17
|
// Note: the {from,to}{Buffer,Fields,String} methods are needed by AvmProofData and PublicBaseRollupInputs.
|
|
18
18
|
// At some point it might be worth writing Zod schemas for all dependent types and get rid of that.
|
|
@@ -22,6 +22,7 @@ export class AvmCircuitPublicInputs {
|
|
|
22
22
|
startGasUsed;
|
|
23
23
|
gasSettings;
|
|
24
24
|
feePayer;
|
|
25
|
+
publicCallRequestArrayLengths;
|
|
25
26
|
publicSetupCallRequests;
|
|
26
27
|
publicAppLogicCallRequests;
|
|
27
28
|
publicTeardownCallRequest;
|
|
@@ -31,19 +32,21 @@ export class AvmCircuitPublicInputs {
|
|
|
31
32
|
previousRevertibleAccumulatedData;
|
|
32
33
|
endTreeSnapshots;
|
|
33
34
|
endGasUsed;
|
|
35
|
+
accumulatedDataArrayLengths;
|
|
34
36
|
accumulatedData;
|
|
35
37
|
transactionFee;
|
|
36
38
|
reverted;
|
|
37
39
|
constructor(///////////////////////////////////
|
|
38
40
|
// Inputs.
|
|
39
|
-
globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, ///////////////////////////////////
|
|
41
|
+
globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, publicCallRequestArrayLengths, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, ///////////////////////////////////
|
|
40
42
|
// Outputs.
|
|
41
|
-
endTreeSnapshots, endGasUsed, accumulatedData, transactionFee, reverted){
|
|
43
|
+
endTreeSnapshots, endGasUsed, accumulatedDataArrayLengths, accumulatedData, transactionFee, reverted){
|
|
42
44
|
this.globalVariables = globalVariables;
|
|
43
45
|
this.startTreeSnapshots = startTreeSnapshots;
|
|
44
46
|
this.startGasUsed = startGasUsed;
|
|
45
47
|
this.gasSettings = gasSettings;
|
|
46
48
|
this.feePayer = feePayer;
|
|
49
|
+
this.publicCallRequestArrayLengths = publicCallRequestArrayLengths;
|
|
47
50
|
this.publicSetupCallRequests = publicSetupCallRequests;
|
|
48
51
|
this.publicAppLogicCallRequests = publicAppLogicCallRequests;
|
|
49
52
|
this.publicTeardownCallRequest = publicTeardownCallRequest;
|
|
@@ -53,6 +56,7 @@ export class AvmCircuitPublicInputs {
|
|
|
53
56
|
this.previousRevertibleAccumulatedData = previousRevertibleAccumulatedData;
|
|
54
57
|
this.endTreeSnapshots = endTreeSnapshots;
|
|
55
58
|
this.endGasUsed = endGasUsed;
|
|
59
|
+
this.accumulatedDataArrayLengths = accumulatedDataArrayLengths;
|
|
56
60
|
this.accumulatedData = accumulatedData;
|
|
57
61
|
this.transactionFee = transactionFee;
|
|
58
62
|
this.reverted = reverted;
|
|
@@ -64,6 +68,7 @@ export class AvmCircuitPublicInputs {
|
|
|
64
68
|
startGasUsed: Gas.schema,
|
|
65
69
|
gasSettings: GasSettings.schema,
|
|
66
70
|
feePayer: AztecAddress.schema,
|
|
71
|
+
publicCallRequestArrayLengths: PublicCallRequestArrayLengths.schema,
|
|
67
72
|
publicSetupCallRequests: PublicCallRequest.schema.array().max(MAX_ENQUEUED_CALLS_PER_TX),
|
|
68
73
|
publicAppLogicCallRequests: PublicCallRequest.schema.array().max(MAX_ENQUEUED_CALLS_PER_TX),
|
|
69
74
|
publicTeardownCallRequest: PublicCallRequest.schema,
|
|
@@ -73,17 +78,18 @@ export class AvmCircuitPublicInputs {
|
|
|
73
78
|
previousRevertibleAccumulatedData: PrivateToAvmAccumulatedData.schema,
|
|
74
79
|
endTreeSnapshots: TreeSnapshots.schema,
|
|
75
80
|
endGasUsed: Gas.schema,
|
|
81
|
+
accumulatedDataArrayLengths: AvmAccumulatedDataArrayLengths.schema,
|
|
76
82
|
accumulatedData: AvmAccumulatedData.schema,
|
|
77
83
|
transactionFee: schemas.Fr,
|
|
78
84
|
reverted: z.boolean()
|
|
79
|
-
}).transform(({ globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, endTreeSnapshots, endGasUsed, accumulatedData, transactionFee, reverted })=>new AvmCircuitPublicInputs(globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, assertLength(publicSetupCallRequests, MAX_ENQUEUED_CALLS_PER_TX), assertLength(publicAppLogicCallRequests, MAX_ENQUEUED_CALLS_PER_TX), publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, endTreeSnapshots, endGasUsed, accumulatedData, transactionFee, reverted));
|
|
85
|
+
}).transform(({ globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, publicCallRequestArrayLengths, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, endTreeSnapshots, endGasUsed, accumulatedDataArrayLengths, accumulatedData, transactionFee, reverted })=>new AvmCircuitPublicInputs(globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, publicCallRequestArrayLengths, assertLength(publicSetupCallRequests, MAX_ENQUEUED_CALLS_PER_TX), assertLength(publicAppLogicCallRequests, MAX_ENQUEUED_CALLS_PER_TX), publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, endTreeSnapshots, endGasUsed, accumulatedDataArrayLengths, accumulatedData, transactionFee, reverted));
|
|
80
86
|
}
|
|
81
87
|
static fromBuffer(buffer) {
|
|
82
88
|
const reader = BufferReader.asReader(buffer);
|
|
83
|
-
return new AvmCircuitPublicInputs(reader.readObject(GlobalVariables), reader.readObject(TreeSnapshots), reader.readObject(Gas), reader.readObject(GasSettings), reader.readObject(AztecAddress), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), reader.readObject(PublicCallRequest), reader.readObject(PrivateToAvmAccumulatedDataArrayLengths), reader.readObject(PrivateToAvmAccumulatedDataArrayLengths), reader.readObject(PrivateToAvmAccumulatedData), reader.readObject(PrivateToAvmAccumulatedData), reader.readObject(TreeSnapshots), reader.readObject(Gas), reader.readObject(AvmAccumulatedData), reader.readObject(Fr), reader.readBoolean());
|
|
89
|
+
return new AvmCircuitPublicInputs(reader.readObject(GlobalVariables), reader.readObject(TreeSnapshots), reader.readObject(Gas), reader.readObject(GasSettings), reader.readObject(AztecAddress), reader.readObject(PublicCallRequestArrayLengths), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), reader.readObject(PublicCallRequest), reader.readObject(PrivateToAvmAccumulatedDataArrayLengths), reader.readObject(PrivateToAvmAccumulatedDataArrayLengths), reader.readObject(PrivateToAvmAccumulatedData), reader.readObject(PrivateToAvmAccumulatedData), reader.readObject(TreeSnapshots), reader.readObject(Gas), reader.readObject(AvmAccumulatedDataArrayLengths), reader.readObject(AvmAccumulatedData), reader.readObject(Fr), reader.readBoolean());
|
|
84
90
|
}
|
|
85
91
|
toBuffer() {
|
|
86
|
-
return serializeToBuffer(this.globalVariables, this.startTreeSnapshots, this.startGasUsed, this.gasSettings, this.feePayer, this.publicSetupCallRequests, this.publicAppLogicCallRequests, this.publicTeardownCallRequest, this.previousNonRevertibleAccumulatedDataArrayLengths, this.previousRevertibleAccumulatedDataArrayLengths, this.previousNonRevertibleAccumulatedData, this.previousRevertibleAccumulatedData, this.endTreeSnapshots, this.endGasUsed, this.accumulatedData, this.transactionFee, this.reverted);
|
|
92
|
+
return serializeToBuffer(this.globalVariables, this.startTreeSnapshots, this.startGasUsed, this.gasSettings, this.feePayer, this.publicCallRequestArrayLengths, this.publicSetupCallRequests, this.publicAppLogicCallRequests, this.publicTeardownCallRequest, this.previousNonRevertibleAccumulatedDataArrayLengths, this.previousRevertibleAccumulatedDataArrayLengths, this.previousNonRevertibleAccumulatedData, this.previousRevertibleAccumulatedData, this.endTreeSnapshots, this.endGasUsed, this.accumulatedDataArrayLengths, this.accumulatedData, this.transactionFee, this.reverted);
|
|
87
93
|
}
|
|
88
94
|
static fromString(str) {
|
|
89
95
|
return AvmCircuitPublicInputs.fromBuffer(hexToBuffer(str));
|
|
@@ -93,7 +99,7 @@ export class AvmCircuitPublicInputs {
|
|
|
93
99
|
}
|
|
94
100
|
static fromFields(fields) {
|
|
95
101
|
const reader = FieldReader.asReader(fields);
|
|
96
|
-
return new AvmCircuitPublicInputs(GlobalVariables.fromFields(reader), TreeSnapshots.fromFields(reader), Gas.fromFields(reader), GasSettings.fromFields(reader), AztecAddress.fromFields(reader), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), PublicCallRequest.fromFields(reader), PrivateToAvmAccumulatedDataArrayLengths.fromFields(reader), PrivateToAvmAccumulatedDataArrayLengths.fromFields(reader), PrivateToAvmAccumulatedData.fromFields(reader), PrivateToAvmAccumulatedData.fromFields(reader), TreeSnapshots.fromFields(reader), Gas.fromFields(reader), AvmAccumulatedData.fromFields(reader), reader.readField(), reader.readBoolean());
|
|
102
|
+
return new AvmCircuitPublicInputs(GlobalVariables.fromFields(reader), TreeSnapshots.fromFields(reader), Gas.fromFields(reader), GasSettings.fromFields(reader), AztecAddress.fromFields(reader), PublicCallRequestArrayLengths.fromFields(reader), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest), PublicCallRequest.fromFields(reader), PrivateToAvmAccumulatedDataArrayLengths.fromFields(reader), PrivateToAvmAccumulatedDataArrayLengths.fromFields(reader), PrivateToAvmAccumulatedData.fromFields(reader), PrivateToAvmAccumulatedData.fromFields(reader), TreeSnapshots.fromFields(reader), Gas.fromFields(reader), AvmAccumulatedDataArrayLengths.fromFields(reader), AvmAccumulatedData.fromFields(reader), reader.readField(), reader.readBoolean());
|
|
97
103
|
}
|
|
98
104
|
toFields() {
|
|
99
105
|
return [
|
|
@@ -102,6 +108,7 @@ export class AvmCircuitPublicInputs {
|
|
|
102
108
|
...this.startGasUsed.toFields(),
|
|
103
109
|
...this.gasSettings.toFields(),
|
|
104
110
|
this.feePayer,
|
|
111
|
+
...this.publicCallRequestArrayLengths.toFields(),
|
|
105
112
|
...this.publicSetupCallRequests.map((request)=>request.toFields()),
|
|
106
113
|
...this.publicAppLogicCallRequests.map((request)=>request.toFields()),
|
|
107
114
|
...this.publicTeardownCallRequest.toFields(),
|
|
@@ -111,13 +118,14 @@ export class AvmCircuitPublicInputs {
|
|
|
111
118
|
...this.previousRevertibleAccumulatedData.toFields(),
|
|
112
119
|
...this.endTreeSnapshots.toFields(),
|
|
113
120
|
...this.endGasUsed.toFields(),
|
|
121
|
+
...this.accumulatedDataArrayLengths.toFields(),
|
|
114
122
|
...this.accumulatedData.toFields(),
|
|
115
123
|
this.transactionFee,
|
|
116
124
|
this.reverted
|
|
117
125
|
];
|
|
118
126
|
}
|
|
119
127
|
static empty() {
|
|
120
|
-
return new AvmCircuitPublicInputs(GlobalVariables.empty(), TreeSnapshots.empty(), Gas.empty(), GasSettings.empty(), AztecAddress.zero(), makeTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest.empty), makeTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest.empty), PublicCallRequest.empty(), PrivateToAvmAccumulatedDataArrayLengths.empty(), PrivateToAvmAccumulatedDataArrayLengths.empty(), PrivateToAvmAccumulatedData.empty(), PrivateToAvmAccumulatedData.empty(), TreeSnapshots.empty(), Gas.empty(), AvmAccumulatedData.empty(), Fr.zero(), false);
|
|
128
|
+
return new AvmCircuitPublicInputs(GlobalVariables.empty(), TreeSnapshots.empty(), Gas.empty(), GasSettings.empty(), AztecAddress.zero(), PublicCallRequestArrayLengths.empty(), makeTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest.empty), makeTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest.empty), PublicCallRequest.empty(), PrivateToAvmAccumulatedDataArrayLengths.empty(), PrivateToAvmAccumulatedDataArrayLengths.empty(), PrivateToAvmAccumulatedData.empty(), PrivateToAvmAccumulatedData.empty(), TreeSnapshots.empty(), Gas.empty(), AvmAccumulatedDataArrayLengths.empty(), AvmAccumulatedData.empty(), Fr.zero(), false);
|
|
121
129
|
}
|
|
122
130
|
serializeWithMessagePack() {
|
|
123
131
|
return serializeWithMessagePack(this);
|
|
@@ -129,6 +137,7 @@ export class AvmCircuitPublicInputs {
|
|
|
129
137
|
startGasUsed: ${inspect(this.startGasUsed)},
|
|
130
138
|
gasSettings: ${inspect(this.gasSettings)},
|
|
131
139
|
feePayer: ${inspect(this.feePayer)},
|
|
140
|
+
publicCallRequestArrayLengths: ${inspect(this.publicCallRequestArrayLengths)},
|
|
132
141
|
publicSetupCallRequests: [${this.publicSetupCallRequests.filter((x)=>!x.isEmpty()).map((h)=>inspect(h)).join(', ')}]},
|
|
133
142
|
publicAppLogicCallRequests: [${this.publicAppLogicCallRequests.filter((x)=>!x.isEmpty()).map((h)=>inspect(h)).join(', ')}]},
|
|
134
143
|
publicTeardownCallRequest: ${inspect(this.publicTeardownCallRequest)},
|
|
@@ -138,6 +147,7 @@ export class AvmCircuitPublicInputs {
|
|
|
138
147
|
previousRevertibleAccumulatedData: ${inspect(this.previousRevertibleAccumulatedData)},
|
|
139
148
|
endTreeSnapshots: ${inspect(this.endTreeSnapshots)},
|
|
140
149
|
endGasUsed: ${inspect(this.endGasUsed)},
|
|
150
|
+
accumulatedDataArrayLengths: ${inspect(this.accumulatedDataArrayLengths)},
|
|
141
151
|
accumulatedData: ${inspect(this.accumulatedData)},
|
|
142
152
|
transactionFee: ${inspect(this.transactionFee)},
|
|
143
153
|
reverted: ${this.reverted},
|