Skip to content

Add CAP-0073 ingestion support and bump to protocol 26 - #171

Merged
tamirms merged 11 commits into
protocol-nextfrom
cap-73
Mar 17, 2026
Merged

Add CAP-0073 ingestion support and bump to protocol 26#171
tamirms merged 11 commits into
protocol-nextfrom
cap-73

Conversation

@tamirms

@tamirms tamirms commented Mar 16, 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

CAP-0073 introduces two new SAC behaviors that require Horizon ingestion changes:

  1. trust() creates trustlines without emitting SAC events — derive EffectTrustlineCreated from ledger entry changes
  2. XLM transfer auto-creates accounts — derive EffectAccountCreated and EffectSignerCreated from ledger entry changes (transfer event already covers the credit/debit)

Also bumps MaxSupportedProtocolVersion to 26 and updates CI to run integration tests against the protocol 26 core image.

Known limitations

[N/A]

tamirms and others added 2 commits March 16, 2026 17:10
CAP-0073 introduces two new SAC behaviors that require Horizon ingestion
changes:

1. trust() creates trustlines without emitting SAC events — derive
   EffectTrustlineCreated from ledger entry changes
2. XLM transfer auto-creates accounts — derive EffectAccountCreated and
   EffectSignerCreated from ledger entry changes (transfer event already
   covers the credit/debit)

Also bumps MaxSupportedProtocolVersion to 26 and updates CI to run
integration tests against the protocol 26 core image.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The TestLoadTestLedgerBackendWithoutMerge test constructs the filename
from MaxSupportedProtocolVersion, which is now 26.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread internal/integration/testdata/unlimited-config-v26.xdr Outdated
Comment thread internal/ingest/processors/effects_processor.go
The previous v26 config was a copy of v25, which caused
resource_limit_exceeded errors because protocol 26 has new config
entries (contract_ledger_cost_ext_v0, scp_timing) that were missing.

Generated from:
https://github.com/stellar/quickstart/blob/main/local/core/etc/config-settings/p26/unlimited.json

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread internal/ingest/processors/effects_processor.go
tamirms and others added 2 commits March 16, 2026 19:51
The previous default resource limits (Instructions: 400K) were too low
for protocol 26, causing resource_limit_exceeded in TestContractMintToContract.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Factor out the common effect-emission logic so it is shared between
classic operation handlers and the CAP-0073 ledger-change-based handlers.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Shaptic
Shaptic previously approved these changes Mar 17, 2026
Comment thread .github/workflows/horizon.yml Outdated
@Shaptic
Shaptic dismissed their stale review March 17, 2026 04:13

approved by mistake, just wanted to comment - gonna wait till tests pass

tamirms and others added 3 commits March 16, 2026 23:32
The old p25 core (25.2.0) reports CoreSupportedProtocolVersion=26 in its
info response, which conflicts with MaxSupportedProtocolVersion=26 during
ingestion startup on the p25 test network, causing checkpointLedger=0
errors. Using the 25.2.1 build for both avoids this mismatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
upgradeLimits() was using stellar/stellar-core:<protocol-version> as the
docker image for get-settings-upgrade-txs, which could be a different
build than the actual validator. This mismatch caused transaction
submission timeouts when the generated upgrade transactions were
incompatible with the running core.

Now uses HORIZON_INTEGRATION_TESTS_DOCKER_IMG (the same image as the
validator) for all protocol versions, falling back to the tag-based
image only if the env var is not set.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread internal/ingest/processors/effects_processor.go
tamirms and others added 2 commits March 17, 2026 08:15
insertAssetContract was doing Begin/Insert/Commit on the shared ingest
HistoryQ session while the Horizon Tick goroutine concurrently reads
from the same session (UpdateFeeStatsState). Use a cloned session
instead to avoid the race.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Remove p24 testdata files (unlimited-config-v24.xdr, load-test-ledgers-v24.xdr.zstd)
- Bump p25 RPC image to 25.1.0
- Add comment explaining why account_debited is not emitted for CAP-0073
  auto-account-creation (already covered by SAC transfer event)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@tamirms
tamirms marked this pull request as ready for review March 17, 2026 13:30
The original GitHub Actions template expansion syntax works fine for
both protocol 25 and 26 since all env vars are now defined.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@tamirms
tamirms requested a review from a team March 17, 2026 14:54
@tamirms
tamirms merged commit 559de25 into protocol-next Mar 17, 2026
21 checks passed
@tamirms
tamirms deleted the cap-73 branch March 17, 2026 18:19
sisuresh added a commit to sisuresh/stellar-horizon that referenced this pull request Jun 16, 2026
The P28 integration leg reads testdata/unlimited-config-v28.xdr in
upgradeLimits() (internal/test/integration/integration.go:787); it was missed
in the P28 bump, so every P28 test going through StartHorizon setup failed with
"open testdata/unlimited-config-v28.xdr: no such file or directory". CAP-0083
adds no Soroban config settings, so the v28 ConfigUpgradeSet is byte-identical
to v27 under the P28 go-stellar-sdk pin (v26 and v27 are already byte-identical).

The protocol matrix is [27, 28], so v26 is now unreferenced; drop it to keep
testdata aligned with the matrix, matching the rolling-window precedent from
stellar#171/stellar#189.
Shaptic pushed a commit that referenced this pull request Jun 24, 2026
* Re-pin go-stellar-sdk to the CAP-0083 XDR regeneration and bump
MaxSupportedProtocolVersion to 28.
* Add v28 load-test fixtures
* CI: run integration tests against Protocol 28

Switch the integration matrix to protocol-version [27, 28]. P28 uses the
vnext (next-protocol-enabled) core build 27.0.1-3348.ff61f2e6d. The P28
stellar-rpc image is left as a commented placeholder until stellar-rpc#789
publishes one, so that leg stays amber rather than testing against a P27 RPC.
Repoint the cache source hash to the P28 (latest) + P27 (previous) images.

* CI: build a P28 stellar-rpc image from stellar-rpc#789 instead of failing the leg

The P28 matrix leg had no PROTOCOL_28_STELLAR_RPC_DOCKER_IMG (no published
P28-capable stellar-rpc image exists; stellar-rpc#789 is still a draft over
protocol-next and the repo only publishes images from main/release/**). The
"Pull and set Stellar RPC image" step ran `docker pull ""` -> invalid
reference format -> the P28 legs went red and fail-fast cancelled the P27
legs. Leaving the image empty was not a safe "amber": the compose default
(stellar/stellar-rpc) is a P27 RPC, so the soroban suites would have run
against the wrong RPC.

- Guard the RPC pull step so a missing prebuilt image is a no-op.
- Build a genuine P28 stellar-rpc image in-CI from stellar-rpc#789 source,
  fetched by pinned SHA via refs/pull/789/head (there is no p28-cap-0083
  branch on stellar/stellar-rpc; the head lives on a fork), plus the pinned
  P28 captive-core deb, and run all six EnableStellarRPC suites (sac,
  invokehostfunction, extend_footprint_ttl, txsub, txsub_async, transaction)
  against it on the P28 leg.
- If that build is unavailable, skip those suites loudly (tracked to
  stellar-rpc#789) rather than silently falling back to a P27 RPC.

* CI: drop P28 stellar-rpc from-source build; reuse the P27 RPC image

CAP-0083 is consensus-layer (skip ledgers); the RPC layer is unaffected,
so the P27 stellar-rpc image is functionally adequate for the P28
integration leg. Reverts the from-source-build pipeline added in a9fe4d7
in favor of the simple two-line "use previous protocol's image + TODO".

Drops:
- PROTOCOL_28_STELLAR_RPC_PR_SHA env var
- "Build P28 stellar-rpc image from stellar-rpc#789" step
- empty-IMG handling in "Pull and set Stellar RPC image"
- PR_SHA reference in the source-hash key

Restores the original "Pull and set Stellar RPC image" step. When a
real P28 stellar-rpc image is published, replace the
PROTOCOL_28_STELLAR_RPC_DOCKER_IMG value with the new tag and drop
the TODO.

* Roll integration test fixture window to {v27, v28}

The P28 integration leg reads testdata/unlimited-config-v28.xdr in
upgradeLimits() (internal/test/integration/integration.go:787); it was missed
in the P28 bump, so every P28 test going through StartHorizon setup failed with
"open testdata/unlimited-config-v28.xdr: no such file or directory". CAP-0083
adds no Soroban config settings, so the v28 ConfigUpgradeSet is byte-identical
to v27 under the P28 go-stellar-sdk pin (v26 and v27 are already byte-identical).

The protocol matrix is [27, 28], so v26 is now unreferenced; drop it to keep
testdata aligned with the matrix, matching the rolling-window precedent from
#171/#189.
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