Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
keccakf1600_fixture.test.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <vector>
6
7namespace bb::avm2::testing {
8
9using tracegen::TestTraceContainer;
10
11// Helper function to simulate and generate a trace of a list of Keccakf1600 permutations.
12void generate_keccak_trace(TestTraceContainer& trace,
13 const std::vector<MemoryAddress>& dst_addresses,
14 const std::vector<MemoryAddress>& src_addresses,
15 uint32_t space_id);
16
17// Helper function to simulate and generate a trace with a tag error at a specific relative offset from src_address.
18// error_offset is the offset from src_address where the tag error should occur.
19void generate_keccak_trace_with_tag_error(TestTraceContainer& trace,
20 MemoryAddress dst_address,
21 MemoryAddress src_address,
22 size_t error_offset,
23 MemoryTag error_tag,
24 uint32_t space_id);
25
26// Helper function to generate a keccak trace with a slice error.
27void generate_keccak_trace_with_slice_error(TestTraceContainer& trace,
28 MemoryAddress dst_address,
29 MemoryAddress src_address,
30 uint32_t space_id);
31
32} // namespace bb::avm2::testing
TestTraceContainer trace
void generate_keccak_trace_with_slice_error(TestTraceContainer &trace, MemoryAddress dst_address, MemoryAddress src_address, uint32_t space_id)
void generate_keccak_trace_with_tag_error(TestTraceContainer &trace, MemoryAddress dst_address, MemoryAddress src_address, size_t error_offset, MemoryTag error_tag, uint32_t space_id)
void generate_keccak_trace(TestTraceContainer &trace, const std::vector< MemoryAddress > &dst_addresses, const std::vector< MemoryAddress > &src_addresses, uint32_t space_id)
uint32_t MemoryAddress
ValueTag MemoryTag
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13