-
Notifications
You must be signed in to change notification settings - Fork 31
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
Votes should be hashed according to EIP-712 #335 #399
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.
Did you check whether it is possible to calculate the vote hash only once?
contracts/core/PollingPlace.sol
Outdated
_v, | ||
_r, | ||
_s | ||
); | ||
_s); |
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.
_s); | |
_s | |
); |
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.
Done!
|
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.
LGTM 🎉
Just a tiny addition in a comment would be helpful in the future I think.
contracts/core/PollingPlace.sol
Outdated
/** Vote message */ | ||
struct VoteMessage { | ||
|
||
/** A unique identifier that identifies what chain this vote is about. */ |
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.
Please also explain here why it has to be part of the struct.
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.
Added the comment 👍
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.
LGTM 🎉
Fixes: #335
struct VoteMessage
struct Vote
Please note: In this PR
bytes20 coreIdentifier
is still part ofstruct VoteMessage
.As the votes are for both origin and auxiliary chain, we need to have the
coreIdentifier
information while generating thevoteHash
.