EventsManager.handlePastEvents() triggers 'invalid block range' rpc error for hermez polygon zkEVM
shlaurant opened this issue · 1 comments
shlaurant commented
A code below makes EventsManager to get logs starting 1 block ahead from current block
handleEvent(
ev:
| UserOperationEventEvent
| AccountDeployedEvent
| SignatureAggregatorChangedEvent,
): void {
switch (ev.event) {
case 'UserOperationEvent':
this.handleUserOperationEvent(ev as any);
break;
case 'AccountDeployed':
this.handleAccountDeployedEvent(ev as any);
break;
case 'SignatureAggregatorForUserOperations':
this.handleAggregatorChangedEvent(ev as any);
break;
}
this.lastBlock = ev.blockNumber + 1;
}
There is no problem with other nodes on this behavior, like geth or klaytn, but hermez polygon zkEVM returns an error as there is no block designated by 'fromBlock' of 'eth_getLogs'
reason: 'processing response error',
code: 'SERVER_ERROR',
body: '{"jsonrpc":"2.0","id":273,"error":{"code":-32602,"message":"invalid block range"}}',
error: Error: invalid block range
I think there is no official specification how the RPC method should handle this request. Would there be any plan to fix this?
drortirosh commented
Hi @shlaurant The reference bundler is meant to be a sample of a bundler compliant with the ERCs, it's not ready for production, and was never tested with hermez.
We are open to pull requests to fix such issues, but we're not running it ourselves on zkEVM.