Skip to content

Commit

Permalink
cleaning out a few more instances
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 committed Sep 21, 2023
1 parent fab1f79 commit d2c9ded
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set(LINKED_LIBRARIES
benchmark::benchmark
)

# Add executable and custom target for each suite, e.g. standard_honk_bench
# Add executable and custom target for each suite, e.g. ultra_honk_bench
foreach(BENCHMARK_SOURCE ${BENCHMARK_SOURCES})
get_filename_component(BENCHMARK_NAME ${BENCHMARK_SOURCE} NAME_WE) # extract name without extension
add_executable(${BENCHMARK_NAME}_bench main.bench.cpp ${BENCHMARK_SOURCE} benchmark_utilities.hpp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(LINKED_LIBRARIES
benchmark::benchmark
)

# Add executable and custom target for each suite, e.g. standard_honk_bench
# Add executable and custom target for each suite, e.g. ultra_honk_bench
foreach(BENCHMARK_SOURCE ${BENCHMARK_SOURCES})
get_filename_component(BENCHMARK_NAME ${BENCHMARK_SOURCE} NAME_WE) # extract name without extension
add_executable(${BENCHMARK_NAME}_bench main.bench.cpp ${BENCHMARK_SOURCE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

using namespace proof_system::honk;

namespace test_standard_honk_composer {
namespace test_eccvm_composer {

template <typename Flavor> class ECCVMComposerTests : public ::testing::Test {
protected:
Expand Down Expand Up @@ -102,4 +102,4 @@ TYPED_TEST(ECCVMComposerTests, EqFails)
bool verified = verifier.verify_proof(proof);
ASSERT_FALSE(verified);
}
} // namespace test_standard_honk_composer
} // namespace test_eccvm_composer
Original file line number Diff line number Diff line change
Expand Up @@ -446,29 +446,6 @@ void compute_monomial_and_coset_fft_polynomials_from_lagrange(std::string label,
}
}

/**
* @brief Compute standard honk id polynomials and put them into cache
*
* @details Honk permutations involve using id and sigma polynomials to generate variable cycles. This function
* generates the id polynomials and puts them into polynomial cache, so that they can be used by the prover.
*
* @tparam program_width The number of witness polynomials
* @param key Proving key where we will save the polynomials
*/
template <typename Flavor>
void compute_standard_honk_id_polynomials(auto proving_key) // TODO(Cody): proving_key* and shared_ptr<proving_key>
{
// Fill id polynomials with default values
// TODO(Cody): Allocate polynomial space in proving key constructor.
size_t coset_idx = 0; // TODO(#391) zip
for (auto& id_poly : proving_key->get_id_polynomials()) {
for (size_t i = 0; i < proving_key->circuit_size; ++i) {
id_poly[i] = coset_idx * proving_key->circuit_size + i;
}
++coset_idx;
}
}

/**
* @brief Compute sigma permutation polynomials for standard plonk and put them in the polynomial cache
*
Expand Down Expand Up @@ -529,31 +506,6 @@ void compute_plonk_generalized_sigma_permutations(const typename Flavor::Circuit
compute_monomial_and_coset_fft_polynomials_from_lagrange<Flavor::NUM_WIRES>("id", key);
}

/**
* @brief Compute sigma permutations for standard honk and put them into polynomial cache
*
* @details These permutations don't involve sets. We only care about equating one witness value to another. The
* sequences don't use cosets unlike FFT-based Plonk, because there is no need for them. We simply use indices based
on
* the witness vector and index within the vector. These values are permuted to account for wire copy cycles
*
* @tparam program_width
* @tparam CircuitBuilder
* @param circuit_constructor
* @param key
*/
// TODO(#293): Update this (and all similar functions) to take a smart pointer.
template <typename Flavor>
void compute_standard_honk_sigma_permutations(const typename Flavor::CircuitBuilder& circuit_constructor,
typename Flavor::ProvingKey* proving_key)
{
// Compute the permutation table specifying which element becomes which
auto mapping = compute_permutation_mapping<Flavor, /*generalized=*/false>(circuit_constructor, proving_key);
// Compute Honk-style sigma polynomial from the permutation table
compute_honk_style_permutation_lagrange_polynomials_from_mapping<Flavor>(
proving_key->get_sigma_polynomials(), mapping.sigmas, proving_key);
}

/**
* @brief Compute generalized permutation sigmas and ids for ultra plonk
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ TEST_F(PermutationHelperTests, ComputeHonkStyleSigmaLagrangePolynomialsFromMappi
TEST_F(PermutationHelperTests, ComputeStandardAuxPolynomials)
{
// TODO(#425) Flesh out these tests
compute_standard_honk_id_polynomials<Flavor>(proving_key);
compute_standard_honk_sigma_permutations<Flavor>(circuit_constructor, proving_key.get());
compute_first_and_last_lagrange_polynomials<Flavor>(proving_key);
}

Expand Down

0 comments on commit d2c9ded

Please sign in to comment.