-
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
Feat/membership notrack refactor #17
Feat/membership notrack refactor #17
Conversation
…ocused (tree cleanup)
This PR is ready for review. It corresponds to my other suggested PR to the spec: waku-org/specs#34 |
/// this fucntion decreases Merkle tree size and spends more gas (if eraseFromMembershipSet == true). | ||
/// @param idCommitments The list of idCommitments of the memberships to erase | ||
/// @param eraseFromMembershipSet Indicates whether to erase membership data from the membership set | ||
function eraseMemberships(uint256[] calldata idCommitments, bool eraseFromMembershipSet) external { |
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.
I guess setting eraseFromMembershipSet
to true
could be taken into account in the future to bring additional rewards to whoever call the function if we decide to choose that route, right? otherwise there's no incentive to pass true
since it will cost extra gas with no benefit.
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.
My idea here is that we don't want to burden users with extra gas cost for cleaning up the tree, but "we" (as contract administrators) may call eraseMemberships
with eraseFromMembershipSet = true
when necessary to clean up the tree at our own expense. I agree that we could plug in a reward mechanism for third parties to do this clean-up if we deem it necessary.
Co-authored-by: richΛrd <[email protected]>
Description
This PR introduces relatively minor changes, renaming, and refatoring implemented during my initial review of the RLNv2 contract inplementation.
Checklist
Ensure you completed all of the steps below before submitting your pull request:
pnpm adorno
?