question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eth_sign API out of sync with ethapi

See original GitHub issue

As of https://github.com/ethereum/go-ethereum/pull/2940, eth_sign api has changed. It is now eth_sign(address, msg), accepting arbitrary input and putting it through keccak256.

Expected Behavior

Upstream eth_api introduced a breaking change where eth_sign now accepts the actual message, rather than a 32 byte hash digest. Signature is now eth_sign(address, msg)

Current Behavior

testrpc currently emulates existing eth_sign(address, sha3(msg)) behavior

Possible Solution

Change ethereumjs-util.ecsign to call keccak256 before calling secp256k1.sign

Context

We need to sign statements with web3, which is now incompatible between testrpc and real ethapi.

Your Environment

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:10
  • Comments:25 (8 by maintainers)

github_iconTop GitHub Comments

13reactions
fumecowcommented, Apr 21, 2017

I made a diagram of the current differences between testrpc, geth and parity with respect to eth_sign behavior and on-chain ecrecover.

signature generation validation

2reactions
rhlsthrmcommented, Apr 26, 2018

Not to mention now we are supposed to use personal_sign or even eth_signTypedData instead of eth_sign (see this).

Does ganache plan to support these new features anytime soon?

Read more comments on GitHub >

github_iconTop Results From Across the Web

eth_sign API out of sync with ethapi · Issue #555 - GitHub
We need to sign statements with web3, which is now incompatible between testrpc and real ethapi. Your Environment. Version used: v3.0.3 ...
Read more >
web3.eth API — Web3.py 5.31.3 documentation - Read the Docs
Defaults to 'latest' . Returns either False if the node is not syncing or a dictionary showing sync status. Returns the current Coinbase...
Read more >
eth_syncing - Ethereum RPC method documentation
Eth Syncing. Returns an object with the sync status of the node if the node is out-of-sync and is syncing. Returns false when...
Read more >
EthSign
EthSign is a decentralized, versioned, and consensus-based electronic agreements signing application built on Polygon.
Read more >
深入分析SMT攻击函数和真实攻击交易的构造 - 知乎专栏
... 更多的兼容性问题和各种吐槽:eth_sign API out of sync with ethapi ... is the difference between web3.eth.sign, web3.eth.accounts.sign, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found