Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <cstddef>
5#include <cstdint>
6
7#include "barretenberg/aztec/aztec_constants.hpp"
10
11namespace bb::avm2 {
12
15
16// Exact number of rows used by each AVM public input column. Column 0 spans the full table;
17// columns 1-3 are shorter, so the recursive verifier avoids hashing / MLE-evaluating their
18// trailing zeros. Sourced from the generated per-column constants (see constants.nr).
20 AVM_PUBLIC_INPUTS_COLUMN_0_LENGTH,
21 AVM_PUBLIC_INPUTS_COLUMN_1_LENGTH,
22 AVM_PUBLIC_INPUTS_COLUMN_2_LENGTH,
23 AVM_PUBLIC_INPUTS_COLUMN_3_LENGTH,
24};
25
26// The AND/OR/XOR values double as op_id in the circuit trace. A keccak SIMD-64 operation (which
27// packs two independent U64 lanes into one U128 bitwise row) reuses the same op_id and is flagged
28// separately via BitwiseEvent::simd_64.
29enum class BitwiseOperation : uint8_t {
30 AND = AVM_BITWISE_AND_OP_ID,
31 OR = AVM_BITWISE_OR_OP_ID,
32 XOR = AVM_BITWISE_XOR_OP_ID,
33};
34
35constexpr uint256_t MASK_128 = (static_cast<uint256_t>(1) << 128) - 1;
36constexpr uint128_t MASK_64 = (static_cast<uint128_t>(1) << 64) - 1;
37
38} // namespace bb::avm2
constexpr std::size_t MAX_AVM_TRACE_SIZE
Definition constants.hpp:14
constexpr uint128_t MASK_64
Definition constants.hpp:36
constexpr uint256_t MASK_128
Definition constants.hpp:35
constexpr std::size_t MAX_AVM_TRACE_LOG_SIZE
Definition constants.hpp:13
constexpr std::array< std::size_t, AVM_NUM_PUBLIC_INPUT_COLUMNS > AVM_PUBLIC_INPUTS_COLUMN_LENGTHS
Definition constants.hpp:19
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
unsigned __int128 uint128_t
Definition serialize.hpp:45