Skip to content

Protocol 27 (CAP-0071) ingestion#186

Merged
Shaptic merged 10 commits into
stellar:protocol-nextfrom
sisuresh:cap-0083-xdr
Jun 8, 2026
Merged

Protocol 27 (CAP-0071) ingestion#186
Shaptic merged 10 commits into
stellar:protocol-nextfrom
sisuresh:cap-0083-xdr

Conversation

@sisuresh

Copy link
Copy Markdown
Contributor

SPIKE — exploratory, not intended to merge as-is.

This branch was used to stand up an end-to-end Stellar Quickstart test of CAP-0083 ("Allow validators to vote to skip the current ledger", stellar-core PR #5209), together with CAP-0071. It carries the downstream changes required so a custom quickstart image (CAP-83 stellar-core + this component) runs at protocol 27 and handles CAP-83 skip ledgers (STELLAR_VALUE_EMPTY_TX_SET).

Rebased on main; opened against protocol-next.

stellar-horizon

  • Pin go-stellar-sdk to the CAP-71/CAP-83 Go XDR build.
  • Bump MaxSupportedProtocolVersion to 27.
  • Implement GetLedgerRaw on fakeLedgerBackend (added to the SDK LedgerBackend interface).

sisuresh added 6 commits May 27, 2026 18:39
- Pin go-stellar-sdk to the CAP-71/CAP-83 XDR build.
- Bump MaxSupportedProtocolVersion to 27.
- Implement GetLedgerRaw on fakeLedgerBackend (added to the SDK
  LedgerBackend interface).
go-stellar-sdk@130456cc9b69 is regenerated from stellar-xdr@68fa1ac (post-
stellar/stellar-xdr#303 ungate of CAP_0071) with XDR_FEATURES cleared, so
the bind no longer carries the CAP-0083 STELLAR_VALUE_EMPTY_TX_SET path —
matching the p27 release scope (CAP-0071 only; CAP-0083 deferred).

The SDK bump also transitively picks up stellar/go-xdr#32, which raises
DecodeDefaultMaxDepth 250 → 1500, so the CAP-71 240-deep delegate fixture
(test-lcms/InvokeHostFunctionTests/a7a45d93c64cf3d9.xdr) now ingests
without ErrMaxDecodingDepth.

The HerderTests fixture (network_externalizes_empty-tx-set_on_missing_value)
no longer decodes under CAP-71-only XDR (StellarValueType 2 is gone) and is
removed.
@sisuresh sisuresh changed the title SPIKE: Protocol 27 (CAP-0071 + CAP-0083) ingestion Protocol 27 (CAP-0071) ingestion Jun 3, 2026
@sisuresh

sisuresh commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Update (CAP-71-only for p27 release)

P27 ships with CAP-0071 only — CAP-0083 has been deferred. Pushed fdaad302 to bring this PR in line:

  • Bumped go-stellar-sdk (via the sisuresh/go replace) to 130456cc9b69 — regenerated from stellar-xdr@68fa1ac (post-#303 CAP-0071 ungate) with XDR_FEATURES empty so STELLAR_VALUE_EMPTY_TX_SET and friends are no longer emitted.
  • That bump also transitively pulls stellar/go-xdr@0bf8f49 (decoder: raise default max depth to 1500 and add DecodeUnlimitedDepth go-xdr#32), which raises DecodeDefaultMaxDepth 250 → 1500 and adds the DecodeUnlimitedDepth sentinel for trusted captive-core output.
  • Dropped the CAP-83 HerderTests/network_externalizes_empty-tx-set_on_missing_value.xdr fixture — it no longer decodes under CAP-71-only XDR (StellarValueType=2 is gone).
  • TestCoreLCMIngestion is green end-to-end (113s).

Branch name still says cap-0083-xdr for stable PR-link reasons; rename via GitHub UI if desired.

Note: the 240-deep CAP-71 delegate fixture InvokeHostFunctionTests/a7a45d93c64cf3d9.xdr was deleted in commit f0c4700c update. With the new 1500-depth decoder it would now ingest cleanly and demonstrate that the depth issue documented in stellar/go-xdr#32 is closed — happy to restore it if you'd like that evidence in the PR.

sisuresh added 4 commits June 4, 2026 13:38
Core 27 reworked the apply-load configuration: the sampled load
parameters (APPLY_LOAD_INSTRUCTIONS, APPLY_LOAD_TX_SIZE_BYTES,
APPLY_LOAD_NUM_RW_ENTRIES, etc.) were removed in favor of an
APPLY_LOAD_MODE selector, and the apply-load command now force
overrides NETWORK_PASSPHRASE to "Apply Load" and runs at the core's
current ledger protocol version.

- Add testdata/apply-load-v27.cfg based on core 27's
  docs/apply-load-for-meta.cfg
- Select the default config based on the core binary's major version
- Assert ledger protocol version against the core binary's reported
  protocol version instead of the max supported protocol env var
- Add load-test-ledgers-v27.xdr.zstd / load-test-fixtures-v27.xdr.zstd,
  generated via TestGenerateLedgers using the same stellar-core build CI
  pins (27.0.0-3288.7696c069d, buildtests). Fixes
  TestLoadTestLedgerBackendWithoutMerge, which looks up the fixture for
  MaxSupportedProtocolVersion (now 27).
- Core 27's apply-load command force-overrides the network passphrase to
  "Apply Load", so the load tests now select the fixture passphrase by
  protocol version.
- Restore the 240-deep CAP-71 delegate-tree LCM fixture
  (InvokeHostFunctionTests/a7a45d93c64cf3d9.xdr, still referenced by
  index.json): it was dropped while go-xdr's max decoding depth was 250,
  and ingests cleanly again with stellar/go-xdr#32 (depth 1500).
@Shaptic Shaptic marked this pull request as ready for review June 6, 2026 00:42

@Shaptic Shaptic 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.

LGTM, needs a little more cleanup but I can do that separately 👍

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.

These weren't here before, why here now? We only had the frozen and invoke ones.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Missed this earlier. I just added all of the ones generated on the core side.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b9867715e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +38 to +39
PROTOCOL_26_CORE_DOCKER_IMG: stellar/stellar-core:27.0.0-3288.7696c069d.jammy
PROTOCOL_26_CORE_DEBIAN_PKG_VERSION: 27.0.0-3288.7696c069d.jammy~buildtests

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add protocol 27 to the integration matrix

In the inspected horizon.yml workflow, the matrix still only sets HORIZON_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL to 25 or 26, and internal/test/integration.NewTest caps the test protocol to that env value when it is lower than ingest.MaxSupportedProtocolVersion. As a result these 27.0 core images are still exercised as protocol-26 jobs, so the new v27 fixtures and protocol-27 ingestion path are not covered by CI; add a protocol-version 27 matrix entry with corresponding PROTOCOL_27_* env vars instead of replacing the protocol-26 image.

Useful? React with 👍 / 👎.

Comment thread go.mod
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/stellar/go-stellar-sdk => github.com/sisuresh/go v0.0.0-20260603235145-a8d5b3066361

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid shipping a personal SDK fork

This replace makes every build resolve github.com/stellar/go-stellar-sdk to github.com/sisuresh/go, so releases and CI now depend on a personal fork rather than the official Stellar module. In production builds this can silently diverge from upstream fixes or fail if the fork is removed or rewritten; please depend on an official Stellar module version or vendor an upstream commit before enabling protocol 27.

Useful? React with 👍 / 👎.

@Shaptic Shaptic merged commit 5b9209d into stellar:protocol-next Jun 8, 2026
21 checks passed
@Shaptic Shaptic mentioned this pull request Jun 8, 2026
urvisavla added a commit that referenced this pull request Jun 10, 2026
* Protocol 27 ingestion (#186)

* Protocol 27 (CAP-0071 + CAP-0083) ingestion support

- Pin go-stellar-sdk to the CAP-71/CAP-83 XDR build.
- Bump MaxSupportedProtocolVersion to 27.
- Implement GetLedgerRaw on fakeLedgerBackend (added to the SDK
  LedgerBackend interface).

* update core test lcm

* add GetLedgerRaw

* update

* Bump go-stellar-sdk to CAP-71-only XDR; drop CAP-83 fixture

go-stellar-sdk@130456cc9b69 is regenerated from stellar-xdr@68fa1ac (post-
stellar/stellar-xdr#303 ungate of CAP_0071) with XDR_FEATURES cleared, so
the bind no longer carries the CAP-0083 STELLAR_VALUE_EMPTY_TX_SET path —
matching the p27 release scope (CAP-0071 only; CAP-0083 deferred).

The SDK bump also transitively picks up stellar/go-xdr#32, which raises
DecodeDefaultMaxDepth 250 → 1500, so the CAP-71 240-deep delegate fixture
(test-lcms/InvokeHostFunctionTests/a7a45d93c64cf3d9.xdr) now ingests
without ErrMaxDecodingDepth.

The HerderTests fixture (network_externalizes_empty-tx-set_on_missing_value)
no longer decodes under CAP-71-only XDR (StellarValueType 2 is gone) and is
removed.

* Bump go-stellar-sdk to latest CAP-71-only build (a8d5b306)

* Bump protocol 26 core version to 27.0.0-3288.7696c069d

* Support core 27 apply-load config in TestGenerateLedgers

Core 27 reworked the apply-load configuration: the sampled load
parameters (APPLY_LOAD_INSTRUCTIONS, APPLY_LOAD_TX_SIZE_BYTES,
APPLY_LOAD_NUM_RW_ENTRIES, etc.) were removed in favor of an
APPLY_LOAD_MODE selector, and the apply-load command now force
overrides NETWORK_PASSPHRASE to "Apply Load" and runs at the core's
current ledger protocol version.

- Add testdata/apply-load-v27.cfg based on core 27's
  docs/apply-load-for-meta.cfg
- Select the default config based on the core binary's major version
- Assert ledger protocol version against the core binary's reported
  protocol version instead of the max supported protocol env var

* Add v27 load-test fixtures; restore deep-delegate LCM fixture

- Add load-test-ledgers-v27.xdr.zstd / load-test-fixtures-v27.xdr.zstd,
  generated via TestGenerateLedgers using the same stellar-core build CI
  pins (27.0.0-3288.7696c069d, buildtests). Fixes
  TestLoadTestLedgerBackendWithoutMerge, which looks up the fixture for
  MaxSupportedProtocolVersion (now 27).
- Core 27's apply-load command force-overrides the network passphrase to
  "Apply Load", so the load tests now select the fixture passphrase by
  protocol version.
- Restore the 240-deep CAP-71 delegate-tree LCM fixture
  (InvokeHostFunctionTests/a7a45d93c64cf3d9.xdr, still referenced by
  index.json): it was dropped while go-xdr's max decoding depth was 250,
  and ingests cleanly again with stellar/go-xdr#32 (depth 1500).

* Bump integration tests to use Protocol 27 (#189)

* Bump go-stellar-sdk to v0.6.0 (#191)

* Bump verify-range stellar-core to Protocol 27 noble build (#192)

---------

Co-authored-by: Siddharth Suresh <siddharth@stellar.org>
Co-authored-by: urvisavla <urvi.savla@stellar.org>
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