From 7864270c2e0c7caa447f3fd042f7e2e381a7b75c Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 3 May 2023 15:43:08 -0400 Subject: [PATCH] chore: align BARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK usage (#411) --- cpp/src/barretenberg/crypto/generators/generator_data.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/src/barretenberg/crypto/generators/generator_data.cpp b/cpp/src/barretenberg/crypto/generators/generator_data.cpp index a0c4e522fa..20345bae16 100644 --- a/cpp/src/barretenberg/crypto/generators/generator_data.cpp +++ b/cpp/src/barretenberg/crypto/generators/generator_data.cpp @@ -6,7 +6,7 @@ namespace { // Parameters for generator table construction struct GeneratorParameters { - size_t num_default_generators; // Number of unique base points with default main index + size_t num_default_generators; // Number of unique base points with default main index with precomputed ladders size_t num_hash_indices; // Number of unique hash indices size_t num_generators_per_hash_index; // Number of generators per hash index size_t hash_indices_generator_offset; // Offset for hash index generators @@ -19,10 +19,10 @@ struct GeneratorParameters { constexpr GeneratorParameters GEN_PARAMS = {BARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK}; #else #ifdef __wasm__ -constexpr GeneratorParameters GEN_PARAMS = {64, 16, 32, 64}; +constexpr GeneratorParameters GEN_PARAMS = {32, 16, 8, 2048}; // TODO need to resolve memory out of bounds when these are too high #else -constexpr GeneratorParameters GEN_PARAMS = {2048, 32, 128, 2048}; +constexpr GeneratorParameters GEN_PARAMS = {2048, 16, 8, 2048}; #endif #endif @@ -294,4 +294,4 @@ const fixed_base_ladder* generator_data::get_hash_ladder(size_t num_bits) const } } // namespace generators -} // namespace crypto +} // namespace crypto \ No newline at end of file