Problem
We would like to have a self-contained poseidon module that works natively with arkworks traits, so that round parameters and constants are generated directly from the field characteristic and not hard-coded as now are. This will further enable current and future zerokit modules that use it to access the same Poseidon implementation.
In order to achieve such goal, we can progressively refactor the poseidon implementation currently present in the rln module.
The main required steps should be:
Acceptance Criteria
Problem
We would like to have a self-contained
poseidonmodule that works natively with arkworks traits, so that round parameters and constants are generated directly from the field characteristic and not hard-coded as now are. This will further enable current and future zerokit modules that use it to access the same Poseidon implementation.In order to achieve such goal, we can progressively refactor the poseidon implementation currently present in the
rlnmodule.The main required steps should be:
GrainLFSRin order to generate constants from hard-coded round parameters (i.e., the tuples(t, RF, RP)) and field characteristic;PrimeFieldtrait to Poseidon, so that the latter can be instantiated using different curves;poseidonimplementation to a separate module, e.g. underutils. This step can be done at any moment.Acceptance Criteria