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

Ensure order of delivery for event subscription #2548

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

infrmtcs
Copy link
Contributor

Depends on #2547

Comment on lines 133 to 135
headerSub := h.newHeads.SubscribeKeepLast()
reorgSub := h.reorgs.SubscribeKeepLast() // as per the spec, reorgs are also sent in the events subscription
pendingSub := h.pendingBlock.SubscribeKeepLast()
Copy link
Contributor

Choose a reason for hiding this comment

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

Some other subscription methods (i.e. subscribeNewHeads, subscribeTransactionStatus, subscribePendingTxs) also rely on these feeds. Do they need to use SubscribeKeepLast as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's likely yes. I plan to get it done for an endpoint (starknet_subscribeEvents) first, then convert it to a reusable form, then use it with other endpoints.

@infrmtcs infrmtcs force-pushed the dat/order branch 2 times, most recently from 0f01670 to 5892b03 Compare February 26, 2025 10:20
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 73.62%. Comparing base (77f398a) to head (4c978c2).

Files with missing lines Patch % Lines
rpc/v8/subscriptions.go 76.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2548      +/-   ##
==========================================
- Coverage   73.64%   73.62%   -0.02%     
==========================================
  Files         137      137              
  Lines       16675    16656      -19     
==========================================
- Hits        12280    12263      -17     
+ Misses       3534     3532       -2     
  Partials      861      861              

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

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.

2 participants