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

Report RPC id in follow up subscription reports too [XRPL+Xahau] #291

Open
WietseWind opened this issue Mar 14, 2024 · 2 comments
Open

Report RPC id in follow up subscription reports too [XRPL+Xahau] #291

WietseWind opened this issue Mar 14, 2024 · 2 comments
Labels
feature Feature Request

Comments

@WietseWind
Copy link
Contributor

WietseWind commented Mar 14, 2024

When you send an id in RPC commands, the repsonse contains the same id. Super useful because this way in middleware and as a client you know it's the reponse at whatever you flagged with the id.

If you start a subscription (e.g. pathfinding, ledger stream, ...) this id is lost in the subsequent subscription messages.

If you cater multiple clients from one piece of software, this makes it impossible to know which client to route the subscription message to.

Proposal:

  1. Report the id that was used to start the subscription in the subsequent subscription messages
  2. Allow for an unsubscribe based on that id (right now one has to specify the entire subscribe command as an unsubscribe, e.g. streams: ledger, accounts: [...] while if already reporting an id, one can immediately cancel out that entire subscription based on that id.

It would be most useful for all XRPL protocol networks, so this should be isolated as a change and PRred into rippled too.

@dangell7
Copy link
Collaborator

Koen: If I subscribe to accounts and ledger, I get 2 transactions back but dont know which stream it came .

@WietseWind
Copy link
Contributor Author

Koen: If I subscribe to accounts and ledger, I get 2 transactions back but dont know which stream it came .

Which would be solved too if the subscription referred to the id as well :)

@dangell7 dangell7 added the feature Feature Request label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants