answers Roman's comments

This commit is contained in:
stas
2024-02-14 12:24:03 -05:00
committed by ChickenLover
parent 76c3b4ba01
commit 62cf733c5f
2 changed files with 2 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ poseidon_hash<scalar_t, arity+1>(input, output, n, constants, config);
**Parameters:**
- **`scalar_t`:** a scalar field of the selected curve. Currently only `BLS12-381`.
- **`scalar_t`:** a scalar field of the selected curve.
You can think of field's elements as 32-byte integers modulo `p`, where `p` is a prime number, specific to this field.
- **arity:** number of elements in a hashed block.

View File

@@ -2,7 +2,7 @@
#include <fstream>
#include <iostream>
// select the curve (only 2 available so far)
// select the curve
#define CURVE_ID 2
// include Poseidon template
#include "appUtils/poseidon/poseidon.cu"
@@ -121,7 +121,6 @@ int main(int argc, char* argv[])
poseidon_hash<curve_config::scalar_t, data_arity+1>(data, &tree[tree_index(leaf_level, 0)], tree_width, constants, config);
std::cout << "3. Building Merkle tree" << std::endl;
// Poseidon<BLS12_381::scalar_t> tree_poseidon(tree_arity, stream);
PoseidonConstants<scalar_t> tree_constants;
init_optimized_poseidon_constants<scalar_t>(tree_arity, ctx, &tree_constants);
PoseidonConfig tree_config = default_poseidon_config<scalar_t>(tree_arity+1);