Skip to content

SPIKE: Protocol 28 (CAP-0084) - #203

Draft
sisuresh wants to merge 6 commits into
stellar:protocol-nextfrom
sisuresh:p28-cap-0084
Draft

SPIKE: Protocol 28 (CAP-0084)#203
sisuresh wants to merge 6 commits into
stellar:protocol-nextfrom
sisuresh:p28-cap-0084

Conversation

@sisuresh

@sisuresh sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Bump MaxSupportedProtocolVersion to 28; pin go-stellar-sdk to the CAP-0084 branch (go-stellar-sdk#5961 HEAD eeca7aa4).
  • Full semantic muxed-contract event handling in internal/ingest/contractevents/events.go: SAC transfer/mint to a muxed-contract destination surfaces the base contract in the to topic and the mux id via to_muxed_id.
  • Unit tests in contractevents/events_test.go ("V4 transfer/mint to muxed contract (CAP-0084)").
  • Re-captured InvokeHostFunctionTests native/custom-asset test-lcms fixtures from a CAP-0084 vnext core build so TestCoreLCMIngestion ingests real muxed-contract ledgers end-to-end.
  • CI matrix → protocol [27, 28]; CHANGELOG entry under Unreleased.

⚠️ Human review wanted on the to_muxed_id semantics: TestCoreLCMIngestion only asserts ingestion is non-error, so the exact mux-id value is guarded only by the unit tests, not the fixture.

Deferred

  • PROTOCOL_28 core image stays on the CAP-0083-era vnext build (3589a696b): no -vnext image/deb for CAP-0084 core (stellar-core#5337, HEAD 4cdd2fc9e) is published yet. Fixture above was captured from a local #5337 build (at 389ee9ee5, one commit behind HEAD; delta is a host-submodule env re-pin).
  • PROTOCOL_28 stellar-rpc image left "" until stellar-rpc#837 publishes one.
  • Productionize (drop the go-stellar-sdk replace, un-draft, drop SPIKE) once go-stellar-sdk#5961 merges to protocol-next.

Upstream: stellar/go-stellar-sdk#5961 · stellar/stellar-core#5337 · stellar/stellar-rpc#837

sisuresh added 4 commits June 24, 2026 10:40
* 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
stellar#171/stellar#189.
Re-pin go-stellar-sdk to the CAP-0084 regen (sisuresh/go@318bde14) which
adds the SC_ADDRESS_TYPE_MUXED_CONTRACT arm. The SAC host de-muxes the
destination and emits to_muxed_id as a uint64 (mirroring CAP-67 muxed
accounts) for both transfer and mint, so horizon's existing V4
contractevents path already handles it; this documents that and adds
regression tests.
@sisuresh

sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

sisuresh added 2 commits July 2, 2026 20:20
- CHANGELOG: note Protocol 28 (CAP-0084) muxed-contract ingestion under Unreleased.
- test-lcms: re-capture InvokeHostFunctionTests native/custom-asset LCM from a
  CAP-0084 vnext core build so TestCoreLCMIngestion exercises real muxed-contract
  SAC transfer/mint ledgers (surfacing to_muxed_id) end-to-end, not just P27 data.
- horizon.yml: relabel the P28 leg CAP-0083 -> CAP-0084 and refresh the RPC
  tracking ref to stellar-rpc#837.

Note: fixture captured from core #5337 built at 389ee9ee5 (one commit behind HEAD
4cdd2fc9e; delta is a host-submodule env re-pin). Muxed-id semantics still want
human review - TestCoreLCMIngestion only asserts non-error.
The -vnext artifact matching stellar-core#5337 HEAD (4cdd2fc9e) has published,
so the P28 integration leg now runs against a CAP-0084-capable core instead of
the deferred CAP-0083-era build. Variant preserved (plain -vnext docker,
~vnext~buildtests deb).
@Shaptic
Shaptic force-pushed the protocol-next branch 2 times, most recently from e8b03ce to 50e232c Compare July 31, 2026 23:05
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.

1 participant