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

audit: fix silent metatx merge in comp timelock #212

Merged
merged 3 commits into from
Jun 20, 2023

Conversation

pscott
Copy link
Collaborator

@pscott pscott commented Jun 19, 2023

  • Ensure there are not duplicate MetaTransaction (excluding the salt) by using an array in memory (complexity is O(n^2) but we don't expect the list to be long in the average scenario: and it's better to use an array in memory than a mapping in storage for the "normal" cases)
  • Adds a test to ensure it has been fixed properly

Closes #178

@pscott pscott requested a review from Orland0x June 19, 2023 15:44
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #212 (4c5c6f1) into main (4027118) will increase coverage by 0.20%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   80.82%   81.03%   +0.20%     
==========================================
  Files          28       28              
  Lines         459      464       +5     
  Branches      111      112       +1     
==========================================
+ Hits          371      376       +5     
  Misses         73       73              
  Partials       15       15              
Impacted Files Coverage Δ
...tegies/CompTimelockCompatibleExecutionStrategy.sol 82.69% <100.00%> (+1.84%) ⬆️

Orland0x
Orland0x previously approved these changes Jun 20, 2023
Copy link
Contributor

@Orland0x Orland0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uTACK

@Orland0x Orland0x merged commit 6db831d into main Jun 20, 2023
@Orland0x Orland0x deleted the audit_comp_duplicate_metatx branch June 20, 2023 10:44
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.

audit: Comp Timelock Doesn't Support Duplicate MetaTransaction Queueing
2 participants