Skip to content

internal/integration: use apply-load tooling from loadtest package in go-stellar-sdk - #185

Draft
cjonas9 wants to merge 6 commits into
mainfrom
migrate-apply-load-sdk
Draft

internal/integration: use apply-load tooling from loadtest package in go-stellar-sdk#185
cjonas9 wants to merge 6 commits into
mainfrom
migrate-apply-load-sdk

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 (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

Removes apply-load tooling from *_test.go file local to Horizon and uses similar tooling migrated to the SDK (see go-stellar-sdk/5940.

Why

We are currently adding an ingestion test in stellar-rpc that uses stellar-core's apply-load tooling. As such, the infrastructure previously built out in generate_ledgers_test.go has been moved to the SDK so it can be used by both repos. See stellar-rpc/711.

Known limitations

N/A

Copilot AI review requested due to automatic review settings May 4, 2026 17:53

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 updates Horizon’s integration-ledger generator test to stop maintaining a local copy of the stellar-core apply-load orchestration logic and instead use the equivalent apply-load tooling that has been migrated into go-stellar-sdk (via ingest/loadtest). This aligns Horizon with the shared approach needed by other repos (e.g., stellar-rpc) that also need to generate ledgers/fixtures from apply-load.

Changes:

  • Replaced the large, Horizon-local apply-load runner + ledger/fixture streaming/verification helpers with loadtest.NewApplyLoad(...).RunApplyLoadAndWrite(...).
  • Upgraded github.com/stellar/go-stellar-sdk (and go-xdr) to pick up the new ingest/loadtest package.
  • Marked now-unused direct deps (e.g., toml, klauspost/compress) as indirect in go.mod.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
internal/integration/generate_ledgers_test.go Switches the test from Horizon-owned apply-load helper code to the SDK’s ingest/loadtest implementation.
go.mod Bumps go-stellar-sdk/go-xdr versions and adjusts dependency directness.
go.sum Updates sums to match the new module versions.

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

@cjonas9
cjonas9 marked this pull request as draft May 6, 2026 16:22
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.

2 participants