`waitForMessageStatus` queries from genesis to latest (server error)
I'm currently working with the Optimism SDK to prove withdrawals that I've initiated from a smart contract on Optimism.
When I'm calling waitForMessageStatus on the CrossChainMessenger with my own RPC URL, I get the following error: '{"jsonrpc":"2.0","error":{"code":-32600,"message":"block range is too wide"},"id":null}' as the SDK is querying for blocks from genesis to latest.
It would be great if the queryFilter below could be limited to querying over events from the past day (or a similar timeframe), so that user-defined RPCs don't error.
Ex. messenger.filters.RelayedMessage(messageHash, 100, 'latest')
https://github.com/ethereum-optimism/optimism/blob/3589cb98522481d4a9cda0b58ca042d495a6e173/packages/sdk/src/cross-chain-messenger.ts#L734-L736
Note: This is a problem for Ankr RPC's specifically, works as intended on Alchemy RPC's.
It would be nice to have a generic chunker and then allow the user to specify the start and the end with sane defaults
Yeah this needs to be improved in the SDK generally, unfortunately.
The sdk has been deprecated