Skip to content

Protocol 30 support (CAP-0084, CAP-0087, CAP-0088) - #237

Merged
tamirms merged 18 commits into
stellar:protocol-nextfrom
sisuresh:p30-cap-0084-validate
Oct 16, 2026
Merged

tamirms merged 18 commits into
stellar:protocol-nextfrom
sisuresh:p30-cap-0084-validate

Conversation

@sisuresh

@sisuresh sisuresh commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds Protocol 30 support.

  • Bumps MaxSupportedProtocolVersion to 30 and go-stellar-sdk to the Protocol 30 commit on protocol-next (Protocol 30 (CAP-0084, CAP-0087, CAP-0088) go-stellar-sdk#6015).
  • A SAC transfer or mint to a muxed contract (W...) gives the contract_credited effect contract_muxed and contract_muxed_id, as account_muxed and account_muxed_id do for muxed accounts. Tested with stellar-core#5472's transfer and mint LCMs.
  • TestGetState_Read: the mock archive now serves a bucket whose hash matches its HAS, which the new SDK checks.
  • CI runs protocols 29 and 30. The P30 leg uses the stellar-core 30.0.0 release candidate and skips the RPC tests until there's a protocol 30 stellar-rpc image. unlimited-config-v30.xdr has the 95 contract cost params core requires.

Before release: move go-stellar-sdk to a release, and point the P29 and P30 legs at the released core and stellar-rpc images.

🤖 Generated with Claude Code

Repin go-stellar-sdk to the CAP-0084 XDR/strkey fork, bump
MaxSupportedProtocolVersion to 30, add v30 test fixtures, and cover
muxed-contract SAC destinations in ingestion tests.
XDR regenerated from stellar-xdr ee040cd6 with CAP_0084_MUXED_CONTRACT, matching stellar-core#5472.
Adds the muxed-contract SAC transfer/mint vectors and asserts destination_muxed_id survives ingestion.
P30 builds core #5472 from source (no -vnext artifact) and runs without a stellar-rpc image.
#5472 is merged and Jenkins has published its vnext deb and image, so the leg
no longer builds the pre-merge head from source.
SAC transfers and mints to a CAP-0084 muxed contract now carry contract_muxed
and contract_muxed_id, as account_credited does for muxed accounts. Repins
go-stellar-sdk to #6015 (70bad4ef) for the new ContractCredited fields.
tamirms and others added 7 commits October 8, 2026 11:22
Brings in stellar#240 (asset filter on fee-bump inner operations) and stellar#242 (HTTP
write and idle deadlines), which stellar#244 fast-forwards
protocol-next to. The only conflict was the Unreleased CHANGELOG section,
resolved by keeping both entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The single Protocol 30 SDK PR now regenerates XDR from stellar-xdr 4f524bba
with CAP-0084, CAP-0087 and CAP-0088 ungated. This adds the CAP-0088
STELLAR_VALUE_SIGNED_MS and STELLAR_VALUE_EMPTY_TX_SET_MS StellarValue arms,
without which no ledger after the Protocol 30 upgrade decodes, and the
CAP-0087 ML-DSA ContractCostType names.

663a89a1 also merges go-stellar-sdk main (#6014, #6006, #6017), so the
replace does not drop those fixes. #6017 removes the on-disk bucket cache
APIs, none of which Horizon references. Horizon builds unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mock archive serves one account entry for every bucket hash, while the
HAS listed 22 real testnet bucket hashes. go-stellar-sdk#6017 (in 663a89a1)
makes CheckpointChangeReader fail every Read once a bucket's hash check
fails, including Reads of entries already buffered, so the test failed about
70% of runs with "stream hash mismatch". Build the HAS with the served
bucket's hash as its only bucket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestCoreLCMMuxedContractDestination now also checks the contract_credited
effect of stellar-core's CAP-0084 transfer and mint vectors: contract keeps
the base C address, and contract_muxed / contract_muxed_id carry the W address
and id, decoded the way the /effects endpoint decodes them.

A resourceadapter test checks that the stored details render into the SDK's
ContractCredited fields, with contract_muxed_id as a JSON string like
account_muxed_id, so ids above 2^53 survive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From Protocol 30 every ledger header's StellarValue uses the
STELLAR_VALUE_SIGNED_MS or STELLAR_VALUE_EMPTY_TX_SET_MS arm. Add a processor
runner test that decodes a SIGNED_MS LedgerCloseMeta and runs it through the
transaction processors, and a test that ledgerHeaderToMap stores either arm
with closed_at taken from the whole-second CloseTime and the arm intact in
ledger_header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
88d2431d7 merges v29.0.0 into master (#5476) on top of 73f2bdd1 (#5472,
CAP-0084), and is the newest master commit Jenkins has published vnext
packages for; master's later commits only add release notes. The leg still
runs without CAP-0087 and CAP-0088, which core has not merged.

Note on the P29 leg why it runs the P29 release for now, and on the P30 leg
that a core with CAP-0087 needs a regenerated unlimited-config-v30.xdr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover all three CAPs: the CAP-0084 contract_muxed / contract_muxed_id effect
fields, the CAP-0088 StellarValue arms (close times stay whole seconds,
header_xdr carries the new arms), and CAP-0087 needing no Horizon changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tamirms tamirms changed the title SPIKE: Protocol 30 (CAP-0084) Protocol 30 support (CAP-0084, CAP-0087, CAP-0088) Oct 8, 2026
stellar/stellar-core#5478 made protocol 30 the current protocol on master,
with CAP-0084 and CAP-0087. Move the P30 leg from the pre-#5478 vnext build
(88d2431d7) to master's ba6a4e6e3 build, and in the same change give
unlimited-config-v30.xdr the 95 contract cost params core now requires at
protocol 30. The 9 new ML-DSA entries (86-94) are core's v30 defaults from
updateCpuCostParamsEntryForV30 / updateMemCostParamsEntryForV30; the other
entries are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5dN6jqdJt52ve9XWyeggH
@tamirms
tamirms marked this pull request as ready for review October 9, 2026 10:30
Copilot AI lite review requested due to automatic review settings October 9, 2026 10:30

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.

🔵 Needs a closer look

The Protocol 30 SDK remains unreleased, P30 RPC tests are skipped, and the new write deadline can cut off transaction-submission responses.

3 open findings
What changed in this PR

This PR prepares Horizon to ingest and serve Protocol 30 data, including muxed contract destinations and millisecond close-time XDR.

Changes:

  • Add Protocol 30 SDK support and muxed-contract effect handling.
  • Extend ingestion fixtures and tests; fix asset filtering for fee-bump transactions.
  • Update integration CI and add HTTP server timeouts.
File Description
internal/​resourceadapter/​effects_test.go Tests muxed-contract effect rendering.
internal/​integration/​testdata/​unlimited-config-v30.xdr Adds Protocol 30 cost configuration.
internal/​ingest/​testdata/​test-lcms/​InvokeHostFunctionTests/​index.json Indexes new Core fixtures.
internal/​ingest/​processors/​operations_processor_test.go Tests muxed-contract operation parameters.
internal/​ingest/​processors/​effects_processor.go Records muxed-contract credit details.
internal/​ingest/​processors/​effects_processor_test.go Tests transfer and mint effects.
internal/​ingest/​processor_runner_test.go Tests millisecond close-time ingestion.
internal/​ingest/​main.go Raises the supported protocol to 30.
internal/​ingest/​history_archive_adapter_test.go Corrects the mock bucket hash.
internal/​ingest/​filters/​asset.go Filters fee-bump inner operations.
internal/​ingest/​filters/​asset_test.go Tests fee-bump asset matching.
internal/​ingest/​core_lcm_test.go Checks Core muxed-contract fixtures.
internal/​ingest/​contractevents/​events.go Clarifies muxed-ID event documentation.
internal/​ingest/​contractevents/​events_test.go Tests muxed-contract address parsing.
internal/​httpx/​server.go Adds read, write, and idle timeouts.
internal/​httpx/​server_timeouts_test.go Tests server timeout configuration.
internal/​db2/​history/​ledger_test.go Tests close-time storage and XDR.
go.sum Updates SDK dependency checksums.
go.mod Pins a temporary Protocol 30 SDK fork.
CHANGELOG.md Documents Protocol 30 and the filter fix.
.github/​workflows/​integration-tests.yml Allows runs without an RPC image.
.github/​workflows/​horizon.yml Updates the P29 and P30 CI legs.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

replace github.com/stellar/go-stellar-sdk => github.com/sisuresh/go v0.0.0-20261008104555-663a89a12043
core_deb_version: '29.0.1-3637.ba6a4e6e3.noble~buildtests'
core_docker_img: 'stellar/unsafe-stellar-core:29.0.1-3637.ba6a4e6e3.noble'
# No protocol-30 stellar-rpc image yet: NewTest() AMBER-skips RPC tests.
stellar_rpc_docker_img: ''
Comment thread internal/httpx/server.go
Comment on lines +70 to +72
writeTimeout := defaultWriteTimeout
if connectionTimeout > 0 {
writeTimeout = connectionTimeout + writeTimeoutBuffer
tamirms and others added 2 commits October 14, 2026 06:09
stellar/go-stellar-sdk#6015 merged into protocol-next as 990270d3, so drop the
replace that pointed at the sisuresh/go fork (663a89a1) and require the
upstream commit. This also picks up the fixes made in #6015 after 663a89a1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build 3640 (0e49751aa) includes stellar/stellar-core#5423, so ledgers after
the protocol 30 upgrade now use the millisecond close-time StellarValue arms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 14, 2026 05:09
@socket-security

socket-security Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​stellar/​go-stellar-sdk@​v0.7.2 ⏵ v0.7.4-0.20261014050248-990270d32ebe75 +1100100100100

View full report

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.

Comment thread internal/ingest/processor_runner_test.go Outdated
30.0.0-3642.0e49751aa is built from the same commit as build 3640, so this
changes the package under test, not the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 14, 2026 06:07

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.

Comment on lines +38 to +39
core_deb_version: '30.0.0-3642.0e49751aa.noble~buildtests'
core_docker_img: 'stellar/unsafe-stellar-core:30.0.0-3642.0e49751aa.noble'
@tamirms
tamirms changed the base branch from protocol-next to main October 14, 2026 08:44
@tamirms
tamirms changed the base branch from main to protocol-next October 14, 2026 08:44
The P30 integration leg runs on the stellar-core 30.0.0 release candidate,
so every ledger after the upgrade already exercises the CAP-0088 arms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 14, 2026 08:46

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.

Comment on lines +191 to +193
require.Equal(t, want.changeType, change["type"])
require.Equal(t, contract, change["to"])
require.Equal(t, want.muxedID, change["destination_muxed_id"])
Comment on lines +1543 to +1545
var m strkey.MuxedContract
if err := m.SetContractID(contract); err != nil {
return err
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.

5 participants