[RPC] requireCanonical=false raises block-not-canonical error
System information
Erigon version: 2.60.8-dec9d206
OS & Version: Linux
Chain/Network: Polygon POS Amoy
Expected behaviour
{"jsonrpc":"2.0","id":24,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"}
Actual behaviour
{"jsonrpc":"2.0","id":24,"error":{"code":-32603,"message":"hash 0d30235c89b4c59bffbf3d8997921d6b666835f4e7ea8eb262dcd140a000f20e is not currently canonical"}}
Steps to reproduce the behaviour
curl http://localhost:8545 -X POST -H 'Content-Type: application/json' -d ' { "jsonrpc": "2.0", "method": "eth_getStorageAt", "id": 24, "params": ["0xccf28a443e35f8bd982b8e8651be9f6cafed4672","0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc",{"blockHash":"0x0d30235c89b4c59bffbf3d8997921d6b666835f4e7ea8eb262dcd140a000f20e", "requireCanonical": false}] }'
Hey, @AskAlexSharov , as I see you've assigned a High priority here,just wanted to follow up and ask if you've been able to identify the culprit here?
Hey @AskAlexSharov , wanted to kindly bump this again. Would really appreciate some insights here when possible! 🙏
tnx for reminding. team will take a look
@AskAlexSharov any update on this?
Hi, non-canonical block hashes with requireCanonical: false is not supported for eth_getStorageAt, eth_getCode, eth_getBalance, etc. in Erigon. Only canonical hashes would work.
Supporting requireCanonical: false would possibly be a big work item for us that at moment sits low on our priorities list. We do not expect to be able to work on it in the near future.
However, @deepakbnsl @pgtodoroff @danalchemy it would be good for us to understand your use case so we can plan for a good solution when the time comes. In what situations do you need to use this and why? Is it by any chance related to this https://github.com/erigontech/erigon/issues/1613 and hardhat forking from mainnet? Or is it something else?