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

Handle all newHeads subscriptions at a singleton class #5521

Open
1 of 2 tasks
Muhammad-Altabba opened this issue Oct 11, 2022 · 2 comments
Open
1 of 2 tasks

Handle all newHeads subscriptions at a singleton class #5521

Muhammad-Altabba opened this issue Oct 11, 2022 · 2 comments
Labels

Comments

@Muhammad-Altabba
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Feature Request

Currently, every piece of code that need to subscribe to newHeads will create a subscription at SubscriptionManager. This seems to create issues when there are too many subscriptions.
(Thanks to @jdevcs for the suggestion)

Use Cases

This will close those 2 issues #5517 and #5519. And will improve performance for the heavy-load users who use the library to process hundreds or thousands of transactions at their backend server for example.

Implementation Ideas

Additionally, this new singleton class could be used later to abstract the logic of both subscription and polling from other classes. In a way that other classes will ask this singleton class for notification whenever a new block arrives. And this singleton class will use either subscription or polling to get every new block header and pass it to the already registered classes.

Feature Examples/References

No response

Are you willing to implement this feature?

  • Yes
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

@github-actions github-actions bot added the Stale Has not received enough activity label Dec 11, 2022
@mconnelly8 mconnelly8 removed the Stale Has not received enough activity label Dec 12, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

@github-actions github-actions bot added the Stale Has not received enough activity label Feb 11, 2023
@jdevcs jdevcs removed the Stale Has not received enough activity label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants