-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
Discrepency on eth_call rpc responses when the from field is omitted #20685
Comments
I don't understand how you can expect them to be identical. The rpc endpoint simulates a call, and if the call depends on the tx origin, then whether "from" was supplied externally or not makes a difference.Either I misunderstood something, or this works as expected
|
Totally understand that the from field could make a difference. Based on that user's report on the linked ethers.js issue, the odd thing was that with and without the from field Geth and Parity seem to have diverging behavior here. Infura soley runs geth for mainnet, another provider Alchemy uses Parity. The reporter included a link to test against Alchemy:
Maybe the issue is that Parity is providing the incorrect response here but I wasn't sure. Any insights would be helpful. |
So, if not given a I don't know what the "best" default is here. |
I think we should remove this implicit "first local account" behavior. Two reasons: local accounts can be different on every machine, and it's the only reason why we depend on accounts from the API implementation. |
Parity uses null account address by default, which is the saner choice. |
@egalano test again with the new version go geth 2.2.1 |
We're a bit tied here. My preference would be to make the I think using If we make it mandatory, web3-providers and libraries can always choose to allow the user to have it optional, but then the libraries would have to provide the default themselves. Putting this out there -- opinions? |
I would go with using |
Hi there,
Please note that this is an issue tracker reserved for bug reports and feature requests.
For general questions please use the gitter channel or the Ethereum stack exchange at https://ethereum.stackexchange.com.
System information
Geth version: geth v1.9.10
OS & Version: Linux
Commit hash : 58cf568
Expected behaviour
JSON-RPC response to
eth_call
with and without the optionalfrom
field should be the sameActual behaviour
An Infura user reported an issue with mismatched responses when omitting the from field. The issue was reported to ethers.js (ethers-io/ethers.js#705) but we were able to reproduce the error on the Ropsten network using a curl request directly to a geth node.
Steps to reproduce the behaviour
The user reported accurate repro steps here: ethers-io/ethers.js#705 (comment)
Without a from field
With a from field
The expected behavior is that these responses should be identical
The text was updated successfully, but these errors were encountered: