Skip to content

Conversation

@Mikelle
Copy link
Contributor

@Mikelle Mikelle commented May 22, 2024

Added deletion for commitments to avoid growing state

@Mikelle Mikelle requested a review from aloknerurkar May 22, 2024 22:23
"Invalid dispatch timestamp, block.timestamp - dispatchTimestamp < commitmentDispatchWindow"
);

address commiterAddress = commitmentDigest.recover(commitmentSignature);
Copy link
Collaborator

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;
Copy link
Collaborator

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

@Mikelle Mikelle merged commit 22ed2ee into main May 23, 2024
@Mikelle Mikelle deleted the sc-state-clean branch May 23, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants