Skip to content

Commit

Permalink
chore: align BARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK usage (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad authored May 3, 2023
1 parent a448486 commit 7864270
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/src/barretenberg/crypto/generators/generator_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -294,4 +294,4 @@ const fixed_base_ladder* generator_data::get_hash_ladder(size_t num_bits) const
}

} // namespace generators
} // namespace crypto
} // namespace crypto

0 comments on commit 7864270

Please sign in to comment.