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

[JSONRPC] Fix websocket subscription #417

Merged
merged 5 commits into from
Mar 2, 2022
Merged

Conversation

dbrajovic
Copy link
Contributor

@dbrajovic dbrajovic commented Feb 14, 2022

Fixes EDGE-387

Description

This PR fixes the issue of websocket subscriptions becoming unresponsive after a predefined timeout.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Use the websocat tool to verify the subscription is sending responses:

  1. Start a 4-node cluster
  2. Connect to a node using websocat [node_ws_url]
  3. Send the request (in websocat):
    {"id": 1, "method": "eth_subscribe", "params": ["newHeads"]}
  4. Observe the responses are being received (subscription is not becoming silent)

@dbrajovic dbrajovic added the hotfix Major bug fix that should be merged ASAP label Feb 14, 2022
@dbrajovic dbrajovic self-assigned this Feb 14, 2022
Copy link
Contributor

@0xAleksaOpacic 0xAleksaOpacic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. Thank you manual testing instructions

Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for hunting down this bug 🙏

I've left some comments regarding the test that we should discuss 👍

Copy link
Contributor

@Kourin1996 Kourin1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@dbrajovic dbrajovic merged commit 8a033aa into develop Mar 2, 2022
@dbrajovic dbrajovic deleted the fix/uninstall_filters_only branch March 2, 2022 10:32
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix Major bug fix that should be merged ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants