onflow / flow-evm-gateway

FlowEVM Gateway implements an Ethereum-equivalent JSON-RPC API for EVM clients to use
https://developers.flow.com/evm/about
Apache License 2.0
11 stars 9 forks source link

"Internal error" from https://testnet.evm.nodes.onflow.org when calling eth_getBlockByNumber on specific blocks #518

Closed ilyalukyanov closed 2 weeks ago

ilyalukyanov commented 3 weeks ago

Instructions

Please fill out the template below to the best of your ability and include a label indicating which tool/service you were working with when you encountered the problem.

Problem

the public RPC seems to be having some issues,, e.g.:

curl --silent --location 'https://testnet.evm.nodes.onflow.org' --header 'Content-Type: application/json' --data '{"method":"eth_getBlockByNumber","params":["0x36C5F1", false],"id":1,"jsonrpc":"2.0"}'

always returns:

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32000,
        "message": "internal error"
    }
}

That was observed on multiple blocks: 3589614, 3589615, 3589616, 3589617, 3589618. There may be more.

A more random recent block is returned w/o issues, e.g.:

curl --silent --location 'https://testnet.evm.nodes.onflow.org/' --header 'Content-Type: application/json' --data '{"method":"eth_getBlockByNumber","params":["0x37831D", false],"id":1,"jsonrpc":"2.0"}'

Steps to Reproduce

As per above

Acceptance Criteria

Response should be successful and correct block data should be returned.

Context

Axelar Amplifier integration. The whole Flow integration won't work unless events can be queried from an RPC reliably.

sideninja commented 3 weeks ago

This was fixed and will be reflected once we switch to the EVM GW that reindexed the data. Will be done today.

franklywatson commented 2 weeks ago

The fix has been released:

% curl --silent --location 'https://testnet.evm.nodes.onflow.org' --header 'Content-Type: application/json' --data '{"method":"eth_getBlockByNumber","params":["0x36C5F1", false],"id":1,"jsonrpc":"2.0"}'
{"jsonrpc":"2.0","id":1,"result":{"number":"0x36c5f1","hash":"0xeebc092ce664a31d7d562571d8ec52324cc0aa12cb32f2c15fc76d1f29be1e08","parentHash":"0x6479f9541f36886f820d591dbac5375eacd93c0dc179555addd410645cdb2953","nonce":"0x0100000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","stateRoot":"0x0000000000000000000000000000000000000000000000000000000000000000","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","miner":"0x0000000000000000000000030000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0xa3","gasLimit":"0xe4e1c0","gasUsed":"0x0","timestamp":"0x66d87f2a","transactions":[],"uncles":[],"mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","baseFeePerGas":"0x0"}}