Skip to content
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

Inconsistent response from eth_call RPC API #17516

Closed
erc20-exchange opened this issue Aug 26, 2018 · 1 comment
Closed

Inconsistent response from eth_call RPC API #17516

erc20-exchange opened this issue Aug 26, 2018 · 1 comment

Comments

@erc20-exchange
Copy link

Here is the problem I see: RPC response for the same eth_call is inconsistent. I was not able to figure out why, but sometimes it succeeds and returns data needed and sometimes it returns "0x" as a response. This may depend on a load of node or something else, but behavior is totally inconsistent.

System information

Geth version:
Version: 1.8.14-stable
Git Commit: 316fc7e
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.3
Operating System: linux
GOPATH=
GOROOT=/home/travis/.gimme/versions/go1.10.3.linux.amd64

OS & Version: Linux ip-172-31-44-203 4.4.0-1061-aws #70-Ubuntu SMP Fri May 25 21:47:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Expected behaviour

Consistent response from eth_call RPC with data from a contract.

Actual behaviour

Sometimes data is returned with no problems (and data is correct), sometimes I get "0x" as a response. Also, whenever I try the same function call in MEW it works just fine. Also, I've notes that if I request less data from a contract the function becomes more stable in returning the data, but stil have chances to fail.

Interface of the contract function

function get_balances(address a, uint32 offset, uint32 count) constant returns (uint256, uint256, uint256[], uint256[])

Steps to reproduce the behaviour

curl :8545 -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"from": "<your_account>", "to": "0xa5B206F9832f9B90652AdFC6c336792bBd1883a0", "data": "0xcb3fe695000000000000000000000000e450743e5f213bb32b0c3f4c7b9732b51e3c702e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064"}, "latest"],"id":1}'

which is equivalent of get_balances(0xe450743e5f213bb32b0c3f4c7b9732b51e3c702e, 0, 100);

@stale
Copy link

stale bot commented Aug 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant