-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: do not keep track of membership registration order #14
Conversation
Interesting and simple approach. Perhaps as part of the solution we should include a "reward" for the person calling |
Could be an interesting incentive to add, but where would this reward come from? from the expired memberships?. The way it's set right now is that memberships could be expired when we reach the maximum rate limit. The client would then have to find memberships that are expired whose sum of rate limits that will be free once they're expired is enough to allow a registration. |
I think for now, we can expect us (waku team) to run this when needed to help keeping it tidy. Long term, there is an incentive for any project/application using this smart contract to call this so that their users can join in but it would make sense to have a small rewards indeed. E.g. allocating 1% of RLN fee for this reward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offered some idea re error phrasing.
79fd7ec
to
2b1600a
Compare
* unify terminology for mdetails * more DRY in LinearPriceCalculator * improve terminology consistency (#16) * refactor, minor fixes * do not reset ongoing grace period on extension (cf. spec change) * minor renaming, comments * refactor, group functions by funcitonality * extract membership expiration calculation to internal function * save active duration per membership (must carry over after extension) * optional lazy erasure from membership set * minor fixes in tests * fix: off-by-one: end index can't be equal to next free index * minor refactoring, comments * define period boundaries: start inclusive, end exclusive * separate eraseMembership functions to user-focused (lazy) and admin-focused (tree cleanup) * minor fix to maintain line lengths * unify membership-related events * add test for zero grace period * fix typo in comment Co-authored-by: richΛrd <[email protected]> --------- Co-authored-by: richΛrd <[email protected]>
2b1600a
to
6db38e3
Compare
a3a32a1
to
66a1a6c
Compare
@fryorcraken, all your suggestions and doubts should have been applied/answered! |
Description
Removes the ordering for the memberships according to discussion in waku-org/specs#34 (comment)
To expire a membership the client must keep track of the membership expiration dates, which can be done by using
getCommitments(uint32 startIndex, uint32 endIndex)
to retrieve the list of commitments, andexpirationDate(uint256 idCommitment)
to retrieve the expiration date of the commitments.