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

Standardize a Stellar RPC contract #254

Open
tomerweller opened this issue Feb 12, 2019 · 0 comments
Open

Standardize a Stellar RPC contract #254

tomerweller opened this issue Feb 12, 2019 · 0 comments
Labels
CAP Represents an issue that requires a CAP. help wanted Open especially for those who want to write a CAP/SEP! needs draft This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process.

Comments

@tomerweller
Copy link
Contributor

Currently, the main stellar-core consumer, horizon, is heavily dependent on the internals of the stellar-core implementation. Specifically, it directly accesses the stellar-core postgresql database.

Problems with current implementation:

  • This is an implicit contract. Any change to the stellar-core schema can potentially break horizon. Not to mention bigger changes like swapping out the persistence layer. (Horizon does not work with stellar-core if that uses sqlite instead of postgresql)
  • Performance: horizon can (and does) affect stellar-core's performance by creating a load on it's database.

A standardized Stellar RPC contract can solve the above and open a path for diversity of implementations.

Some potential stellar-rpc requests:

  • Serving ledger bundles (header + txs + tx results + metas) for ingestion.
  • Transaction submission.

Some bad stellar-rpc requests:

  • Serving live ledger entries. As this can be costly (performance wise) and these can be inferred from the ledger bundles.

Format: given that stellar uses XDR extensively, we can use ONC which is a minimal standard for creating XDR request/response messages.

Transport: HTTP and/or IPC (ethereum's json-rpc, for example, supports both).

Prior art:

  • stellar-core already exposes an http interface that includes transaction submission and some administrative commands. It does not, however, provide access to any ledger entries or historical data.
  • In the ethereum ecosystem there's a standard json-rpc contract, supported in both main implementations: geth and parity. This allows applications to switch the underlying node implementation without changing application code.
@theaeolianmachine theaeolianmachine added help wanted Open especially for those who want to write a CAP/SEP! CAP Represents an issue that requires a CAP. needs draft This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process. labels Mar 15, 2019
@theaeolianmachine theaeolianmachine changed the title Strandardize a Stellar RPC contract Standardize a Stellar RPC contract Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CAP Represents an issue that requires a CAP. help wanted Open especially for those who want to write a CAP/SEP! needs draft This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process.
Projects
None yet
Development

No branches or pull requests

2 participants