Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
avm_inputs.test.cpp
Go to the documentation of this file.
1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
3
5
6#include <cstdint>
7
12
13namespace bb::avm2 {
14namespace {
15
16using ::testing::SizeIs;
17
18TEST(AvmInputsTest, Deserialization)
19{
20 // cwd is expected to be barretenberg/cpp/build.
21 auto data = read_file("../src/barretenberg/vm2/testing/avm_inputs.testdata.bin");
22 // We only check that deserialization does not crash.
23 // Correctness of the deserialization itself is assumed via MessagePack.
24 // What we are testing here is that the structure of the inputs in TS matches the C++ structs
25 // that we have here. If someone changes the structure of the inputs in TS, this test would
26 // force them to update the C++ structs as well (and therefore any usage of these structs).
28}
29
30TEST(AvmInputsTest, FormatTransformations)
31{
32 using ::testing::AllOf;
33 using ::testing::ElementsAre;
34
35 PublicInputs pi = testing::get_minimal_trace_with_pi().second;
36 auto as_cols = pi.to_columns();
37 auto flattened = PublicInputs::columns_to_flat(as_cols);
38 auto unflattened = PublicInputs::flat_to_columns(flattened);
39
40 EXPECT_THAT(as_cols, SizeIs(AVM_NUM_PUBLIC_INPUT_COLUMNS));
41 for (size_t i = 0; i < AVM_NUM_PUBLIC_INPUT_COLUMNS; ++i) {
42 EXPECT_THAT(as_cols[i], SizeIs(AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH));
43 }
44 EXPECT_THAT(flattened, SizeIs(AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH));
45
46 EXPECT_EQ(as_cols, unflattened);
47}
48
49TEST(AvmInputsTest, ValuesInColumns)
50{
51 // Create a test PublicInputs with specific values in different parts of the struct
52 PublicInputs pi;
53
54 // Set global variables
55 pi.globalVariables.chainId = 123;
56 pi.globalVariables.version = 456;
57 pi.globalVariables.blockNumber = 12345;
58 pi.globalVariables.slotNumber = 67890;
59 pi.globalVariables.timestamp = 789000;
60 pi.globalVariables.coinbase = 123123;
61 pi.globalVariables.feeRecipient = 9876;
62
63 // Set gas fees
64 pi.globalVariables.gasFees.feePerDaGas = 111;
65 pi.globalVariables.gasFees.feePerL2Gas = 222;
66
67 // Set start tree snapshots
68 pi.startTreeSnapshots.l1ToL2MessageTree.root = 1000;
69 pi.startTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex = 2000;
70 pi.startTreeSnapshots.noteHashTree.root = 3000;
71 pi.startTreeSnapshots.noteHashTree.nextAvailableLeafIndex = 4000;
72 pi.startTreeSnapshots.nullifierTree.root = 5000;
73 pi.startTreeSnapshots.nullifierTree.nextAvailableLeafIndex = 6000;
74 pi.startTreeSnapshots.publicDataTree.root = 7000;
75 pi.startTreeSnapshots.publicDataTree.nextAvailableLeafIndex = 8000;
76
77 // Set gas used
78 pi.startGasUsed.daGas = 100;
79 pi.startGasUsed.l2Gas = 200;
80
81 // Set gas settings
82 pi.gasSettings.gasLimits.daGas = 1234;
83 pi.gasSettings.gasLimits.l2Gas = 5678;
84 pi.gasSettings.teardownGasLimits.daGas = 9012;
85 pi.gasSettings.teardownGasLimits.l2Gas = 3456;
86 pi.gasSettings.maxFeesPerGas.feePerDaGas = 7890;
87 pi.gasSettings.maxFeesPerGas.feePerL2Gas = 1234;
88 pi.gasSettings.maxPriorityFeesPerGas.feePerDaGas = 5678;
89 pi.gasSettings.maxPriorityFeesPerGas.feePerL2Gas = 9012;
90
91 // Set fee payer
92 pi.feePayer = 12345;
93
94 // Set Public Call Request Array Lengths
95 pi.publicCallRequestArrayLengths.setupCalls = 2;
96 pi.publicCallRequestArrayLengths.appLogicCalls = 3;
97 pi.publicCallRequestArrayLengths.teardownCall = true;
98
99 // Set call requests (using all 4 columns)
100 pi.publicSetupCallRequests[0].msgSender = 1111;
101 pi.publicSetupCallRequests[0].contractAddress = 2222;
102 pi.publicSetupCallRequests[0].isStaticCall = true;
103 pi.publicSetupCallRequests[0].calldataHash = 3333;
104
105 pi.publicAppLogicCallRequests[1].msgSender = 4444;
106 pi.publicAppLogicCallRequests[1].contractAddress = 5555;
107 pi.publicAppLogicCallRequests[1].isStaticCall = false;
108 pi.publicAppLogicCallRequests[1].calldataHash = 6666;
109
110 pi.publicTeardownCallRequest.msgSender = 7777;
111 pi.publicTeardownCallRequest.contractAddress = 8888;
112 pi.publicTeardownCallRequest.isStaticCall = true;
113 pi.publicTeardownCallRequest.calldataHash = 9999;
114
115 // Set accumulated data array lengths
116 pi.previousNonRevertibleAccumulatedDataArrayLengths.noteHashes = 10;
117 pi.previousNonRevertibleAccumulatedDataArrayLengths.nullifiers = 20;
118 pi.previousNonRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs = 30;
119
120 pi.previousRevertibleAccumulatedDataArrayLengths.noteHashes = 40;
121 pi.previousRevertibleAccumulatedDataArrayLengths.nullifiers = 50;
122 pi.previousRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs = 60;
123
124 // Set l2 to l1 messages (using 3 columns)
125 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.recipient = 1234;
126 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.content = 1357;
127 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].contractAddress = 3579;
128
129 // Set accumulated data elements
130 pi.accumulatedData.noteHashes[2] = 54321;
131 pi.accumulatedData.nullifiers[3] = 98765;
132
133 // Set l2 to l1 messages in accumulated data
134 pi.accumulatedData.l2ToL1Msgs[1].message.recipient = 3333;
135 pi.accumulatedData.l2ToL1Msgs[1].message.content = 7531;
136 pi.accumulatedData.l2ToL1Msgs[1].contractAddress = 9753;
137
138 // Set public logs (spans multiple rows per log)
139 std::vector<FF> public_log_fields;
140 public_log_fields.reserve(3);
141 for (size_t j = 0; j < 3; ++j) {
142 public_log_fields.push_back(10000 + j);
143 }
144 pi.accumulatedData.publicLogs.add_log({
145 .fields = public_log_fields,
146 .contractAddress = 11223,
147 });
148
149 // Set public data writes
150 pi.accumulatedData.publicDataWrites[1].leafSlot = 5555;
151 pi.accumulatedData.publicDataWrites[1].value = 6666;
152
153 // Set end gas used
154 pi.endGasUsed.daGas = 5000;
155 pi.endGasUsed.l2Gas = 7000;
156
157 // Set end tree snapshots
158 pi.endTreeSnapshots.l1ToL2MessageTree.root = 10000;
159 pi.endTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex = 20000;
160 pi.endTreeSnapshots.noteHashTree.root = 30000;
161 pi.endTreeSnapshots.noteHashTree.nextAvailableLeafIndex = 40000;
162 pi.endTreeSnapshots.nullifierTree.root = 50000;
163 pi.endTreeSnapshots.nullifierTree.nextAvailableLeafIndex = 60000;
164 pi.endTreeSnapshots.publicDataTree.root = 70000;
165 pi.endTreeSnapshots.publicDataTree.nextAvailableLeafIndex = 80000;
166
167 // Set transaction fee
168 pi.transactionFee = 9876;
169
170 // Set accumulated data array lengths
171 pi.accumulatedDataArrayLengths.noteHashes = 3;
172 pi.accumulatedDataArrayLengths.nullifiers = 4;
173 pi.accumulatedDataArrayLengths.l2ToL1Msgs = 2;
174 pi.accumulatedDataArrayLengths.publicDataWrites = 5;
175
176 // Set reverted flag
177 pi.reverted = true;
178
179 // Get the columns representation
180 auto columns = pi.to_columns();
181
182 // Convert to flat array for easier testing
183 auto flat = PublicInputs::columns_to_flat(columns);
184 EXPECT_THAT(flat, SizeIs(AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH));
185
186 // Define column offsets based on the total number of rows per column
187 const size_t col0_offset = 0;
188 const size_t col1_offset = static_cast<size_t>(AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH);
189 const size_t col2_offset = static_cast<size_t>(2 * AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH);
190 const size_t col3_offset = static_cast<size_t>(3 * AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH);
191
192 // Verify that some specific values are at the expected positions
193
194 // Global variables
195 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_CHAIN_ID_ROW_IDX], pi.globalVariables.chainId);
196 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_VERSION_ROW_IDX], pi.globalVariables.version);
198 pi.globalVariables.blockNumber);
199 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_SLOT_NUMBER_ROW_IDX],
200 pi.globalVariables.slotNumber);
201 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_TIMESTAMP_ROW_IDX], pi.globalVariables.timestamp);
203 pi.globalVariables.feeRecipient);
204 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_GAS_FEES_ROW_IDX],
205 pi.globalVariables.gasFees.feePerDaGas);
206 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_GAS_FEES_ROW_IDX],
207 pi.globalVariables.gasFees.feePerL2Gas);
208 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_COINBASE_ROW_IDX], pi.globalVariables.coinbase);
209
210 // Start tree snapshots
212 pi.startTreeSnapshots.l1ToL2MessageTree.root);
214 pi.startTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex);
216 pi.startTreeSnapshots.noteHashTree.root);
218 pi.startTreeSnapshots.noteHashTree.nextAvailableLeafIndex);
220 pi.startTreeSnapshots.nullifierTree.root);
222 pi.startTreeSnapshots.nullifierTree.nextAvailableLeafIndex);
224 pi.startTreeSnapshots.publicDataTree.root);
226 pi.startTreeSnapshots.publicDataTree.nextAvailableLeafIndex);
227
228 // Gas used
229 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX], pi.startGasUsed.daGas);
230 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX], pi.startGasUsed.l2Gas);
231
232 // Gas settings
233 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX], pi.gasSettings.gasLimits.daGas);
234 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX], pi.gasSettings.gasLimits.l2Gas);
236 pi.gasSettings.teardownGasLimits.daGas);
238 pi.gasSettings.teardownGasLimits.l2Gas);
240 pi.gasSettings.maxFeesPerGas.feePerDaGas);
242 pi.gasSettings.maxFeesPerGas.feePerL2Gas);
244 pi.gasSettings.maxPriorityFeesPerGas.feePerDaGas);
246 pi.gasSettings.maxPriorityFeesPerGas.feePerL2Gas);
247
248 // Fee payer
249 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_FEE_PAYER_ROW_IDX], pi.feePayer);
250
251 // Public Call Request Array Lengths
253 pi.publicCallRequestArrayLengths.setupCalls);
255 pi.publicCallRequestArrayLengths.appLogicCalls);
257 static_cast<uint8_t>(pi.publicCallRequestArrayLengths.teardownCall));
258
259 // Public call requests (testing use of all 4 columns)
261 EXPECT_EQ(flat[col0_offset + setup_row], pi.publicSetupCallRequests[0].msgSender);
262 EXPECT_EQ(flat[col1_offset + setup_row], pi.publicSetupCallRequests[0].contractAddress);
263 EXPECT_EQ(flat[col2_offset + setup_row], static_cast<uint8_t>(pi.publicSetupCallRequests[0].isStaticCall));
264 EXPECT_EQ(flat[col3_offset + setup_row], pi.publicSetupCallRequests[0].calldataHash);
265
266 size_t app_logic_row = AVM_PUBLIC_INPUTS_PUBLIC_APP_LOGIC_CALL_REQUESTS_ROW_IDX + 1; // Using the second one
267 EXPECT_EQ(flat[col0_offset + app_logic_row], pi.publicAppLogicCallRequests[1].msgSender);
268 EXPECT_EQ(flat[col1_offset + app_logic_row], pi.publicAppLogicCallRequests[1].contractAddress);
269 EXPECT_EQ(flat[col2_offset + app_logic_row], static_cast<uint8_t>(pi.publicAppLogicCallRequests[1].isStaticCall));
270 EXPECT_EQ(flat[col3_offset + app_logic_row], pi.publicAppLogicCallRequests[1].calldataHash);
271
273 EXPECT_EQ(flat[col0_offset + teardown_row], pi.publicTeardownCallRequest.msgSender);
274 EXPECT_EQ(flat[col1_offset + teardown_row], pi.publicTeardownCallRequest.contractAddress);
275 EXPECT_EQ(flat[col2_offset + teardown_row], static_cast<uint8_t>(pi.publicTeardownCallRequest.isStaticCall));
276 EXPECT_EQ(flat[col3_offset + teardown_row], pi.publicTeardownCallRequest.calldataHash);
277
278 // Test previous accumulated data array lengths
279 EXPECT_EQ(flat[col0_offset +
281 pi.previousNonRevertibleAccumulatedDataArrayLengths.noteHashes);
282 EXPECT_EQ(
284 pi.previousNonRevertibleAccumulatedDataArrayLengths.nullifiers);
285 EXPECT_EQ(flat[col0_offset +
287 pi.previousNonRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs);
288
289 // Test previous revertible accumulated data array lengths
290 EXPECT_EQ(
292 pi.previousRevertibleAccumulatedDataArrayLengths.noteHashes);
293 EXPECT_EQ(
295 pi.previousRevertibleAccumulatedDataArrayLengths.nullifiers);
296 EXPECT_EQ(
298 pi.previousRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs);
299
300 // Accumulated Data Array Lengths
302 pi.accumulatedDataArrayLengths.noteHashes);
304 pi.accumulatedDataArrayLengths.nullifiers);
306 pi.accumulatedDataArrayLengths.l2ToL1Msgs);
308 pi.accumulatedDataArrayLengths.publicDataWrites);
309
310 // Test l2ToL1Msgs (which use 3 columns)
312 EXPECT_EQ(flat[col0_offset + l2_to_l1_msg_row],
313 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.recipient);
314 EXPECT_EQ(flat[col1_offset + l2_to_l1_msg_row],
315 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.content);
316 EXPECT_EQ(flat[col2_offset + l2_to_l1_msg_row],
317 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].contractAddress);
318
319 // End tree snapshots
321 pi.endTreeSnapshots.l1ToL2MessageTree.root);
323 pi.endTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex);
325 pi.endTreeSnapshots.noteHashTree.root);
327 pi.endTreeSnapshots.noteHashTree.nextAvailableLeafIndex);
328
329 // End gas used
330 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX], pi.endGasUsed.daGas);
331 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX], pi.endGasUsed.l2Gas);
332
333 // Test note hashes and nullifiers
334 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX + 2],
335 pi.accumulatedData.noteHashes[2]);
336 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX + 3],
337 pi.accumulatedData.nullifiers[3]);
338
339 // Test accumulated l2ToL1Msgs
340 size_t acc_l2_to_l1_msg_row = AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX + 1; // Using second one
341 EXPECT_EQ(flat[col0_offset + acc_l2_to_l1_msg_row], pi.accumulatedData.l2ToL1Msgs[1].message.recipient);
342 EXPECT_EQ(flat[col1_offset + acc_l2_to_l1_msg_row], pi.accumulatedData.l2ToL1Msgs[1].message.content);
343 EXPECT_EQ(flat[col2_offset + acc_l2_to_l1_msg_row], pi.accumulatedData.l2ToL1Msgs[1].contractAddress);
344
345 // Test public logs
347 // Header
348 EXPECT_EQ(flat[col0_offset + public_logs_row], pi.accumulatedData.publicLogs.length);
349 // Payload
350 for (size_t j = 0; j < 3; ++j) {
351 EXPECT_EQ(flat[col0_offset + public_logs_row + FLAT_PUBLIC_LOGS_HEADER_LENGTH + j],
352 pi.accumulatedData.publicLogs.payload[j]);
353 }
354
355 // Public data writes (uses 2 columns)
357 EXPECT_EQ(flat[col0_offset + public_data_write_row], pi.accumulatedData.publicDataWrites[1].leafSlot);
358 EXPECT_EQ(flat[col1_offset + public_data_write_row], pi.accumulatedData.publicDataWrites[1].value);
359
360 // Transaction fee
361 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_TRANSACTION_FEE_ROW_IDX], pi.transactionFee);
362
363 // Reverted status
364 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX], static_cast<uint8_t>(pi.reverted));
365}
366
367} // namespace
368} // namespace bb::avm2
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_APP_LOGIC_CALL_REQUESTS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_GAS_FEES_ROW_IDX
#define AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_TEARDOWN_CALL_REQUEST_ROW_IDX
#define AVM_PUBLIC_INPUTS_FEE_PAYER_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_FEE_RECIPIENT_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_COINBASE_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_TEARDOWN_GAS_LIMITS_ROW_IDX
#define FLAT_PUBLIC_LOGS_HEADER_LENGTH
#define AVM_PUBLIC_INPUTS_TRANSACTION_FEE_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_PUBLIC_DATA_WRITES_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_BLOCK_NUMBER_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_SETUP_CALL_REQUESTS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_APP_LOGIC_CALLS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_SLOT_NUMBER_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_VERSION_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_TEARDOWN_CALL_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_TIMESTAMP_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_MAX_FEES_PER_GAS_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_SETUP_CALLS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_PUBLIC_DATA_WRITES_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_CHAIN_ID_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_PUBLIC_LOGS_ROW_IDX
#define AVM_NUM_PUBLIC_INPUT_COLUMNS
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_MAX_PRIORITY_FEES_PER_GAS_ROW_IDX
#define AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH
const std::vector< FF > data
TEST(EmitUnencryptedLogTest, Basic)
std::pair< tracegen::TraceContainer, PublicInputs > get_minimal_trace_with_pi()
Definition fixtures.cpp:183
std::vector< uint8_t > read_file(const std::string &filename, size_t bytes=0)
Definition file_io.hpp:29
static AvmProvingInputs from(const std::vector< uint8_t > &data)
static std::vector< FF > columns_to_flat(std::vector< std::vector< FF > > const &columns)
static std::vector< std::vector< FF_ > > flat_to_columns(const std::vector< FF_ > &input)