-
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
[Prototype/Spike] soroban-rpc: Design Data Backend #4681
Comments
for context, a couple documents have had some good discussion take place in this area: https://docs.google.com/document/d/1NYo6vg3pxa-BDd75sJQ3yPNHl5S7ZlsqsosRqaYY9jg/edit# |
maybe consider mq brokers, some discussion here on hot vs cold subscriptions for durable messages - https://stellarorg.atlassian.net/wiki/spaces/PLAT/pages/4434690049/soroban-rpc%3A+grpc+and+json-rpc+comparison?focusedCommentId=4447240228 some options on how Zenith may look if it published to mq broker as on alternate store rather than s3/f/s, then soroban rpc could potentially subscribe to mq topics and use offsets in the subscription to achieve replay scenarios or forward-only type streams, depends on the broker used: https://stellarorg.atlassian.net/wiki/spaces/HOR/pages/4340678664/Zenith |
https://docs.google.com/document/d/1F60xINIbfKrdnGeBBxygeHU3ZlgthRJw8DLXaYDakl0/edit?usp=sharing analyzes the different database options for storing events. SQLite appears to be the most promising option. We can ingest the events from TX Meta (either coming from captive core or a TX Meta stored on s3 via ledger exporter) into a SQLite database. |
One important gotcah regarding SQLite: simulateTransaction will require soroban-rpc to look up ledger entries while executing a smart contract invocation. These look-ups need to be consistent to a single ledger sequence. This can be implemented using repeatable read transactions in Postgres or read-only transactions in BadgerDB. However, SQLite does not support repeatable read transactions so we will need to introduce a read-write lock to ensure that ingestion cannot operate simultaneously with simulateTransaction requests. |
@tamirms , I updated description/scope, mentioned the agreement that was reached to follow the 0.5 RPC design option, which would be a part of this back-end context. |
epic - stellar/stellar-rpc#43
To serve contract events to clients, we need to get the events from somewhere. The events are in the ledger close metas. But where should we get those from?
Assumption: Let's ignore historical replay for now (but consider how we would do it in future).
There are a few potential options here to evaluate:
Understand:
Desired outcome is a decision about which approach we want to take.
[12/16/22] - Soroban RPC design discussion today ended with consensus from group to take Option 0.5 first, as part of that design it proposes soroban rpc will use captive core and run it's own custom ingestion against that which would then be persisted into the data backend decided here.
Timebox to ?
The text was updated successfully, but these errors were encountered: