Since I began trying to add tests to the RLN part of nwaku I've been having a lot of issues trying to understand the code flow, which ate a lot of time.
Suggested solution
Document via tests, code examples and plain old documentation, the basic/advanced flows of RLN:
Creating, registering and storing RLN credentials
Initialising a node in OnChain mode: How to and what parameters are required
If the idCredential monkeypatching mechanism is required to make a node work (at least testing-wise), that should also be documented.
Etc.
One easy way to achieve that is by having tests that clearly show the correct approach for each of those situations, including comments that clarify possible misunderstandings.
Also, some concepts, such as pk and sk, are not directly mapped from RFC into the code. Adding comments telling what those variables correspond to in the RFC would help finding them.
I haven't taken of all the little issues I've had during testing. Should I be listing them somewhere? E.g.: In this document
agree, the devex with rln can be better. with the rlnv2 fork we will be cutting a lot of code out of scope, and reducing the surface area for testing. I'll set up a milestone for rln documentation
Problem
Since I began trying to add tests to the RLN part of nwaku I've been having a lot of issues trying to understand the code flow, which ate a lot of time.
Suggested solution
Document via tests, code examples and plain old documentation, the basic/advanced flows of RLN:
OnChain
mode: How to and what parameters are requiredidCredential
monkeypatching mechanism is required to make a node work (at least testing-wise), that should also be documented.Also, some concepts, such as
pk
andsk
, are not directly mapped from RFC into the code. Adding comments telling what those variables correspond to in the RFC would help finding them.I haven't taken of all the little issues I've had during testing. Should I be listing them somewhere? E.g.: In this document