116 return column_polynomials;
126 const bool include_zk_ops =
true)
const
172 throw_or_abort(
"Hiding op must be set before calling get_eccvm_ops()");
279 .base_point = to_mul,
282 .mul_scalar_full = scalar,
319 .return_is_infinity =
false };
416 const size_t CHUNK_SIZE = 2 * stdlib::NUM_LIMB_BITS_IN_FIELD_SIMULATION;
423 if (point.is_point_at_infinity()) {
428 ultra_op.
x_hi =
Fr(x_256.
slice(CHUNK_SIZE, CHUNK_SIZE * 2));
430 ultra_op.
y_hi =
Fr(y_256.
slice(CHUNK_SIZE, CHUNK_SIZE * 2));
438 if (converted_u256.
get_msb() < 128) {
439 ultra_op.
z_1 = scalar;
#define BB_BENCH_NAME(name)
Manages ECC operations for the Goblin proving system.
Curve::AffineElement Point
std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_table_columns_up_to_tail() const
size_t get_ultra_ops_table_num_rows_up_to_tail() const
size_t get_append_offset() const
Compute the fixed append offset for the final APPEND merge.
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
std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_ultra_ops_table_columns(const bool include_zk_ops=true) const
void construct_full_eccvm_ops_table()
UltraOp add_accumulate(const Point &to_add)
Write point addition op to queue and natively perform addition.
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
std::vector< UltraOp > ultra_ops_zk_reconstructed
UltraOp append_hiding_op(const Fq &Px, const Fq &Py)
Add a hiding op with random Px, Py values to both ECCVM and Ultra ops tables.
std::vector< UltraOp > & get_no_zk_reconstructed_ultra_ops()
ECCVMOperation hiding_op_for_eccvm
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::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_current_ultra_ops_subtable_columns() const
std::vector< UltraOp > ultra_ops_no_zk_reconstructed
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.
std::vector< UltraOp > & get_zk_reconstructed_ultra_ops()
UltraOp mul_accumulate(const Point &to_mul, const Fr &scalar)
Write multiply and add op to queue and natively perform operation.
UltraOp random_op_ultra_only()
Writes randomness to the ultra ops table but adds no eccvm operations.
void construct_no_zk_reconstructed_ultra_ops_table()
size_t num_subtables() const
std::vector< std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > > construct_subtable_columns() const
std::array< Polynomial< Fr >, ULTRA_TABLE_WIDTH > construct_zk_columns()
UltraOp no_op_ultra_only()
Writes a no-op to the ultra ops table but adds no eccvm operations.
static const size_t OP_QUEUE_SIZE
UltraOp eq_and_reset()
Write equality op using internal accumulator point.
size_t get_current_subtable_size() const
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.
void construct_zk_reconstructed_ultra_ops_table()
void merge_fixed_append(size_t ultra_fixed_offset)
EccvmRowTracker eccvm_row_tracker
size_t get_ultra_ops_count() const
void add_erroneous_equality_op_for_testing()
A testing only method that adds an erroneous equality op to the eccvm ops.
static constexpr size_t ULTRA_TABLE_WIDTH
void create_new_subtable(size_t size_hint=0)
size_t num_subtables() const
std::vector< OpFormat > get_reconstructed() const
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.
std::pair< ColumnPolynomials, ECCVMOperation > construct_zk_columns()
size_t get_current_subtable_size() const
size_t ultra_table_size_up_to_tail() const
std::vector< ColumnPolynomials > construct_subtable_columns() const
void push(const UltraOp &op)
size_t num_ultra_rows() const
ColumnPolynomials construct_current_ultra_ops_subtable_columns() const
static constexpr size_t APPEND_TRACE_OFFSET
ColumnPolynomials construct_table_columns_up_to_tail() const
static constexpr size_t NUM_ROWS_PER_OP
void create_new_subtable(size_t size_hint=0)
static std::pair< UltraOp, ECCVMOperation > make_hiding_op_pair(const curve::BN254::BaseField &Px, const curve::BN254::BaseField &Py)
Build a hiding op as paired Ultra and ECCVM operations from raw Fq coordinates.
std::vector< UltraOp > get_no_zk_reconstructed_ultra_ops() const
static constexpr size_t TABLE_WIDTH
ColumnPolynomials construct_table_columns(const bool include_zk_ops=true) const
static constexpr size_t ZK_ULTRA_OPS
void merge_with_fixed_append_offset(size_t offset)
std::vector< UltraOp > get_zk_reconstructed_ultra_ops() const
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.
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)
Full-width endomorphism decomposition: k ≡ k1 - k2·λ (mod r). Modifies the field elements k1 and k2.
static field random_element(numeric::RNG *engine=nullptr) noexcept
BB_INLINE constexpr field from_montgomery_form() const noexcept
static constexpr field zero()
void throw_or_abort(std::string const &err)