Skip to content
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

Merkle tree expiries #124

Merged
merged 5 commits into from
Sep 9, 2022
Merged

Merkle tree expiries #124

merged 5 commits into from
Sep 9, 2022

Conversation

cedoor
Copy link
Member

@cedoor cedoor commented Aug 29, 2022

Description

This PR integrates a mechanism to allow currently-generated proofs to be validated for a certain period of time, even when the Merkle tree root has been updated in the meantime. The merkleTreeExpiries mapping contains for each group the list of roots with the creation date and the duration after which each root is no longer usable for generating Semaphore proofs. The default value for roots duration is 1 hour, but it can also be defined by external users when a group is created.

This PR also updates some tree variable names.

Related Issue

#98 #120

Does this introduce a breaking change?

  • Yes
  • No

A new parameter for the Merkle tree root has been added to the verifyProof function.

@cedoor cedoor added feature 🚀 This is enhancing something existing or creating something new refactoring ♻️ A code change that neither fixes a bug nor adds a feature labels Aug 29, 2022
@cedoor cedoor self-assigned this Aug 29, 2022
@cedoor cedoor changed the title Merkle tree root expirations Merkle tree expiries Sep 9, 2022
@cedoor cedoor merged commit 4a94fb1 into dev Sep 9, 2022
@cedoor cedoor deleted the feat/root-expirations branch September 9, 2022 09:41
@cedoor cedoor linked an issue Sep 9, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 This is enhancing something existing or creating something new refactoring ♻️ A code change that neither fixes a bug nor adds a feature
Projects
No open projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

Root history + expiry, to fix mempool invalidations
1 participant