-
Notifications
You must be signed in to change notification settings - Fork 502
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
services/soroban-rpc: getEvents method #4554
Comments
Depends on #4558 |
@paulbellamy , scope-wise, what is the expectation on interface of the subscription, any request params, like filter on specific event types, etc, or just gets all. is the ws subscription endpoint defined in soroban api docs for ref? or is this effort expected to update the api docs? What event models are expected to be published, any links to source code or docs on those? |
Default is gets all. Should allow filtering via contract for v1. That's probably enough for now. endpoint is defined in the soroban-rpc api docs, yes. But there are some undefined parts there (like event structure). So design those and update the docs on confluence. |
Note, the events here are coming from the txmetas emitted by the soroban-rpc captive core. No persistence, just "ingest" the txmetas as they arrive, and see if any of the events match the active subscriptions. |
@paulbellamy @tamirms , just in short term for the rpc server, could it potentially proxy from horizon api, i.e. http client to streaming(sse) endpoint for transactions to obtain same txmeta? Just wondering if that option is worth considering as stop-gap in short term if it's less effort/complexity? |
@sreuland I think that's a good idea. I think we still need captive core for the following endpoints as this info is not available in Horizon's API: getContract But perhaps we could proxy those requests to horizon's captive core instead of spawning our own instance. |
@tamirms , ok, for those endpoints that need core, the goal is to package up dev stack onto quickstart docker image which will provide a singular core instance that should be configurable to be in standalone/futurenet and which both horizon and sorobon-rpc services hosted in same docker container should be able to simultaneously connect to that single core instance txmeta pipe/rpc ports, will that work? quickstart spike/discussion on this packaging - #4590 (comment) |
@sreuland both horizon and soroban can access a shared core instance via the http ports. However, the txmeta pipe cannot be broadcast to more than one listener unless we write some code to allow that. But, if we obtain txmeta in soroban-rpc via horizon then we will not need to read from the captive core txmeta pipe in the soroban-rpc service |
@tamirms , thanks for catching that, if |
@sreuland by obtain txmeta in soroban-rpc via horizon I meant what you suggested earlier:
I think that would be easier than querying the horizon postgres db. |
Making soroban-rpc depend on Horizon seems reasonable but worries me. This requires (almost) full Soroban support in Horizon which is a big short-term task to take up. |
I think that from scheduling perspective, we should avoid design + implement in the same sprint by the same person as it might not have the proper "separation". That being said, if we can get enough buy-ins, I don't really care. One way to achieve that is to define the dependent issue very clearly, including the required degree of buy-ins. |
@paulbellamy , is there a corresponding dev ticket for soroban-js-sdk to have client wrapper around this api in tandem during same dev cycle, or is that fine in next iteration, etc? [edit] found the sorobanj-js-sdk ticket, was out there - stellar/js-soroban-client#2 , guess we just need to decide which/when sprint to pull this into. |
@sreuland there's also stellar/stellar-cli#61 which is the Rust client side of things. I think JS is lower priority? |
it appears that way, stellar/js-soroban-client#2 is in Backlog, maybe during pre-pre-grooming, can discuss if this should be queued up for Next Sprint Proposal. @jcx120 , any insights on expected priority? |
JS will enable us to test the event sub against our reference fundraising DApp in its ultimate deployment environment. My preference is for this to be done first. |
I'd say they're about equal priority. Maybe JS should be a bit higher. We can use the CLI to test stuff all works, but like @jcx120 says the example dapp would be the more immediate use case. There are two use cases here:
|
Per #4676, no websockets or push notifications for this. Just the request/response |
epic - stellar/stellar-rpc#43
depends on api design and data acquisition
See design output from #4676
For Nov v1, get ledgers from Horizon (until long term backend pattern is established)
need to get websocket setuppush notificationsThe text was updated successfully, but these errors were encountered: