@aztec/stdlib 4.2.0-nightly.20260319 → 4.2.0-nightly.20260320
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/avm/avm_accumulated_data.js +2 -2
- package/dest/avm/avm_circuit_public_inputs.js +2 -2
- package/dest/checkpoint/validate.js +2 -2
- package/dest/hash/hash.d.ts +16 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +24 -0
- package/dest/interfaces/aztec-node-admin.d.ts +1 -4
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.d.ts +2 -1
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/block-builder.d.ts +26 -7
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +1 -4
- package/dest/interfaces/configs.d.ts +2 -7
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +0 -1
- package/dest/kernel/claimed_length_array.js +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.js +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +2 -2
- package/dest/kernel/private_to_public_accumulated_data.js +2 -2
- package/dest/kernel/private_to_rollup_accumulated_data.js +1 -1
- package/dest/logs/private_log.js +1 -1
- package/dest/logs/public_log.d.ts +1 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +7 -1
- package/dest/noir/index.d.ts +3 -3
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +1 -1
- package/dest/proofs/chonk_proof.d.ts +1 -1
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +7 -1
- package/dest/rollup/base_rollup_hints.js +2 -2
- package/dest/rollup/block_root_rollup_private_inputs.js +5 -5
- package/dest/rollup/checkpoint_rollup_public_inputs.js +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +3 -3
- package/dest/rollup/root_rollup_public_inputs.js +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.js +2 -2
- package/dest/tx/protocol_contracts.js +2 -2
- package/dest/vks/vk_data.js +1 -1
- package/package.json +9 -9
- package/src/avm/avm_accumulated_data.ts +6 -6
- package/src/avm/avm_circuit_public_inputs.ts +4 -4
- package/src/checkpoint/validate.ts +2 -2
- package/src/hash/hash.ts +29 -0
- package/src/interfaces/aztec-node.ts +1 -0
- package/src/interfaces/block-builder.ts +27 -9
- package/src/interfaces/configs.ts +1 -6
- package/src/kernel/claimed_length_array.ts +2 -2
- package/src/kernel/hints/private_kernel_reset_hints.ts +5 -2
- package/src/kernel/hints/read_request_hints.ts +3 -3
- package/src/kernel/padded_side_effects.ts +3 -3
- package/src/kernel/private_to_avm_accumulated_data.ts +4 -4
- package/src/kernel/private_to_public_accumulated_data.ts +10 -10
- package/src/kernel/private_to_rollup_accumulated_data.ts +5 -5
- package/src/logs/private_log.ts +1 -1
- package/src/logs/public_log.ts +11 -1
- package/src/noir/index.ts +2 -2
- package/src/parity/parity_base_private_inputs.ts +1 -1
- package/src/proofs/chonk_proof.ts +9 -1
- package/src/rollup/base_rollup_hints.ts +2 -2
- package/src/rollup/block_root_rollup_private_inputs.ts +8 -8
- package/src/rollup/checkpoint_rollup_public_inputs.ts +2 -2
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +4 -4
- package/src/rollup/root_rollup_public_inputs.ts +2 -2
- package/src/rollup/tree_snapshot_diff_hints.ts +5 -5
- package/src/tx/protocol_contracts.ts +2 -2
- package/src/vks/vk_data.ts +1 -1
|
@@ -73,7 +73,7 @@ export class PrivateToAvmAccumulatedData {
|
|
|
73
73
|
return new this(
|
|
74
74
|
reader.readFieldArray(MAX_NOTE_HASHES_PER_TX),
|
|
75
75
|
reader.readFieldArray(MAX_NULLIFIERS_PER_TX),
|
|
76
|
-
reader.
|
|
76
|
+
reader.readTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -94,9 +94,9 @@ export class PrivateToAvmAccumulatedData {
|
|
|
94
94
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
95
95
|
const reader = BufferReader.asReader(buffer);
|
|
96
96
|
return new PrivateToAvmAccumulatedData(
|
|
97
|
-
reader.
|
|
98
|
-
reader.
|
|
99
|
-
reader.
|
|
97
|
+
reader.readTuple(MAX_NOTE_HASHES_PER_TX, Fr),
|
|
98
|
+
reader.readTuple(MAX_NULLIFIERS_PER_TX, Fr),
|
|
99
|
+
reader.readTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -62,10 +62,10 @@ export class PrivateToPublicAccumulatedData {
|
|
|
62
62
|
return new this(
|
|
63
63
|
reader.readFieldArray(MAX_NOTE_HASHES_PER_TX),
|
|
64
64
|
reader.readFieldArray(MAX_NULLIFIERS_PER_TX),
|
|
65
|
-
reader.
|
|
66
|
-
reader.
|
|
67
|
-
reader.
|
|
68
|
-
reader.
|
|
65
|
+
reader.readTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
66
|
+
reader.readTuple(MAX_PRIVATE_LOGS_PER_TX, PrivateLog),
|
|
67
|
+
reader.readTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedLogHash),
|
|
68
|
+
reader.readTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -76,12 +76,12 @@ export class PrivateToPublicAccumulatedData {
|
|
|
76
76
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
77
77
|
const reader = BufferReader.asReader(buffer);
|
|
78
78
|
return new PrivateToPublicAccumulatedData(
|
|
79
|
-
reader.
|
|
80
|
-
reader.
|
|
81
|
-
reader.
|
|
82
|
-
reader.
|
|
83
|
-
reader.
|
|
84
|
-
reader.
|
|
79
|
+
reader.readTuple(MAX_NOTE_HASHES_PER_TX, Fr),
|
|
80
|
+
reader.readTuple(MAX_NULLIFIERS_PER_TX, Fr),
|
|
81
|
+
reader.readTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
82
|
+
reader.readTuple(MAX_PRIVATE_LOGS_PER_TX, PrivateLog),
|
|
83
|
+
reader.readTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedLogHash),
|
|
84
|
+
reader.readTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -95,11 +95,11 @@ export class PrivateToRollupAccumulatedData {
|
|
|
95
95
|
static fromBuffer(buffer: Buffer | BufferReader): PrivateToRollupAccumulatedData {
|
|
96
96
|
const reader = BufferReader.asReader(buffer);
|
|
97
97
|
return new PrivateToRollupAccumulatedData(
|
|
98
|
-
reader.
|
|
99
|
-
reader.
|
|
100
|
-
reader.
|
|
101
|
-
reader.
|
|
102
|
-
reader.
|
|
98
|
+
reader.readTuple(MAX_NOTE_HASHES_PER_TX, Fr),
|
|
99
|
+
reader.readTuple(MAX_NULLIFIERS_PER_TX, Fr),
|
|
100
|
+
reader.readTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
101
|
+
reader.readTuple(MAX_PRIVATE_LOGS_PER_TX, PrivateLog),
|
|
102
|
+
reader.readTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedLogHash),
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
|
package/src/logs/private_log.ts
CHANGED
|
@@ -73,7 +73,7 @@ export class PrivateLog {
|
|
|
73
73
|
|
|
74
74
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
75
75
|
const reader = BufferReader.asReader(buffer);
|
|
76
|
-
return new PrivateLog(reader.
|
|
76
|
+
return new PrivateLog(reader.readTuple(PRIVATE_LOG_SIZE_IN_FIELDS, Fr), reader.readNumber());
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
static random(tag = Fr.random()) {
|
package/src/logs/public_log.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH,
|
|
3
|
+
MAX_PUBLIC_LOG_SIZE_IN_FIELDS,
|
|
4
|
+
PUBLIC_LOG_HEADER_LENGTH,
|
|
5
|
+
} from '@aztec/constants';
|
|
2
6
|
import type { FieldsOf } from '@aztec/foundation/array';
|
|
3
7
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
8
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
@@ -76,6 +80,9 @@ export class FlatPublicLogs {
|
|
|
76
80
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
77
81
|
const reader = BufferReader.asReader(buffer);
|
|
78
82
|
const length = reader.readNumber();
|
|
83
|
+
if (length > FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH) {
|
|
84
|
+
throw new Error(`FlatPublicLogs length ${length} exceeds maximum ${FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH}`);
|
|
85
|
+
}
|
|
79
86
|
return this.fromUnpaddedPayload(reader.readArray(length, Fr));
|
|
80
87
|
}
|
|
81
88
|
|
|
@@ -171,6 +178,9 @@ export class PublicLog {
|
|
|
171
178
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
172
179
|
const reader = BufferReader.asReader(buffer);
|
|
173
180
|
const fieldsLength = reader.readNumber();
|
|
181
|
+
if (fieldsLength > MAX_PUBLIC_LOG_SIZE_IN_FIELDS) {
|
|
182
|
+
throw new Error(`PublicLog fields length ${fieldsLength} exceeds maximum ${MAX_PUBLIC_LOG_SIZE_IN_FIELDS}`);
|
|
183
|
+
}
|
|
174
184
|
return new PublicLog(reader.readObject(AztecAddress), reader.readArray(fieldsLength, Fr));
|
|
175
185
|
}
|
|
176
186
|
|
package/src/noir/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ export const AZTEC_VIEW_ATTRIBUTE = 'abi_view';
|
|
|
19
19
|
export interface NoirFunctionAbi {
|
|
20
20
|
/** The parameters of the function. */
|
|
21
21
|
parameters: ABIParameter[];
|
|
22
|
-
/** The return type of the function. */
|
|
22
|
+
/** The return type of the function, or null for void functions. */
|
|
23
23
|
return_type: {
|
|
24
24
|
/**
|
|
25
25
|
* The type of the return value.
|
|
@@ -29,7 +29,7 @@ export interface NoirFunctionAbi {
|
|
|
29
29
|
* The visibility of the return value.
|
|
30
30
|
*/
|
|
31
31
|
visibility: ABIParameterVisibility;
|
|
32
|
-
};
|
|
32
|
+
} | null;
|
|
33
33
|
/** Mapping of error selector => error type */
|
|
34
34
|
error_types: Partial<Record<string, AbiErrorType>>;
|
|
35
35
|
}
|
|
@@ -41,7 +41,7 @@ export class ParityBasePrivateInputs {
|
|
|
41
41
|
*/
|
|
42
42
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
43
43
|
const reader = BufferReader.asReader(buffer);
|
|
44
|
-
return new ParityBasePrivateInputs(reader.
|
|
44
|
+
return new ParityBasePrivateInputs(reader.readTuple(NUM_MSGS_PER_BASE_PARITY, Fr), Fr.fromBuffer(reader));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -56,7 +56,10 @@ export class ChonkProof {
|
|
|
56
56
|
static fromBuffer(buffer: Buffer | BufferReader): ChonkProof {
|
|
57
57
|
const reader = BufferReader.asReader(buffer);
|
|
58
58
|
const proofLength = reader.readNumber();
|
|
59
|
-
|
|
59
|
+
if (proofLength !== CHONK_PROOF_LENGTH) {
|
|
60
|
+
throw new Error(`Invalid ChonkProof length from buffer: ${proofLength}, expected ${CHONK_PROOF_LENGTH}`);
|
|
61
|
+
}
|
|
62
|
+
const proof = reader.readArray(CHONK_PROOF_LENGTH, Fr);
|
|
60
63
|
return new ChonkProof(proof);
|
|
61
64
|
}
|
|
62
65
|
|
|
@@ -106,6 +109,11 @@ export class ChonkProofWithPublicInputs {
|
|
|
106
109
|
static fromBuffer(buffer: Buffer | BufferReader): ChonkProofWithPublicInputs {
|
|
107
110
|
const reader = BufferReader.asReader(buffer);
|
|
108
111
|
const proofLength = reader.readNumber();
|
|
112
|
+
if (proofLength < CHONK_PROOF_LENGTH) {
|
|
113
|
+
throw new Error(
|
|
114
|
+
`Invalid ChonkProofWithPublicInputs length from buffer: ${proofLength}, expected at least ${CHONK_PROOF_LENGTH}`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
109
117
|
const proof = reader.readArray(proofLength, Fr);
|
|
110
118
|
return new ChonkProofWithPublicInputs(proof);
|
|
111
119
|
}
|
|
@@ -86,7 +86,7 @@ export class PrivateBaseRollupHints {
|
|
|
86
86
|
reader.readObject(SpongeBlob),
|
|
87
87
|
reader.readObject(TreeSnapshotDiffHints),
|
|
88
88
|
reader.readObject(PublicDataTreeLeafPreimage),
|
|
89
|
-
reader.
|
|
89
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
90
90
|
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, () => reader.readObject(ContractClassLogFields)),
|
|
91
91
|
reader.readObject(BlockConstantData),
|
|
92
92
|
);
|
|
@@ -163,7 +163,7 @@ export class PublicBaseRollupHints {
|
|
|
163
163
|
return new PublicBaseRollupHints(
|
|
164
164
|
reader.readObject(SpongeBlob),
|
|
165
165
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
166
|
-
reader.
|
|
166
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
167
167
|
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, () => reader.readObject(ContractClassLogFields)),
|
|
168
168
|
);
|
|
169
169
|
}
|
|
@@ -60,8 +60,8 @@ export class BlockRootFirstRollupPrivateInputs {
|
|
|
60
60
|
ProofData.fromBuffer(reader, ParityPublicInputs),
|
|
61
61
|
[ProofData.fromBuffer(reader, TxRollupPublicInputs), ProofData.fromBuffer(reader, TxRollupPublicInputs)],
|
|
62
62
|
AppendOnlyTreeSnapshot.fromBuffer(reader),
|
|
63
|
-
reader.
|
|
64
|
-
reader.
|
|
63
|
+
reader.readTuple(L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr),
|
|
64
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -124,8 +124,8 @@ export class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
124
124
|
ProofData.fromBuffer(reader, ParityPublicInputs),
|
|
125
125
|
ProofData.fromBuffer(reader, TxRollupPublicInputs),
|
|
126
126
|
AppendOnlyTreeSnapshot.fromBuffer(reader),
|
|
127
|
-
reader.
|
|
128
|
-
reader.
|
|
127
|
+
reader.readTuple(L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr),
|
|
128
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -206,8 +206,8 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
206
206
|
StateReference.fromBuffer(reader),
|
|
207
207
|
CheckpointConstantData.fromBuffer(reader),
|
|
208
208
|
reader.readUInt64(),
|
|
209
|
-
reader.
|
|
210
|
-
reader.
|
|
209
|
+
reader.readTuple(L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr),
|
|
210
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -248,7 +248,7 @@ export class BlockRootRollupPrivateInputs {
|
|
|
248
248
|
const reader = BufferReader.asReader(buffer);
|
|
249
249
|
return new BlockRootRollupPrivateInputs(
|
|
250
250
|
[ProofData.fromBuffer(reader, TxRollupPublicInputs), ProofData.fromBuffer(reader, TxRollupPublicInputs)],
|
|
251
|
-
reader.
|
|
251
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -289,7 +289,7 @@ export class BlockRootSingleTxRollupPrivateInputs {
|
|
|
289
289
|
const reader = BufferReader.asReader(buffer);
|
|
290
290
|
return new BlockRootSingleTxRollupPrivateInputs(
|
|
291
291
|
ProofData.fromBuffer(reader, TxRollupPublicInputs),
|
|
292
|
-
reader.
|
|
292
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
293
293
|
);
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -65,8 +65,8 @@ export class CheckpointRollupPublicInputs {
|
|
|
65
65
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
66
66
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
67
67
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
68
|
-
reader.
|
|
69
|
-
reader.
|
|
68
|
+
reader.readTuple(MAX_CHECKPOINTS_PER_EPOCH, Fr),
|
|
69
|
+
reader.readTuple(MAX_CHECKPOINTS_PER_EPOCH, FeeRecipient),
|
|
70
70
|
reader.readObject(BlobAccumulator),
|
|
71
71
|
reader.readObject(BlobAccumulator),
|
|
72
72
|
reader.readObject(FinalBlobBatchingChallenges),
|
|
@@ -81,15 +81,15 @@ export class CheckpointRootRollupHints {
|
|
|
81
81
|
const reader = BufferReader.asReader(buffer);
|
|
82
82
|
return new CheckpointRootRollupHints(
|
|
83
83
|
BlockHeader.fromBuffer(reader),
|
|
84
|
-
reader.
|
|
84
|
+
reader.readTuple(ARCHIVE_HEIGHT, Fr),
|
|
85
85
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
86
|
-
reader.
|
|
86
|
+
reader.readTuple(OUT_HASH_TREE_HEIGHT, Fr),
|
|
87
87
|
reader.readObject(BlobAccumulator),
|
|
88
88
|
reader.readObject(FinalBlobBatchingChallenges),
|
|
89
89
|
// Below line gives error 'Type instantiation is excessively deep and possibly infinite. ts(2589)'
|
|
90
|
-
// reader.
|
|
90
|
+
// reader.readTuple(FIELDS_PER_BLOB, Fr),
|
|
91
91
|
Array.from({ length: FIELDS_PER_BLOB * BLOBS_PER_CHECKPOINT }, () => Fr.fromBuffer(reader)),
|
|
92
|
-
reader.
|
|
92
|
+
reader.readTuple(BLOBS_PER_CHECKPOINT, BLS12Point),
|
|
93
93
|
Fr.fromBuffer(reader),
|
|
94
94
|
);
|
|
95
95
|
}
|
|
@@ -68,8 +68,8 @@ export class RootRollupPublicInputs {
|
|
|
68
68
|
Fr.fromBuffer(reader),
|
|
69
69
|
Fr.fromBuffer(reader),
|
|
70
70
|
Fr.fromBuffer(reader),
|
|
71
|
-
reader.
|
|
72
|
-
reader.
|
|
71
|
+
reader.readTuple(MAX_CHECKPOINTS_PER_EPOCH, Fr),
|
|
72
|
+
reader.readTuple(MAX_CHECKPOINTS_PER_EPOCH, FeeRecipient),
|
|
73
73
|
EpochConstantData.fromBuffer(reader),
|
|
74
74
|
reader.readObject(FinalBlobAccumulator),
|
|
75
75
|
);
|
|
@@ -85,14 +85,14 @@ export class TreeSnapshotDiffHints {
|
|
|
85
85
|
static fromBuffer(buffer: Buffer | BufferReader): TreeSnapshotDiffHints {
|
|
86
86
|
const reader = BufferReader.asReader(buffer);
|
|
87
87
|
return new TreeSnapshotDiffHints(
|
|
88
|
-
reader.
|
|
89
|
-
reader.
|
|
90
|
-
reader.
|
|
88
|
+
reader.readTuple(NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr),
|
|
89
|
+
reader.readTuple(MAX_NULLIFIERS_PER_TX, NullifierLeafPreimage),
|
|
90
|
+
reader.readTuple(MAX_NULLIFIERS_PER_TX, {
|
|
91
91
|
fromBuffer: buffer => MembershipWitness.fromBuffer(buffer, NULLIFIER_TREE_HEIGHT),
|
|
92
92
|
}),
|
|
93
|
-
reader.
|
|
93
|
+
reader.readTuple(MAX_NULLIFIERS_PER_TX, Fr),
|
|
94
94
|
reader.readNumbers(MAX_NULLIFIERS_PER_TX),
|
|
95
|
-
reader.
|
|
95
|
+
reader.readTuple(NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr),
|
|
96
96
|
MembershipWitness.fromBuffer(reader, PUBLIC_DATA_TREE_HEIGHT),
|
|
97
97
|
);
|
|
98
98
|
}
|
|
@@ -30,7 +30,7 @@ export class ProtocolContracts {
|
|
|
30
30
|
|
|
31
31
|
static fromFields(fields: Fr[] | FieldReader): ProtocolContracts {
|
|
32
32
|
const reader = FieldReader.asReader(fields);
|
|
33
|
-
return new ProtocolContracts(reader.
|
|
33
|
+
return new ProtocolContracts(reader.readTuple(MAX_PROTOCOL_CONTRACTS, AztecAddress));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
toFields(): Fr[] {
|
|
@@ -39,7 +39,7 @@ export class ProtocolContracts {
|
|
|
39
39
|
|
|
40
40
|
static fromBuffer(buffer: Buffer | BufferReader): ProtocolContracts {
|
|
41
41
|
const reader = BufferReader.asReader(buffer);
|
|
42
|
-
return new ProtocolContracts(reader.
|
|
42
|
+
return new ProtocolContracts(reader.readTuple(MAX_PROTOCOL_CONTRACTS, AztecAddress));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
toBuffer() {
|