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

Fix Sse client api #6685

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from
Open

Conversation

pawanjay176
Copy link
Member

@pawanjay176 pawanjay176 commented Dec 12, 2024

Issue Addressed

N/A

Proposed Changes

The get_events api in BeaconNodeHttpClient uses a regular http get request to stream the events. This doesn't handle a lot of sse params like return of partial bytes, maintaining a heartbeat etc. Using the get_events stream as an api consumer led to the connection getting repeatedly cutoff.
This PR uses reqwest_eventsource to do the sse handling.

Additional Info

Using reqwest-eventsource v0.5 to keep the reqwest version same as what we use in lighthouse.

@pawanjay176 pawanjay176 added the ready-for-review The code is ready for review label Dec 12, 2024
@pawanjay176
Copy link
Member Author

Tests seem to be failing, gonna try and fix it tomorrow

@michaelsproul michaelsproul added the v6.1.0 New release c. Q1 2025 label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review v6.1.0 New release c. Q1 2025
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants