Skip to content

Commit

Permalink
hacky fix for weird acir failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 committed Oct 31, 2023
1 parent 57b63b3 commit 0dc4d6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ template <typename FF_> class CircuitBuilderBase {
using EmbeddedCurve =
std::conditional_t<std::same_as<FF, barretenberg::g1::coordinate_field>, curve::BN254, curve::Grumpkin>;

// WORKTODO: hackily defining this here in the base for now. Get acir-bberg test failure otherwise
std::array<std::vector<uint32_t, barretenberg::ContainerSlabAllocator<uint32_t>>, /* max num wires = */ 4> wires;

size_t num_gates = 0;

std::vector<uint32_t> public_inputs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ template <typename FF> class StandardCircuitBuilder_ : public CircuitBuilderBase
static constexpr merkle::HashType merkle_hash_type = merkle::HashType::FIXED_BASE_PEDERSEN;
static constexpr pedersen::CommitmentType commitment_type = pedersen::CommitmentType::FIXED_BASE_PEDERSEN;

std::array<std::vector<uint32_t, barretenberg::ContainerSlabAllocator<uint32_t>>, NUM_WIRES> wires;
// std::array<std::vector<uint32_t, barretenberg::ContainerSlabAllocator<uint32_t>>, NUM_WIRES> wires;
Arithmetization selectors;

using WireVector = std::vector<uint32_t, barretenberg::ContainerSlabAllocator<uint32_t>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,16 +526,16 @@ template <typename FF> class UltraCircuitBuilder_ : public CircuitBuilderBase<FF
}
};

std::array<std::vector<uint32_t, barretenberg::ContainerSlabAllocator<uint32_t>>, NUM_WIRES> wires;
// std::array<std::vector<uint32_t, barretenberg::ContainerSlabAllocator<uint32_t>>, NUM_WIRES> wires;
Arithmetization selectors;

using WireVector = std::vector<uint32_t, ContainerSlabAllocator<uint32_t>>;
using SelectorVector = std::vector<FF, ContainerSlabAllocator<FF>>;

WireVector& w_l = std::get<0>(wires);
WireVector& w_r = std::get<1>(wires);
WireVector& w_o = std::get<2>(wires);
WireVector& w_4 = std::get<3>(wires);
WireVector& w_l = std::get<0>(this->wires);
WireVector& w_r = std::get<1>(this->wires);
WireVector& w_o = std::get<2>(this->wires);
WireVector& w_4 = std::get<3>(this->wires);

SelectorVector& q_m = selectors.q_m();
SelectorVector& q_c = selectors.q_c();
Expand Down

0 comments on commit 0dc4d6f

Please sign in to comment.