Skip to content

ingest/loadtest: add stellar-core apply-load tooling - #5940

Merged
cjonas9 merged 28 commits into
mainfrom
migrate-applyload
May 6, 2026
Merged

ingest/loadtest: add stellar-core apply-load tooling#5940
cjonas9 merged 28 commits into
mainfrom
migrate-applyload

Conversation

@cjonas9

@cjonas9 cjonas9 commented May 4, 2026

Copy link
Copy Markdown
Contributor
PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    services/friendbot, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated any docs (developer docs, .md
    files, etc... affected by this change). Take a look in the docs folder for a given service,
    like this one.

Release planning

  • I've reviewed the changes in this PR and if I consider them worthwhile for being mentioned on release notes then I have updated the relevant CHANGELOG.md within the component folder structure. For example, if I changed horizon, then I updated (services/horizon/CHANGELOG.md. I add a new line item describing the change and reference to this PR. If I don't update a CHANGELOG, I acknowledge this PR's change may not be mentioned in future release notes.
  • I've decided if this PR requires a new major/minor version according to
    semver, or if it's mainly a patch change. The PR is targeted at the next
    release branch if it's not a patch change.

What

This PR adds tooling for synthetic ledger generation using stellar-core's apply-load command for ingestion load testing. Given an apply-load config, this enables one to generate an output that can be used for follow-up RPC or Horizon ingestion load tests through the pattern of NewApplyLoad(...) -> ApplyLoad.RunApplyLoadAndWrite() (+ ApplyLoad.Cleanup() ).

Originally, this lived in stellar-horizon as an integration test. The core codeflow and design is the same here as it was there, except functions here no longer take a *testing.T and are oriented around a *ApplyLoad struct. It's migrated to the SDK to ensure that it may be common to ingestion load testing tools in both stellar-horizon and stellar-rpc.

Why

See stellar-rpc/711. This PR focuses on making the utility for ingestion load-tests common so that it can be used in any repo that requires it.

Known limitations

N/A.

@cjonas9
cjonas9 marked this pull request as ready for review May 4, 2026 18:10
Copilot AI review requested due to automatic review settings May 4, 2026 18:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new ingest/loadtest helper for generating synthetic ingestion fixtures from stellar-core apply-load, so other repos can reuse the same load-test data generation flow from the SDK.

Changes:

  • Introduces an ApplyLoad workflow that runs stellar-core new-db, new-hist, and apply-load.
  • Parses apply-load config/output to locate generated metadata and the pre-benchmark checkpoint boundary.
  • Adds logic to export benchmark ledgers and checkpoint-derived fixture entries as zstd-compressed XDR files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ingest/loadtest/apply_load.go Outdated
Comment thread ingest/loadtest/apply_load.go Outdated
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go Outdated
Comment thread ingest/loadtest/apply_load.go Outdated
@cjonas9
cjonas9 requested review from a team and tamirms May 4, 2026 18:20
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go Outdated
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go Outdated
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go
@tamirms

tamirms commented May 5, 2026

Copy link
Copy Markdown
Contributor

@cjonas9 most of these issues are pre-existing from the horizon code but I think they're worth fixing now that we plan to include them into the go sdk

@cjonas9

cjonas9 commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@cjonas9 most of these issues are pre-existing from the horizon code but I think they're worth fixing now that we plan to include them into the go sdk

completely agreed -- I'd noticed some of these as I'd gone along, but reckoned there were already discussions had about them. even so, awesome review! a ton of super valuable finds I missed in here

Comment thread ingest/loadtest/apply_load.go
Comment thread ingest/loadtest/apply_load.go Outdated
Comment thread ingest/loadtest/default-apply-load.cfg Outdated
Comment thread ingest/loadtest/default-apply-load.cfg Outdated
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.

3 participants