telosnetwork / telos-evm-rpc

2 stars 3 forks source link

eth_getBlockByNumber unhandled exception #83

Closed tomtomcrypto closed 4 months ago

tomtomcrypto commented 6 months ago

Getting some of both of these on the latest master for RPC commit 982b83d98a78cd37bce966892a7b6e1598af934b

2024-05-02T00:58:54: RPCERROR: 2024-05-02T00:58:54.594Z - 13.251.201.236 - {"code":3,"message":"Cannot read properties of undefined (reading '@transactionsRoot')"} | Method: eth_getBlockByNumber | REQ: ["0x1439072a",true,{"ip":"13.251.201.236","origin":"okhttp/4.9.1","usage":null,"limit":null}]

and

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
TypeError: fetch failed
    at node:internal/deps/undici/undici:12618:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
tomtomcrypto commented 5 months ago

Added a retry and more logging (so we can have the block logged no matter the method called) but this is definitely coming from elk, need to take a look at block 339281706 @guilledk

tomtomcrypto commented 4 months ago

We will just return null if block is missing but maybe we should check the current head and to make sure that block doesn't exist and log an appropriate error if it should exist in ELK