node icon indicating copy to clipboard operation
node copied to clipboard

eth_getLogs strange behavior

Open yupasik opened this issue 1 year ago • 6 comments

Describe the Bug Try to get logs for block 6056351. Got error, but actually there are not so many results as in error

To Reproduce Request: {"jsonrpc": "2.0", "params": [{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"], "fromBlock": "0x5c699f", "toBlock": "0x5c699f"}], "id": "agvt6p2g", "method": "eth_getLogs"} Response: {"jsonrpc":"2.0","id":"agvt6p2g","error":{"code":-32000,"message":"query returned more than 10000 results"}}

yupasik avatar Dec 10 '24 08:12 yupasik

There is definitely something a bit odd about this block.

But shouldn't you provide the address parameter when setting topics anyway? What are you trying to do?

gartnera avatar Dec 10 '24 17:12 gartnera

i've got 100k + addresses, can't do 100+k rpc requests to check one block

yupasik avatar Dec 12 '24 10:12 yupasik

@yupasik, there are 9 transactions in that block. The one with txhash A945750482C02A6A462CD9A989061560D4178F7B02F1F5FC9378154EC683FD5D generated 49514 tx_log entries, 36008 of which involve your chosen topic.

With a default configuration, the RPC endpoint is unwilling to return that much data. When stored as a file, the json output of the command above is 142MB large.

If you run your own node, you can retrieve all of the entries yourself for that transaction in that block by running the command below. This would allow you to sidestep the default limitations that you can expect to encounter with all third party RPC providers.

zetacored query txs --events tx.height=6056351 --limit 1 --page 5 -o json

I would strongly encourage you to break the 49514 operations up in to more than a single transaction. That would likely unblock your existing process.

CryptoFewka avatar Dec 14 '24 02:12 CryptoFewka

I am curious about your use case for this. Are you using disperse to fund some wallets and claim the Layer3 rewards?

CharlieMc0 avatar Dec 14 '24 15:12 CharlieMc0

A945750482C02A6A462CD9A989061560D4178F7B02F1F5FC9378154EC683FD5D - this is not my transaction :) i've got 100+k addresses and need to process transactions related to them getting дщпы from blocks

yupasik avatar Dec 14 '24 16:12 yupasik