getLedgerEntries: optionally use high-performance Core server#353
Merged
Shaptic merged 30 commits intoprotocol-23from Feb 7, 2025
Merged
getLedgerEntries: optionally use high-performance Core server#353Shaptic merged 30 commits intoprotocol-23from
getLedgerEntries: optionally use high-performance Core server#353Shaptic merged 30 commits intoprotocol-23from
Conversation
Contributor
Author
|
@2opremio this should probably target a new feature branch e.g. |
c1923f2 to
41dd850
Compare
Shaptic
commented
Feb 5, 2025
Shaptic
commented
Feb 5, 2025
0e0847c to
a8c4b29
Compare
a8c4b29 to
372638d
Compare
getLedgerEntries with high-performance Core servergetLedgerEntries with high-performance Core server
getLedgerEntries with high-performance Core servergetLedgerEntries: optionally use high-performance Core server
63b0d98 to
13d28da
Compare
b78154c to
1a9e7cb
Compare
Shaptic
commented
Feb 6, 2025
Contributor
Author
Shaptic
left a comment
There was a problem hiding this comment.
Looks really solid! Coupla questions but otherwise pretty sure this can get a ✔️
2opremio
approved these changes
Feb 7, 2025
tamirms
reviewed
Feb 8, 2025
| captiveCorePort uint16 | ||
|
|
||
| // These only need to be unconflicting ports | ||
| captiveCorePort uint16 |
Contributor
Contributor
There was a problem hiding this comment.
captiveCorePort is the peer port and not the http port. It should probably be tagged as such for clarity.
This was referenced Feb 26, 2025
2opremio
added a commit
to 2opremio/soroban-rpc
that referenced
this pull request
Mar 25, 2025
…lar#353) * Replace getLedgerEntries DB queries with Core fetches * Add infrastructure for testing the new Core http query server * Sort entries in response according to request order * Only test the query server from protocol 23 onwards * Enable debug printouts for integration tests * Make sure all ports are allocated at once to minimize clashes --------- Co-authored-by: Alfonso Acosta <alfonso@stellar.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This introduces
STELLAR_CAPTIVE_CORE_HTTP_QUERY_PORT, enabling a high-performance HTTP server on the Captive Core subprocess for fetching ledger entries.This new endpoint is plumbed all the way through the
getLedgerEntrieshandler, removing those database queries entirely.This also updates the
stellar/gomonorepo reference and its cascading dependencies.If
STELLAR_CAPTIVE_CORE_HTTP_QUERY_PORTis set to 0 (the default value) RPC will use it's old and proven DB implementation ofgetLedgerEntriesinstead of querying Core.Why
With CAP-66 arriving in Protocol 23 and its high-performance
/getledgerentryendpoint (whose client was implemented in https://github.com/stellar/go/pull/5542), we don't need to store ledger entries in RPC anymore.Today, we still need to provide snapshots to the simulation library, but tomorrow (in the opaque sense) we won't need to, so this is part of the transition work.
Related: #269.
Known limitations
TODO: