Open s-tikhomirov opened 2 weeks ago
Not sure I follow. afaikìdCommitment
and rateCommitment
are different things.
uint256 rateCommitment = PoseidonT3.hash([idCommitment, userMessageLimit]); idCommitment = hash of your rln secret.
Sure, I understand they are different things. This is purely a naming issue. Some variables in the code are simply called commitment
(or its derivative like isValidCommitment
), and for a novice (myself included) it's not always obvious whether we're talking about ID commitment or rate commitment. I suggest always using distinct naming to free up code readers' brain cycles.
The contract deals with two types of objects called "commitment": ID commitments and rate commitments. Using just "commitment" in variable names might be confusing. Suggestion: always use either
idCommitment
orrateCommitment
, including in variable names such asisValidCommitment
orcommitmentIndex
.