-
Notifications
You must be signed in to change notification settings - Fork 261
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
QGB Use Ecrecover to validate Ethereum signatures #605
QGB Use Ecrecover to validate Ethereum signatures #605
Conversation
Codecov Report
@@ Coverage Diff @@
## qgb-integration #605 +/- ##
===================================================
- Coverage 10.96% 10.93% -0.04%
===================================================
Files 57 57
Lines 9240 9240
===================================================
- Hits 1013 1010 -3
- Misses 8125 8127 +2
- Partials 102 103 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
reverting after 179 attestation. Converting to draft. |
we still might want to merge this even if it isn't the (sole) source of the issue described in #604. there's no rush tho, we can wait until we figure it out. |
The next issue found is that the commitments queried from Celestia-core are not deterministic. Will investigate that separately. |
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.
For my learning: what was wrong with the previous implementation?
Related: Do we want a unit test that prevents a future EthAddressFromSignature
regression?
if signature[64] == 27 || signature[64] == 28 { | ||
signature[64] -= 27 |
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.
Out of curiosity, why is this no longer necessary?
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.
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.
wow so a bunch of smart contracts include this check even though it's unnecessary
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.
yes. And also in our case we were adding this check while it's not needed.
@rootulp Nothing is wrong with the implementation, it was alright. I was suspecting it to be the reason why the relayer was failing. But, turned out to be the commitments. Also, I don't think we need a test because the two implementations give the same results. Edit: changed the title of the PR as it was misleading |
Co-authored-by: Rootul Patel <rootulp@gmail.com>
Thanks for explaining! So no changes were strictly needed in |
@rootulp The different values in tests are because we removed the signatures whos |
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
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.
👍
Will not merge until I get to the bottom of the commitments issue. |
* updates ethereum signer implementation * update test for correct signature * go.sum * Update x/qgb/types/ethereum_signer.go * Update x/qgb/types/ethereum_signer.go
Updates the implementation of the Ethereum signer.
Contributes to #604