eth/filters: eth_getLogs fast exit for invalid block range - #28386
Conversation
holiman
left a comment
There was a problem hiding this comment.
Seems reasonable to me, some nits though
@holiman fixed it, please take another look. |
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
This reverts commit a15f45c. Signed-off-by: jsvisa <delweng@gmail.com>
This reverts commit 4bd9908. Signed-off-by: jsvisa <delweng@gmail.com>
This reverts commit aa50100. Signed-off-by: jsvisa <delweng@gmail.com>
This reverts commit ed3b1e6. Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
85f9acf to
ed51166
Compare
|
Blocked on ethereum/execution-apis#480 being merged. |
|
@s1na @jsvisa Could you generalize the error message? Would like to implement block range limit for Something like |
@kaliubuntu0206 I think this error message would work for us too. However generally I'd like if we could standardize error codes instead of error messages. It's perfectly reasonable that clients would return different messages (e.g. some with more context or less). |
Signed-off-by: jsvisa <delweng@gmail.com>
…thereum#28386)" This reverts commit df4c930.
…thereum#28386)" This reverts commit df4c930.
We can quickly exit if the from > to in
eth_getLogsrequest.BTW, currently for
eth_newFilter, if from>to, then the RPC returns an error, but no error foreth_getLogs, should we need to unify their behavior, or let it go?{ "jsonrpc": "2.0", "method": "eth_getLogs", "id": 74, "params": [ { "toBlock": "0x1", "fromBlock": "0x2000" } ] }{ "id": 74, "jsonrpc": "2.0", "result": [] }{ "jsonrpc": "2.0", "method": "eth_newFilter", "id": 73, "params": [ { "toBlock": "0x1", "fromBlock": "0x2000" } ] }{ "error": { "code": -32000, "message": "invalid from and to block combination: from > to" }, "id": 73, "jsonrpc": "2.0" }