Skip to content

Ungate CAP-0083 and CAP-0085 - #565

Merged
sisuresh merged 3 commits into
stellar:mainfrom
sisuresh:ungate-cap-0083-0085
Jul 29, 2026
Merged

Ungate CAP-0083 and CAP-0085#565
sisuresh merged 3 commits into
stellar:mainfrom
sisuresh:ungate-cap-0083-0085

Conversation

@sisuresh

@sisuresh sisuresh commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Repins the xdr submodule to stellar/stellar-xdr#311 and drops the now-unneeded cap_0083 / cap_0085_executable_ref features — those types generate unconditionally now. Also removes the two hand-written gates on them (VERSION.features, and the ScVal::ExecutableTag match arm).

The repin also crosses #307, so the .x now has CAP_0084_MUXED_CONTRACT ifdefs. That forces declaring a cap_0084_muxed_contract feature plus a Display arm for ScAddress::MuxedContract — both taken verbatim from #552. Off by default.

Deferred: with that feature on, MuxedContract addresses can't serialize (ScAddress derives SerializeDisplay). No strkey encoding exists yet — CAP-0084 defers it to SEP-23. Tracked on #552.

Second of the P28 ungating stack.

Repins the xdr submodule to stellar-xdr main (stellar/stellar-xdr#311),
which removes the CAP_0083 and CAP_0085_EXECUTABLE_REF ifdefs, and drops
the matching cap_0083 / cap_0085_executable_ref crate features. Their
types are now generated unconditionally.

Also drops the two hand-written gates on those features: the
VERSION.features list in lib.rs and the ScVal::ExecutableTag arm in
scval_validations.rs, which would otherwise leave the match
non-exhaustive.

The repin also crosses stellar/stellar-xdr#307, so the .x now carries
CAP_0084_MUXED_CONTRACT ifdefs. That forces a cap_0084_muxed_contract
feature to be declared (generated code cfgs on it) plus a Display arm
for ScAddress::MuxedContract; both are taken verbatim from the in-flight
SPIKE stellar#552. The feature is off by default.
Copilot AI review requested due to automatic review settings July 29, 2026 17:54

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.

Pull request overview

Repins Stellar XDR to #311, ungates CAP-0083/CAP-0085 types, and introduces the gated CAP-0084 muxed-contract bindings.

Changes:

  • Removes obsolete CAP-0083/CAP-0085 feature gates.
  • Adds the optional cap_0084_muxed_contract feature and generated types.
  • Regenerates Rust bindings, XDR metadata, and JSON schemas.

Reviewed changes

Copilot reviewed 107 out of 120 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Updates XDR feature declarations.
src/generated.rs Updates hashes and generated module exports.
src/generated/contract_executable.rs Ungates external executable references.
src/generated/contract_executable_external_ref.rs Ungates the external-reference structure.
src/generated/contract_executable_type.rs Ungates the external-reference discriminant.
src/generated/muxed_contract.rs Adds the gated muxed-contract type.
src/generated/sc_address.rs Adds the gated muxed-contract address arm.
src/generated/sc_address_type.rs Adds the gated address discriminant.
src/generated/sc_val.rs Ungates executable-tag values.
src/generated/sc_val_type.rs Ungates the executable-tag discriminant.
src/generated/stellar_value.rs Updates CAP-0083 documentation.
src/generated/stellar_value_ext.rs Ungates empty transaction-set values.
src/generated/stellar_value_proposed_value.rs Ungates proposed ledger values.
src/generated/stellar_value_type.rs Ungates the empty-set discriminant.
src/generated/type_enum.rs Updates dynamic APIs for the changed types.
src/lib.rs Updates reported XDR features.
src/scval_validations.rs Ungates executable-tag validation.
src/str.rs Adds muxed-contract display handling.
xdr Repins the upstream XDR submodule.
xdr-definitions-json/xdr.json Regenerates XDR definition metadata.
xdr-json/AuthenticatedMessage.json Regenerates transitive schemas.
xdr-json/AuthenticatedMessageV0.json Regenerates transitive schemas.
xdr-json/BucketEntry.json Regenerates transitive schemas.
xdr-json/ContractDataEntry.json Adds ungated Soroban definitions.
xdr-json/ContractEvent.json Adds ungated Soroban definitions.
xdr-json/ContractEventBody.json Adds ungated Soroban definitions.
xdr-json/ContractEventV0.json Adds ungated Soroban definitions.
xdr-json/ContractExecutable.json Adds the external-reference union arm.
xdr-json/ContractExecutableExternalRef.json Adds the external-reference schema.
xdr-json/ContractExecutableType.json Adds the external-reference enum value.
xdr-json/CreateContractArgs.json Adds external-reference definitions.
xdr-json/CreateContractArgsV2.json Adds ungated Soroban definitions.
xdr-json/DependentTxCluster.json Regenerates transitive schemas.
xdr-json/DiagnosticEvent.json Adds ungated Soroban definitions.
xdr-json/FeeBumpTransaction.json Regenerates transitive schemas.
xdr-json/FeeBumpTransactionEnvelope.json Regenerates transitive schemas.
xdr-json/FeeBumpTransactionInnerTx.json Regenerates transitive schemas.
xdr-json/GeneralizedTransactionSet.json Regenerates transitive schemas.
xdr-json/HashIdPreimage.json Adds ungated Soroban definitions.
xdr-json/HashIdPreimageSorobanAuthorization.json Adds ungated Soroban definitions.
xdr-json/HashIdPreimageSorobanAuthorizationWithAddress.json Adds ungated Soroban definitions.
xdr-json/HostFunction.json Adds ungated Soroban definitions.
xdr-json/HotArchiveBucketEntry.json Regenerates transitive schemas.
xdr-json/InvokeContractArgs.json Adds ungated Soroban definitions.
xdr-json/InvokeHostFunctionOp.json Adds ungated Soroban definitions.
xdr-json/InvokeHostFunctionSuccessPreImage.json Adds ungated Soroban definitions.
xdr-json/LedgerCloseMeta.json Regenerates transitive schemas.
xdr-json/LedgerCloseMetaBatch.json Regenerates transitive schemas.
xdr-json/LedgerCloseMetaV0.json Regenerates transitive schemas.
xdr-json/LedgerCloseMetaV1.json Regenerates transitive schemas.
xdr-json/LedgerCloseMetaV2.json Regenerates transitive schemas.
xdr-json/LedgerEntry.json Regenerates transitive schemas.
xdr-json/LedgerEntryChange.json Regenerates transitive schemas.
xdr-json/LedgerEntryChanges.json Regenerates transitive schemas.
xdr-json/LedgerEntryData.json Regenerates transitive schemas.
xdr-json/LedgerFootprint.json Adds ungated Soroban definitions.
xdr-json/LedgerHeader.json Ungates empty transaction-set values.
xdr-json/LedgerHeaderHistoryEntry.json Ungates empty transaction-set values.
xdr-json/LedgerKey.json Adds ungated Soroban definitions.
xdr-json/LedgerKeyContractData.json Adds ungated Soroban definitions.
xdr-json/Operation.json Adds ungated Soroban definitions.
xdr-json/OperationBody.json Regenerates transitive schemas.
xdr-json/OperationMeta.json Regenerates transitive schemas.
xdr-json/OperationMetaV2.json Adds ungated Soroban definitions.
xdr-json/ParallelTxExecutionStage.json Regenerates transitive schemas.
xdr-json/ParallelTxsComponent.json Regenerates transitive schemas.
xdr-json/PersistedScpState.json Regenerates transitive schemas.
xdr-json/PersistedScpStateV0.json Regenerates transitive schemas.
xdr-json/RevokeSponsorshipOp.json Adds ungated Soroban definitions.
xdr-json/ScAddressType.json Records the gated CAP-0084 discriminant.
xdr-json/ScContractInstance.json Adds ungated Soroban definitions.
xdr-json/ScMap.json Adds ungated Soroban definitions.
xdr-json/ScMapEntry.json Adds ungated Soroban definitions.
xdr-json/ScVal.json Adds the executable-tag union arm.
xdr-json/ScValType.json Adds the executable-tag enum value.
xdr-json/ScVec.json Adds ungated Soroban definitions.
xdr-json/SorobanAddressCredentials.json Adds ungated Soroban definitions.
xdr-json/SorobanAddressCredentialsWithDelegates.json Adds ungated Soroban definitions.
xdr-json/SorobanAuthorizationEntries.json Adds ungated Soroban definitions.
xdr-json/SorobanAuthorizationEntry.json Adds ungated Soroban definitions.
xdr-json/SorobanAuthorizedFunction.json Adds ungated Soroban definitions.
xdr-json/SorobanAuthorizedInvocation.json Adds ungated Soroban definitions.
xdr-json/SorobanCredentials.json Adds ungated Soroban definitions.
xdr-json/SorobanDelegateSignature.json Adds ungated Soroban definitions.
xdr-json/SorobanResources.json Adds ungated Soroban definitions.
xdr-json/SorobanTransactionData.json Adds ungated Soroban definitions.
xdr-json/SorobanTransactionMeta.json Adds ungated Soroban definitions.
xdr-json/SorobanTransactionMetaV2.json Adds ungated Soroban definitions.
xdr-json/StellarMessage.json Regenerates transitive schemas.
xdr-json/StellarValue.json Ungates empty transaction-set values.
xdr-json/StellarValueExt.json Adds the empty transaction-set union arm.
xdr-json/StellarValueProposedValue.json Adds the proposed-value schema.
xdr-json/StellarValueType.json Adds the empty-set enum value.
xdr-json/StoredDebugTransactionSet.json Regenerates transitive schemas.
xdr-json/StoredTransactionSet.json Regenerates transitive schemas.
xdr-json/Transaction.json Adds ungated Soroban definitions.
xdr-json/TransactionEnvelope.json Regenerates transitive schemas.
xdr-json/TransactionEvent.json Adds ungated Soroban definitions.
xdr-json/TransactionExt.json Adds ungated Soroban definitions.
xdr-json/TransactionHistoryEntry.json Regenerates transitive schemas.
xdr-json/TransactionHistoryEntryExt.json Regenerates transitive schemas.
xdr-json/TransactionMeta.json Adds ungated Soroban definitions.
xdr-json/TransactionMetaV1.json Regenerates transitive schemas.
xdr-json/TransactionMetaV2.json Regenerates transitive schemas.
xdr-json/TransactionMetaV3.json Adds ungated Soroban definitions.
xdr-json/TransactionMetaV4.json Adds ungated Soroban definitions.
xdr-json/TransactionPhase.json Adds ungated Soroban definitions.
xdr-json/TransactionResultMeta.json Adds ungated Soroban definitions.
xdr-json/TransactionResultMetaV1.json Adds ungated Soroban definitions.
xdr-json/TransactionSet.json Adds ungated Soroban definitions.
xdr-json/TransactionSetV1.json Regenerates transitive schemas.
xdr-json/TransactionSignaturePayload.json Regenerates transitive schemas.
xdr-json/TransactionSignaturePayloadTaggedTransaction.json Regenerates transitive schemas.
xdr-json/TransactionV0.json Regenerates transitive schemas.
xdr-json/TransactionV0Envelope.json Regenerates transitive schemas.
xdr-json/TransactionV1Envelope.json Regenerates transitive schemas.
xdr-json/TxSetComponent.json Regenerates transitive schemas.
xdr-json/TxSetComponentTxsMaybeDiscountedFee.json Regenerates transitive schemas.
xdr-json/UpgradeEntryMeta.json Adds ungated Soroban definitions.
xdr-version Records the new upstream XDR revision.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/str.rs
Comment thread src/scval_validations.rs Outdated
Now that the arm is unconditional it has a body identical to the
preceding one, which clippy::pedantic rejects (match_same_arms).
@sisuresh
sisuresh requested a review from dmkozh July 29, 2026 18:43
Comment thread src/str.rs Outdated
@sisuresh
sisuresh added this pull request to the merge queue Jul 29, 2026
Merged via the queue into stellar:main with commit 3305b3e Jul 29, 2026
58 checks passed
@sisuresh
sisuresh deleted the ungate-cap-0083-0085 branch July 29, 2026 20:46
sisuresh added a commit to stellar/stellar-quorum-analyzer that referenced this pull request Jul 29, 2026
stellar-core's checkXDRFileIdentity compares this crate's
XDR_FILES_SHA256 against the current soroban host's. Core is bumping to
protocol 28, whose host pins stellar-xdr by git rev, so the published
27.0.0 crate no longer matches: Stellar-contract.x hashes 5d8063e6 here
versus b87e9474 there, and core aborts at startup.

Pin the same git rev (stellar/rs-stellar-xdr#565, where CAP-0083 and
CAP-0085 were ungated) so the hashes agree. This reverts to a plain
version pin once rs-stellar-xdr publishes a release carrying those
changes.
jayz22 pushed a commit to jayz22/rs-soroban-env that referenced this pull request Jul 30, 2026
…ar#1715)

Repins `stellar-xdr` to stellar/rs-stellar-xdr#565, where CAP-0083 and
CAP-0085 were ungated. That feature no longer exists there — the types
are unconditional now — so the dep stops requesting it.

No host code changes: CAP-0085 and CAP-0086 both landed ungated, so
there were no cfgs to remove. Verified `--features testutils` (830
tests) and `--features testutils,next` (829), both green.

Third of the P28 ungating stack; stellar-core follows.
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.

3 participants