-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Bug]: Why eth_sign doesn't allow an arbitrary length bytes message #15857
Comments
Hey @frozeman, thank you for your report! I'm looping in our dx team (cc: @vandan) to triage that, but I'm curious on why you are looking to use |
Hi @bschorchit thanks for the prompt reply. Here are more details. From MetaMask docs
-> signs a hash (i.e. 32bytes expected as described by error above) From Ethereum Docs-> signs a N Bytes long message |
To add more context to the issue: the implementation of Since that PR, at least in go-ethereum, The version of |
Thank you for the context and additional info! |
@bschorchit to give a bit more context.
We (I was part of the geth team, at that time) introduced the As for |
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days. Thank you for your contributions. |
This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions. |
Describe the bug
According to the RPC specs of ethereum, we allow arbitrary length bytes to be signed, and the hashing of the bytes should happen WITHIN the signer.
https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign
Meta mask though expects a 32 bytes hash, which is not correct. (Even the example we put in the RPC docs
0xdeadbeaf
is not working)Why choosing to make this sign endpoint non-standard?
Also it will make it impossible to see the content of a message, if its for example a UTF8 string. Which also makes SIWE impossible by default.
Steps to reproduce
Call
eth_sign
with [address, n length bytes]Error messages or log output
Version
latest
Build type
No response
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: