eth-infinitism/bundler

`getTransactionReceipt` only works if you call it within the timespan of current block

hexcowboy opened this issue · 1 comments

The getTransactionReceipt function hangs (and eventually times out) since the filter is only applied to the latest block. for now i'm working around by changing "latest" to -1000 which still should not be acceptable.

The ethers interface for BaseProvider may need to change to accept a blockFrom and blockTo parameter, or another scenario: the getTransactionReceipt could scan all blocks moving backwards in chunks of N blocks (expensive).

const res = await this.entryPoint.queryFilter(filter, 'latest')

This should be fixed by using the new rpc method eth_getUserOperationReceipt, etc
These will be implemented in the bundler-side, not the client side.
They still use the same event lookup, but a bundler is in a better position to cache the results, or use different internal APIs.
In general, the user should not be aware that it requires "logs" in order to get a receipt...