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

Web socket updates #2409

Merged
merged 16 commits into from
Feb 6, 2025
Merged

Web socket updates #2409

merged 16 commits into from
Feb 6, 2025

Conversation

IronGauntlets
Copy link
Contributor

@IronGauntlets IronGauntlets commented Jan 30, 2025

This PR introduces the most recent changes to websocket specs, please see each commit.

Todo:

  • Fix sending of pending events. Currently, only when a new block is added the latest events are sent, however, there cannot be any duplicates and we need to make sure that the events are sent once the pending block is updated.
  • Add subscription block id, so users cannot call ws subscription with blockID = pending.
  • Add max websocket connections

@IronGauntlets IronGauntlets enabled auto-merge (rebase) January 30, 2025 02:21
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 71.09375% with 37 lines in your changes missing coverage. Please review.

Project coverage is 74.38%. Comparing base (daeb674) to head (838719f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
rpc/subscriptions.go 60.67% 33 Missing and 2 partials ⚠️
sync/sync.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2409      +/-   ##
==========================================
- Coverage   74.60%   74.38%   -0.23%     
==========================================
  Files         113      113              
  Lines       13052    13136      +84     
==========================================
+ Hits         9738     9771      +33     
- Misses       2583     2627      +44     
- Partials      731      738       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IronGauntlets IronGauntlets marked this pull request as draft January 30, 2025 04:04
@weiihann weiihann force-pushed the IronGauntlets/ws-updates branch from 19dbae4 to 448f8df Compare February 4, 2025 02:45
@weiihann weiihann marked this pull request as ready for review February 4, 2025 02:45
@weiihann weiihann force-pushed the IronGauntlets/ws-updates branch from 448f8df to a7f56f7 Compare February 4, 2025 02:59
Copy link
Contributor

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

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

LGTM overall, just some nitpicks

rpc/helpers.go Outdated Show resolved Hide resolved
rpc/subscriptions.go Outdated Show resolved Hide resolved
rpc/helpers.go Show resolved Hide resolved
rpc/subscriptions.go Show resolved Hide resolved
rpc/subscriptions.go Outdated Show resolved Hide resolved
rpc/subscriptions.go Outdated Show resolved Hide resolved
rpc/subscriptions.go Show resolved Hide resolved
@weiihann weiihann force-pushed the IronGauntlets/ws-updates branch from 62f2bd1 to f3110a9 Compare February 5, 2025 10:47
Copy link
Contributor

@AnkushinDaniil AnkushinDaniil left a comment

Choose a reason for hiding this comment

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

First round of review, I'll continue later

jsonrpc/websocket.go Outdated Show resolved Hide resolved
rpc/block.go Show resolved Hide resolved
rpc/subscriptions_test.go Outdated Show resolved Hide resolved
@weiihann weiihann force-pushed the IronGauntlets/ws-updates branch from 5c930aa to a566166 Compare February 5, 2025 11:26
jsonrpc/websocket.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

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

LGTM

@weiihann weiihann force-pushed the IronGauntlets/ws-updates branch from da54207 to 838719f Compare February 6, 2025 00:28
rpc/block.go Show resolved Hide resolved
@weiihann weiihann merged commit 198443f into main Feb 6, 2025
14 checks passed
@weiihann weiihann deleted the IronGauntlets/ws-updates branch February 6, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants