Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate filters if not exists #88

Open
wpater opened this issue Jun 13, 2023 · 1 comment
Open

Recreate filters if not exists #88

wpater opened this issue Jun 13, 2023 · 1 comment

Comments

@wpater
Copy link

wpater commented Jun 13, 2023

On the substrate/moonbeam side (https://github.com/paritytech/frontier/blob/fba84577bf6507d76d40af891d2db38f4e385c11/template/node/src/eth.rs#L210 or https://github.com/PureStake/moonbeam/blob/946ee85591626eb9dc21f127bc301be50316546f/node/service/src/rpc.rs#L403) filters exists for 100 blocks and then are deleted.
I created listener for the events and it is working just fine but after 100 blocks I see below log in the evm-connect service:

2023-06-13T11:28:34.375Z] DEBUG evmconnect: ChainHead=1290 eventstream=0188b401-c924-578d-914d-0a26f49c33d5
...
[2023-06-13T11:28:34.401Z] ERROR evmconnect: RPC[000012919] <-- [200]: Filter id 4 does not exist. role=blocklistener
[2023-06-13T11:28:34.401Z] ERROR evmconnect: Failed to query block filter changes: Filter id 4 does not exist. role=blocklistener
[2023-06-13T11:28:34.401Z] DEBUG evmconnect: Retrying after 30.00 (failures=43) role=blocklistener

and this block 1290 is old (current head for my node is 2k+ right now).

I am using evm-connect v1.2.11.

Is it possible to implement some retry mechanism to recreate filters if they are not exist and find missed blocks/events?

@nguyer
Copy link
Contributor

nguyer commented Jun 13, 2023

The filter should get recreated if the blockchain connector restarts or reconnects. But it likely doesn't account for the possibility that it may suddenly not exist anymore. That seems like a bug in the RPC node that you're connected to. What RPC node are you currently using? Does this happen with other RPC nodes on the same chain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants