-
Notifications
You must be signed in to change notification settings - Fork 240
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
Websocket multiple subscription from same ip causes duplicate responses #356
Comments
The cause of this seems to be some buggy handling of subscriptions in ethermint. Basically the subscription functions iterate over all filters, then for every filter of the same type, they deliver one event. The proper thing to do would be to either use only one filter for all subscriptions or just deliver the events from the filter created for each individual subscription. The fix should be relatively simple, just remove the api.filter iteration in rpc/websocket.go and use the filter created before. |
yeah, it's exactly the reason you mentioned, just submitted a fix: evmos/ethermint#955 |
the fix is backported to https://github.com/crypto-org-chain/cronos/releases/tag/v0.6.7 for mainnet nodes. |
Describe the bug
When I run two instances and subscribe to the same websocket, although the subscription returns different subscription id, it causes cuplicate responses.
To Reproduce
If you run the code from
n
terminals, each terminal will print the result n times. (in the screenshot, you can see the block 1609002 shows twice because i ran two instances. After i shut down another instance, it becomes normal again in block 1609005.)Expected behavior
I think they shouldn't affect each other
Desktop (please complete the following information):
Ubuntu 20.04
using v0.6.6 binary, but this issue was there from the first day of the mainnet
The text was updated successfully, but these errors were encountered: