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

Merge Captive core into 1.5.0 release branch #2695

Merged
merged 7 commits into from
Jun 16, 2020

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Jun 16, 2020

Add experimental support for database reingestion using a Stellar Core subprocess instead of a persistent Stellar Core database (#2695).

Stellar Core v12.3.0 added an experimental feature which allows replaying legder's metadata in-memory. This feature allow us to speed up reingestion and removed the dependency between Stellar Core's database and Horizon.

For now this is only supported while running horizon db reingest. To try out this new experimental feature you need to specify the following parameters:

  • --enable-captive-core-ingestion or ENABLE_CAPTIVE_CORE_INGESTION=true.
  • --stellar-core-binary-path or STELLAR_CORE_BINARY_PATH.

graydon and others added 7 commits May 20, 2020 23:07
This is an initial sketch of support for an ingestion backend driven by
a captive stellar-core subprocess replaying ledgers in memory. It's
going to need a bunch of iteration before it's viable, but this PR
should serve as a place to examine & discuss the approach, fix bugs,
etc.
…2609)

* Add configuration for captive core ingestion

* Use captive core path configuration when initializing ingestion system
This commit refactors `captiveStellarCore` ledger backend and adds
tests.

`stellarCoreRunner` has been extracted from `captiveStellarCore` to
allow mocking stellar-core runs. This makes it possible to write tests
that do not execute `stellar-core` binary.

Functions marshalling and unmarshalling "framed" XDR have been moved to
`xdr` package.
…g them (#2672)

In macOS, captive-core blocks when writing to a pipe which
isn't read from.
Also, upgrade the container to ubuntu 18.04
(16.04 didn't have a compatible libstdc++ library)
* Rename `DBLedgerReader` to `LedgerTransactionReader` because it works
with any ledger backend.
* `LedgerTransactionReader` gets `LedgerCloseMeta` from a provided
ledger backend.
* `LedgerChangeReader` has been refactored and now embeds
`LedgerTransactionReader`.
* Updated `GetChangesFromLedgerEntryChanges` to be a public function.
* Removed `ctx.Context` from readers because it's not idiomatic.
* Removed unused interfaces and mocks.

Part of #2187.
@2opremio 2opremio requested a review from a team June 16, 2020 18:20
@cla-bot cla-bot bot added the cla: yes label Jun 16, 2020
@bartekn bartekn merged commit 68d0a2f into release-horizon-v1.5.0 Jun 16, 2020
@bartekn bartekn deleted the captive-core branch June 17, 2020 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants