-
Notifications
You must be signed in to change notification settings - Fork 20
chore: deleting state after usage #87
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
Conversation
| "Invalid dispatch timestamp, block.timestamp - dispatchTimestamp < commitmentDispatchWindow" | ||
| ); | ||
|
|
||
| address commiterAddress = commitmentDigest.recover(commitmentSignature); |
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.
We should also check here that the commiterAddress == msg.sender
We shouldnt allow others to send encrypted commitments for some other provider. I think this was missing from before.
|
|
||
| // Mark this commitment as used to prevent replays | ||
| commitments[commitmentIndex].commitmentUsed = true; | ||
| // commitments[commitmentIndex].commitmentUsed = true; |
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.
remove commented code before checking in
Added deletion for commitments to avoid growing state