Description
rollup_getZkEVMBlockNumber returns invalid hexadecimal number 0x when shomei has emopty state (did not get genesis block trie log). This causes client side caller code to break with deserialization errors. Instead and JSON-RPC error shall be returned.
Steps to Reproduce (Bug)
- Start Shomei with empty state
- call
{"jsonrpc":"2.0","id":19,"method":"rollup_getZkEVMBlockNumber","params":[]}
Expected behavior:
{"jsonrpc":"2.0","id":19,"method":"rollup_getZkEVMBlockNumber","params":[]}
{"jsonrpc":"2.0","id":19,"error":{"code": -32605, "message": "Server has empty state: no blocks imported."}}
Actual behavior:
{"jsonrpc":"2.0","id":19,"method":"rollup_getZkEVMBlockNumber","params":[]}
{"jsonrpc":"2.0","id":19,"result":"0x"}
Frequency:
Always
Versions (Add all that apply)