-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix: H-02 Votes Can Be Blocked #593
Conversation
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.
utACK, any reason you chose double mapping instead of adding the l1 message sender address?
@@ -473,7 +473,7 @@ describe('Ethereum Transaction Authenticator', function () { | |||
); | |||
expect.fail('Should have failed'); | |||
} catch (err: any) { | |||
expect(err.message).to.contain(shortString.encodeShortString('Invalid sender address')); | |||
expect(err.message).to.contain(shortString.encodeShortString('Commit not found')); | |||
} |
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.
could we add a test that tests the "attack" vector that OZ mentioned? Just to add it as a regression test for later work
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.
yeah sorry added but forgot to push
I had a think about the other approach but not sure its really feasible as it would mean computing the hash on-chain in order to include |
Replaces the
_commits
(commit -> address) mapping with a double mapping (commit, address -> bool).This allows the same commit to be made by 2 different addresses, which wasn't possible before.
This closes #555 as now its impossible for a user to block another by making a valid commit for their action before they do.