202 .base_point = to_mul,
205 .mul_scalar_full = scalar,
243 .return_is_infinity =
false };
289 const size_t CHUNK_SIZE = 2 * stdlib::NUM_LIMB_BITS_IN_FIELD_SIMULATION;
296 if (point.is_point_at_infinity()) {
301 ultra_op.
x_hi =
Fr(x_256.
slice(CHUNK_SIZE, CHUNK_SIZE * 2));
303 ultra_op.
y_hi =
Fr(y_256.
slice(CHUNK_SIZE, CHUNK_SIZE * 2));
310 if (converted_u256.
get_msb() <= 128) {
311 ultra_op.
z_1 = scalar;
Used to construct execution trace representations of elliptic curve operations.
Curve::AffineElement Point
size_t get_num_rows() const
Get the number of rows for the current ECCVM circuit.
EccvmOpsTable eccvm_ops_table
std::vector< ECCVMOperation > eccvm_ops_reconstructed
void construct_full_eccvm_ops_table()
UltraOp add_accumulate(const Point &to_add)
Write point addition op to queue and natively perform addition.
std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_ultra_ops_table_columns() const
void initialize_new_subtable()
Initialize a new subtable for eccvm and ultra ops with the given merge settings.
size_t get_ultra_ops_table_num_rows() const
void merge(MergeSettings settings=MergeSettings::PREPEND, std::optional< size_t > ultra_fixed_offset=std::nullopt)
void construct_full_ultra_ops_table()
UltraEccOpsTable ultra_ops_table
void append_eccvm_op(const ECCVMOperation &op)
Append an eccvm operation to the eccvm ops table; update the eccvm row tracker.
uint32_t get_number_of_muls() const
get number of muls for the current ECCVM circuit
std::vector< ECCVMOperation > & get_eccvm_ops()
size_t get_num_msm_rows() const
Get the number of rows in the 'msm' column section, for all msms in the circuit.
std::vector< UltraOp > ultra_ops_reconstructed
std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_current_ultra_ops_subtable_columns() const
size_t get_current_ultra_ops_subtable_num_rows() const
UltraOp construct_and_populate_ultra_ops(EccOpCode op_code, const Point &point, const Fr &scalar=Fr::zero())
Given an ecc operation and its inputs, decompose into ultra format and populate ultra_ops.
UltraOp mul_accumulate(const Point &to_mul, const Fr &scalar)
Write multiply and add op to queue and natively perform operation.
std::vector< UltraOp > & get_ultra_ops()
std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_previous_ultra_ops_table_columns() const
UltraOp random_op_ultra_only()
Writes randomness to the ultra ops table but adds no eccvm operations.
UltraOp no_op_ultra_only()
Writes a no op (i.e. two zero rows) to the ultra ops table but adds no eccvm operations.
UltraOp eq_and_reset()
Write equality op using internal accumulator point.
void empty_row_for_testing()
Write empty row to queue.
ECCOpQueue()
Instantiate an initial ECC op subtable.
void set_eccvm_ops_for_fuzzing(std::vector< ECCVMOperation > &eccvm_ops_in)
A fuzzing only method for setting eccvm ops directly.
EccvmRowTracker eccvm_row_tracker
void add_erroneous_equality_op_for_testing()
A testing only method that adds an erroneous equality op to the eccvm ops.
size_t get_previous_ultra_ops_table_num_rows() const
static constexpr size_t ULTRA_TABLE_WIDTH
void create_new_subtable(size_t size_hint=0)
std::vector< OpFormat > get_reconstructed() const
void merge(MergeSettings settings=MergeSettings::PREPEND)
void push(const OpFormat &op)
Class for tracking the number of rows in the ECCVM circuit and the number of muls performed as the op...
size_t get_num_rows() const
Get the number of rows for the current ECCVM circuit.
size_t get_num_msm_rows() const
Get the number of rows in the 'msm' column section, for all msms in the circuit.
uint32_t get_number_of_muls() const
void update_cached_msms(const ECCVMOperation &op)
Update cached_active_msm_count or update other row counts and reset cached_active_msm_count.
Stores a table of elliptic curve operations represented in the Ultra format.
void push(const UltraOp &op)
ColumnPolynomials construct_current_ultra_ops_subtable_columns() const
ColumnPolynomials construct_table_columns() const
ColumnPolynomials construct_previous_table_columns() const
void create_new_subtable(size_t size_hint=0)
size_t current_ultra_subtable_size() const
size_t previous_ultra_table_size() const
std::vector< UltraOp > get_reconstructed() const
static constexpr size_t TABLE_WIDTH
size_t ultra_table_size() const
void merge(MergeSettings settings=MergeSettings::PREPEND, std::optional< size_t > offset=std::nullopt)
typename Group::affine_element AffineElement
constexpr uint256_t slice(uint64_t start, uint64_t end) const
constexpr uint64_t get_msb() const
Entry point for Barretenberg command-line interface.
MergeSettings
The MergeSettings define whether an current subtable will be added at the beginning (PREPEND) or at t...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Defines the opcodes for ECC operations used in both the Ultra and ECCVM formats. There are three opco...
BB_INLINE constexpr field to_montgomery_form() const noexcept
static void split_into_endomorphism_scalars(const field &k, field &k1, field &k2)
static field random_element(numeric::RNG *engine=nullptr) noexcept
BB_INLINE constexpr field from_montgomery_form() const noexcept
static constexpr field zero()