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

Updating subscriptions while running #108

Open
mikevercoelen opened this issue Jan 4, 2025 · 1 comment
Open

Updating subscriptions while running #108

mikevercoelen opened this issue Jan 4, 2025 · 1 comment
Labels
core A feature/improvement on the core crates. enhancement New feature or request question Further information is requested

Comments

@mikevercoelen
Copy link

mikevercoelen commented Jan 4, 2025

I'm initializing a Yellowstone datasource and I want to subscribe to additional accounts etc. at runtime.

This also goes for unsubscribing.

So essentially I want to be able to change subscriptions on the fly, at run time, not just at initialization code

I don't believe this is currently possible or did I miss something?

I'm also curious if there will be support for subscribing to new blocks, I'm happy to open a PR later if not.

Great library btw, very useful

@KellianDev
Copy link
Contributor

Thank you for raising this! You are correct—this functionality is currently missing. However, we could update the existing datasources to allow dynamic subscription management at runtime. One approach could involve passing an Arc of the datasource to your processors or another task responsible for managing subscriptions/unsubscriptions, which could then call the necessary function to handle these changes. Would that solution work for your use case?

While it is possible to achieve this with a custom datasource, it does require rewriting a significant amount of code, which we acknowledge isn't ideal.

Regarding your question about subscribing to new blocks: if you mean within the Yellowstone datasource, we are open to adding this feature. We've yet to decide whether this should involve introducing a new update type for blocks themselves or streaming the transactions of each block to Carbon. We’d love to hear your thoughts, and a PR on this would be most welcome!

Thanks again for your feedback and kind words—much appreciated! Let us know how you’d like to proceed.

@KellianDev KellianDev assigned KellianDev and unassigned KellianDev Jan 4, 2025
@KellianDev KellianDev added enhancement New feature or request question Further information is requested core A feature/improvement on the core crates. labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core A feature/improvement on the core crates. enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants