@aztec/stdlib 0.87.7 → 1.0.0-nightly.20250605
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 +1318 -33
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +37 -14
- 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 +103 -10
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +25 -10
- package/dest/avm/avm_proving_request.d.ts +648 -0
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/gas.d.ts +7 -0
- package/dest/avm/gas.d.ts.map +1 -0
- package/dest/avm/gas.js +13 -0
- package/dest/avm/index.d.ts +1 -0
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +1 -0
- 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/fees/transaction_fee.d.ts +5 -0
- package/dest/fees/transaction_fee.d.ts.map +1 -1
- package/dest/fees/transaction_fee.js +10 -3
- package/dest/interfaces/archiver.js +2 -2
- package/dest/interfaces/aztec-node.d.ts +3 -8
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +3 -6
- package/dest/interfaces/block-builder.d.ts +41 -2
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +1 -1
- package/dest/interfaces/epoch-prover.d.ts +2 -2
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +14 -0
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +6 -3
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -2
- package/dest/interfaces/proving-job.d.ts +652 -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_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/private_to_avm_accumulated_data.d.ts +1 -0
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +4 -0
- 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 +13 -3
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/log_with_tx_data.js +26 -14
- 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/messaging/index.d.ts +1 -0
- package/dest/messaging/index.d.ts.map +1 -1
- package/dest/messaging/index.js +1 -0
- package/dest/messaging/l2_to_l1_membership.d.ts +11 -0
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -0
- package/dest/messaging/l2_to_l1_membership.js +70 -0
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- 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 +53 -28
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +4 -3
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +2 -5
- 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/tx/tx_hash.d.ts +1 -0
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +3 -0
- 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 +37 -4
- package/src/avm/avm_accumulated_data.ts +93 -0
- package/src/avm/avm_circuit_public_inputs.ts +33 -3
- package/src/avm/gas.ts +26 -0
- package/src/avm/index.ts +1 -0
- 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/fees/transaction_fee.ts +12 -3
- package/src/interfaces/archiver.ts +2 -2
- package/src/interfaces/aztec-node.ts +8 -16
- package/src/interfaces/block-builder.ts +49 -2
- package/src/interfaces/epoch-prover.ts +2 -2
- package/src/interfaces/merkle_tree_operations.ts +20 -0
- package/src/interfaces/p2p.ts +9 -4
- 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_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/private_to_avm_accumulated_data.ts +9 -0
- 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 +26 -12
- 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/messaging/index.ts +1 -0
- package/src/messaging/l2_to_l1_membership.ts +113 -0
- package/src/p2p/consensus_payload.ts +3 -1
- 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 +82 -43
- package/src/tests/mocks.ts +6 -3
- package/src/tx/processed_tx.ts +4 -5
- package/src/tx/tx.ts +28 -54
- package/src/tx/tx_effect.ts +23 -5
- package/src/tx/tx_hash.ts +4 -0
- 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
|
@@ -7,12 +7,12 @@ import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
|
7
7
|
import { inspect } from 'util';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
10
|
-
import { Gas, GasSettings } from '../gas/index.js';
|
|
10
|
+
import { Gas, GasFees, 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.
|
|
@@ -21,7 +21,9 @@ export class AvmCircuitPublicInputs {
|
|
|
21
21
|
startTreeSnapshots;
|
|
22
22
|
startGasUsed;
|
|
23
23
|
gasSettings;
|
|
24
|
+
effectiveGasFees;
|
|
24
25
|
feePayer;
|
|
26
|
+
publicCallRequestArrayLengths;
|
|
25
27
|
publicSetupCallRequests;
|
|
26
28
|
publicAppLogicCallRequests;
|
|
27
29
|
publicTeardownCallRequest;
|
|
@@ -31,19 +33,22 @@ export class AvmCircuitPublicInputs {
|
|
|
31
33
|
previousRevertibleAccumulatedData;
|
|
32
34
|
endTreeSnapshots;
|
|
33
35
|
endGasUsed;
|
|
36
|
+
accumulatedDataArrayLengths;
|
|
34
37
|
accumulatedData;
|
|
35
38
|
transactionFee;
|
|
36
39
|
reverted;
|
|
37
40
|
constructor(///////////////////////////////////
|
|
38
41
|
// Inputs.
|
|
39
|
-
globalVariables, startTreeSnapshots, startGasUsed, gasSettings, feePayer, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, ///////////////////////////////////
|
|
42
|
+
globalVariables, startTreeSnapshots, startGasUsed, gasSettings, effectiveGasFees, feePayer, publicCallRequestArrayLengths, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, ///////////////////////////////////
|
|
40
43
|
// Outputs.
|
|
41
|
-
endTreeSnapshots, endGasUsed, accumulatedData, transactionFee, reverted){
|
|
44
|
+
endTreeSnapshots, endGasUsed, accumulatedDataArrayLengths, accumulatedData, transactionFee, reverted){
|
|
42
45
|
this.globalVariables = globalVariables;
|
|
43
46
|
this.startTreeSnapshots = startTreeSnapshots;
|
|
44
47
|
this.startGasUsed = startGasUsed;
|
|
45
48
|
this.gasSettings = gasSettings;
|
|
49
|
+
this.effectiveGasFees = effectiveGasFees;
|
|
46
50
|
this.feePayer = feePayer;
|
|
51
|
+
this.publicCallRequestArrayLengths = publicCallRequestArrayLengths;
|
|
47
52
|
this.publicSetupCallRequests = publicSetupCallRequests;
|
|
48
53
|
this.publicAppLogicCallRequests = publicAppLogicCallRequests;
|
|
49
54
|
this.publicTeardownCallRequest = publicTeardownCallRequest;
|
|
@@ -53,6 +58,7 @@ export class AvmCircuitPublicInputs {
|
|
|
53
58
|
this.previousRevertibleAccumulatedData = previousRevertibleAccumulatedData;
|
|
54
59
|
this.endTreeSnapshots = endTreeSnapshots;
|
|
55
60
|
this.endGasUsed = endGasUsed;
|
|
61
|
+
this.accumulatedDataArrayLengths = accumulatedDataArrayLengths;
|
|
56
62
|
this.accumulatedData = accumulatedData;
|
|
57
63
|
this.transactionFee = transactionFee;
|
|
58
64
|
this.reverted = reverted;
|
|
@@ -63,7 +69,9 @@ export class AvmCircuitPublicInputs {
|
|
|
63
69
|
startTreeSnapshots: TreeSnapshots.schema,
|
|
64
70
|
startGasUsed: Gas.schema,
|
|
65
71
|
gasSettings: GasSettings.schema,
|
|
72
|
+
effectiveGasFees: GasFees.schema,
|
|
66
73
|
feePayer: AztecAddress.schema,
|
|
74
|
+
publicCallRequestArrayLengths: PublicCallRequestArrayLengths.schema,
|
|
67
75
|
publicSetupCallRequests: PublicCallRequest.schema.array().max(MAX_ENQUEUED_CALLS_PER_TX),
|
|
68
76
|
publicAppLogicCallRequests: PublicCallRequest.schema.array().max(MAX_ENQUEUED_CALLS_PER_TX),
|
|
69
77
|
publicTeardownCallRequest: PublicCallRequest.schema,
|
|
@@ -73,17 +81,18 @@ export class AvmCircuitPublicInputs {
|
|
|
73
81
|
previousRevertibleAccumulatedData: PrivateToAvmAccumulatedData.schema,
|
|
74
82
|
endTreeSnapshots: TreeSnapshots.schema,
|
|
75
83
|
endGasUsed: Gas.schema,
|
|
84
|
+
accumulatedDataArrayLengths: AvmAccumulatedDataArrayLengths.schema,
|
|
76
85
|
accumulatedData: AvmAccumulatedData.schema,
|
|
77
86
|
transactionFee: schemas.Fr,
|
|
78
87
|
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));
|
|
88
|
+
}).transform(({ globalVariables, startTreeSnapshots, startGasUsed, gasSettings, effectiveGasFees, feePayer, publicCallRequestArrayLengths, publicSetupCallRequests, publicAppLogicCallRequests, publicTeardownCallRequest, previousNonRevertibleAccumulatedDataArrayLengths, previousRevertibleAccumulatedDataArrayLengths, previousNonRevertibleAccumulatedData, previousRevertibleAccumulatedData, endTreeSnapshots, endGasUsed, accumulatedDataArrayLengths, accumulatedData, transactionFee, reverted })=>new AvmCircuitPublicInputs(globalVariables, startTreeSnapshots, startGasUsed, gasSettings, effectiveGasFees, 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
89
|
}
|
|
81
90
|
static fromBuffer(buffer) {
|
|
82
91
|
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());
|
|
92
|
+
return new AvmCircuitPublicInputs(reader.readObject(GlobalVariables), reader.readObject(TreeSnapshots), reader.readObject(Gas), reader.readObject(GasSettings), reader.readObject(GasFees), 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
93
|
}
|
|
85
94
|
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);
|
|
95
|
+
return serializeToBuffer(this.globalVariables, this.startTreeSnapshots, this.startGasUsed, this.gasSettings, this.effectiveGasFees, 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
96
|
}
|
|
88
97
|
static fromString(str) {
|
|
89
98
|
return AvmCircuitPublicInputs.fromBuffer(hexToBuffer(str));
|
|
@@ -93,7 +102,7 @@ export class AvmCircuitPublicInputs {
|
|
|
93
102
|
}
|
|
94
103
|
static fromFields(fields) {
|
|
95
104
|
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());
|
|
105
|
+
return new AvmCircuitPublicInputs(GlobalVariables.fromFields(reader), TreeSnapshots.fromFields(reader), Gas.fromFields(reader), GasSettings.fromFields(reader), GasFees.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
106
|
}
|
|
98
107
|
toFields() {
|
|
99
108
|
return [
|
|
@@ -101,7 +110,9 @@ export class AvmCircuitPublicInputs {
|
|
|
101
110
|
...this.startTreeSnapshots.toFields(),
|
|
102
111
|
...this.startGasUsed.toFields(),
|
|
103
112
|
...this.gasSettings.toFields(),
|
|
113
|
+
...this.effectiveGasFees.toFields(),
|
|
104
114
|
this.feePayer,
|
|
115
|
+
...this.publicCallRequestArrayLengths.toFields(),
|
|
105
116
|
...this.publicSetupCallRequests.map((request)=>request.toFields()),
|
|
106
117
|
...this.publicAppLogicCallRequests.map((request)=>request.toFields()),
|
|
107
118
|
...this.publicTeardownCallRequest.toFields(),
|
|
@@ -111,13 +122,14 @@ export class AvmCircuitPublicInputs {
|
|
|
111
122
|
...this.previousRevertibleAccumulatedData.toFields(),
|
|
112
123
|
...this.endTreeSnapshots.toFields(),
|
|
113
124
|
...this.endGasUsed.toFields(),
|
|
125
|
+
...this.accumulatedDataArrayLengths.toFields(),
|
|
114
126
|
...this.accumulatedData.toFields(),
|
|
115
127
|
this.transactionFee,
|
|
116
128
|
this.reverted
|
|
117
129
|
];
|
|
118
130
|
}
|
|
119
131
|
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);
|
|
132
|
+
return new AvmCircuitPublicInputs(GlobalVariables.empty(), TreeSnapshots.empty(), Gas.empty(), GasSettings.empty(), GasFees.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
133
|
}
|
|
122
134
|
serializeWithMessagePack() {
|
|
123
135
|
return serializeWithMessagePack(this);
|
|
@@ -128,7 +140,9 @@ export class AvmCircuitPublicInputs {
|
|
|
128
140
|
startTreeSnapshots: ${inspect(this.startTreeSnapshots)},
|
|
129
141
|
startGasUsed: ${inspect(this.startGasUsed)},
|
|
130
142
|
gasSettings: ${inspect(this.gasSettings)},
|
|
143
|
+
effectiveGasFees: ${inspect(this.effectiveGasFees)},
|
|
131
144
|
feePayer: ${inspect(this.feePayer)},
|
|
145
|
+
publicCallRequestArrayLengths: ${inspect(this.publicCallRequestArrayLengths)},
|
|
132
146
|
publicSetupCallRequests: [${this.publicSetupCallRequests.filter((x)=>!x.isEmpty()).map((h)=>inspect(h)).join(', ')}]},
|
|
133
147
|
publicAppLogicCallRequests: [${this.publicAppLogicCallRequests.filter((x)=>!x.isEmpty()).map((h)=>inspect(h)).join(', ')}]},
|
|
134
148
|
publicTeardownCallRequest: ${inspect(this.publicTeardownCallRequest)},
|
|
@@ -138,6 +152,7 @@ export class AvmCircuitPublicInputs {
|
|
|
138
152
|
previousRevertibleAccumulatedData: ${inspect(this.previousRevertibleAccumulatedData)},
|
|
139
153
|
endTreeSnapshots: ${inspect(this.endTreeSnapshots)},
|
|
140
154
|
endGasUsed: ${inspect(this.endGasUsed)},
|
|
155
|
+
accumulatedDataArrayLengths: ${inspect(this.accumulatedDataArrayLengths)},
|
|
141
156
|
accumulatedData: ${inspect(this.accumulatedData)},
|
|
142
157
|
transactionFee: ${inspect(this.transactionFee)},
|
|
143
158
|
reverted: ${this.reverted},
|