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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Web socket updates #2409

wants to merge 8 commits into from

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.18644% with 17 lines in your changes missing coverage. Please review.

Project coverage is 74.31%. Comparing base (ba5e78f) to head (82a7692).

Files with missing lines Patch % Lines
rpc/subscriptions.go 68.75% 15 Missing ⚠️
sync/sync.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2409      +/-   ##
==========================================
- Coverage   74.56%   74.31%   -0.26%     
==========================================
  Files         113      113              
  Lines       13020    13038      +18     
==========================================
- Hits         9709     9689      -20     
- Misses       2579     2613      +34     
- Partials      732      736       +4     

☔ 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
@@ -1031,3 +1032,55 @@ func marshalSubEventsResp(e *EmittedEvent, id uint64) ([]byte, error) {
},
})
}

func TestEventEquality(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was purely for debugging purposes. so it should be removed once things are fixed.

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

Successfully merging this pull request may close these issues.

1 participant