SPIKE: Protocol 28 (CAP-0084) - #307
Merged
Merged
Conversation
Add SC_ADDRESS_TYPE_MUXED_CONTRACT arm and MuxedContract struct to SCAddress, gated behind #ifdef CAP_0084_MUXED_CONTRACT, mirroring the existing MuxedEd25519Account muxed-account pattern. Appears only in the `next` branch until core bumps the max supported protocol to 28. CAP-0084 (Muxed Contract Addresses): stellar/stellar-protocol#1968
This was referenced Jul 3, 2026
sisuresh
marked this pull request as ready for review
July 7, 2026 22:14
Contributor
There was a problem hiding this comment.
Pull request overview
This PR spikes Protocol 28 / CAP-0084 support by introducing a feature-gated “muxed contract” SCAddress variant, mirroring the existing muxed-account pattern, and includes a deliberate comment revert in the ledger XDR.
Changes:
- Add
SC_ADDRESS_TYPE_MUXED_CONTRACTplusMuxedContract { id, contractId }and a newSCAddressunion arm behind#ifdef CAP_0084_MUXED_CONTRACT. - Revert a
Stellar-ledger.xdocumentation comment related torentFeeCharged.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Stellar-contract.x | Adds a feature-gated muxed-contract address type and corresponding struct/union arm. |
| Stellar-ledger.x | Reverts a rent-fee documentation comment inside SorobanTransactionMetaExtV1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rentFeeCharged is part of totalRefundableResourceFeeCharged (as the totalRefundableResourceFeeCharged comment itself states: 'comprises the rent fee'). An automation drive-by had flipped it to NonRefundable — out of scope for CAP-0084 and factually wrong. Restores the original comment; stellar#307 now touches only Stellar-contract.x (the CAP-0084 XDR).
dmkozh
approved these changes
Jul 7, 2026
sisuresh
added a commit
to sisuresh/rs-stellar-xdr
that referenced
this pull request
Jul 27, 2026
stellar/stellar-xdr#307 merged (squash) as 13fc2c3 on main, so pin the submodule + xdr-version at the canonical commit instead of the PR branch head 341179e (which is not an ancestor of main after the squash). The .x tree is byte-identical between the two commits, so `make generate` produces no change to the generated Rust or JSON schemas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
SC_ADDRESS_TYPE_MUXED_CONTRACTenum arm +MuxedContract { uint64 id; ContractID contractId; }struct +SCAddressunion arm toStellar-contract.x, all gated behind#ifdef CAP_0084_MUXED_CONTRACT, mirroring the existingMuxedEd25519Accountmuxed-account pattern.nextbranch (built--all-features) and stay out ofcurruntil core bumps max protocol to 28.curr/nextregenerate automatically on merge — not edited here.Stellar-ledger.xcomment revert (deliberate — reviewer please note): drops the unrelated Fix conflicting comment on rent fee #304 comment change so the p28 SPIKE XDR base stays byte-identical to the frozen p27 host (ledger.xhash93cdd4dd), avoiding downstream host-identity drift.Flag-token contract (downstream)
This repo is the root of the chain — no upstream. Downstreams pin this PR's head commit by full 40-char SHA:
787382ef2099cca168ca1cb282730d6b7b9e2f16(never the truncated787382e). The ifdef tokenCAP_0084_MUXED_CONTRACTis the verbatim contract for every downstream:cap_0084_muxed_contractXDR_FEATURES/xfile preprocess --features(go-stellar-sdk / js-stellar-base):CAP_0084_MUXED_CONTRACTA mismatched/truncated token silently strips the new types downstream.
Verification
Local
stellar-xdr xfile preprocess: arm absent with no features (curr); all three arms present and file parses with--features CAP_0084_MUXED_CONTRACT.Deferred
Downstream: stellar/rs-stellar-xdr#551 (pins this PR head
787382e)CAP-0084: stellar/stellar-protocol#1968