iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

Support for BlockHeight in RPC calls

Open deblanco opened this issue 2 years ago • 1 comments

What would you like to be added: Support for blockTag/blockHeight for eth_call operations and the rest, like the original ETH protocol support.

Why is this needed: To comply with the web3 implementation and to take a look at the past of the state of the chain. https://eth.wiki/json-rpc/API#eth_call

Hello,

My team is trying to check the balances of some tokens in the past and we've found that we are unable to get the correct response, the API always responds with a correct payload but with the state of the current blockHeight.

We've found that the blockTag parameter is ignored at the moment of parsing the request: https://github.com/iotexproject/iotex-core/blob/3934adb5123570277909a602cd745023a060b056/api/web3server.go#L361

Thanks, Daniel @ Unifi Protocol

deblanco avatar Apr 27 '22 13:04 deblanco

Thx for the feedback. Currently, we don't support call on certain height. This feature will be supported in our archive mode. Our dev team is working on it.

Liuhaai avatar Apr 27 '22 20:04 Liuhaai

Tracked in https://github.com/iotexproject/iotex-core/issues/2847

raullenchai avatar Sep 07 '22 00:09 raullenchai

Thank you guys!

deblanco avatar Sep 07 '22 01:09 deblanco