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

Archive mode related RPC return wrong result #4167

Open
ququzone opened this issue Mar 6, 2024 · 0 comments
Open

Archive mode related RPC return wrong result #4167

ququzone opened this issue Mar 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ququzone
Copy link
Contributor

ququzone commented Mar 6, 2024

What version of iotex-core image (or code branch) are you using?

All

What did you do? If possible, provide a recipe for reproducing the error.

Query chain' state from block height related RPC, the result always return latest state, not queried height.

curl https://babel-api.mainnet.iotex.io \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getBalance","params":["0x3c3acce50f7bb6390937139f9e10f99478a83702", "0x1f4"],"id":1,"jsonrpc":"2.0"}'

{"jsonrpc":"2.0","id":1,"result":"0x399a62af592971339dcb"}

What did you expect to see?

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"missing trie node 945e00a1e6f72d0cea125f726a81a110c5f04da829238e186cdcf5e887e8be79 (path )"}}

A pruned node cannot serve API requests for certain RPC methods older than 128 blocks.

Should fixed API:

  • eth_getBalance
  • eth_getCode
  • eth_getTransactionCount
  • eth_getStorageAt
  • eth_call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants