Skip to content

Commit

Permalink
add missing padding
Browse files Browse the repository at this point in the history
  • Loading branch information
maramihali committed Jul 16, 2024
1 parent b1518fe commit 68bf98a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ template <typename C> field_t<C> poseidon2<C>::hash_buffer(C& builder, const std
return hash(builder, elements);
}
template class poseidon2<bb::MegaCircuitBuilder>;
template class poseidon2<bb::UltraCircuitBuilder>;

} // namespace bb::stdlib
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ template <typename Builder> class StdlibPoseidon2 : public testing::Test {
}
};

using CircuitTypes = testing::Types<bb::MegaCircuitBuilder>;
using CircuitTypes = testing::Types<bb::MegaCircuitBuilder, bb::UltraCircuitBuilder>;

TYPED_TEST_SUITE(StdlibPoseidon2, CircuitTypes);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2819,6 +2819,9 @@ void UltraCircuitBuilder_<FF>::create_poseidon2_external_gate(const poseidon2_ex
block.q_aux().emplace_back(0);
block.q_poseidon2_external().emplace_back(1);
block.q_poseidon2_internal().emplace_back(0);
if constexpr (HasAdditionalSelectors<Arithmetization>) {
block.pad_additional();
}
this->check_selector_length_consistency();
++this->num_gates;
}
Expand All @@ -2844,6 +2847,9 @@ void UltraCircuitBuilder_<FF>::create_poseidon2_internal_gate(const poseidon2_in
block.q_aux().emplace_back(0);
block.q_poseidon2_external().emplace_back(0);
block.q_poseidon2_internal().emplace_back(1);
if constexpr (HasAdditionalSelectors<Arithmetization>) {
block.pad_additional();
}
this->check_selector_length_consistency();
++this->num_gates;
}
Expand Down

0 comments on commit 68bf98a

Please sign in to comment.