Skip to content

SPIKE: Protocol 28 (CAP-0084): muxed contract address support#5332

Draft
sisuresh wants to merge 2 commits into
stellar:masterfrom
sisuresh:p28-cap-0084
Draft

SPIKE: Protocol 28 (CAP-0084): muxed contract address support#5332
sisuresh wants to merge 2 commits into
stellar:masterfrom
sisuresh:p28-cap-0084

Conversation

@sisuresh

@sisuresh sisuresh commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

SPIKE — Protocol 28 / CAP-0084 (muxed contract address support) for stellar-core. Pins unmerged upstream refs; draft while the chain lands.

Changes

  • New src/rust/soroban/p28 rs-soroban-env submodule (CAP-0084 host @ 8cf4f5e1), separate p28 module cache; p27 untouched.
  • protocol-curr/xdr bumped to the CAP-0084 .x; handle SC_ADDRESS_TYPE_MUXED_CONTRACT in LedgerHashUtils.h / XDRCereal.cpp, gated on CAP_0084_MUXED_CONTRACT.
  • Wire CAP_0084_MUXED_CONTRACT flag (configure.ac / common.mk / Makefile.am), auto-on with --enable-next-protocol-version-unsafe-for-production.
  • Tests: muxed-contract transfer/mint + de-muxing; test-tx-meta-baseline-next re-recorded for the SAC CAP-67 test (entry count unchanged — please sanity-check the delta).

Deferred

  • None blocking; downstream RPC integration image re-pins to this build's -vnext artifact once Jenkins publishes it.

Upstream

  • stellar-xdr#306 · rs-stellar-xdr#549 · rs-soroban-env#1696 · rs-soroban-sdk#1922

Downstream

Add protocol 28 / CAP-0084 (muxed contract addresses) to the vnext build.

Soroban host:
- Add the src/rust/soroban/p28 rs-soroban-env submodule (CAP-0084 host) with
  its .gitmodules entry, and wire it into the multi-soroban rlib build
  (src/Makefile.am, src/rust/Cargo.toml, Cargo.lock, soroban_proto_all.rs).
- soroban_module_cache.rs: add a separate p28 protocol-specific module cache
  (the next protocol is a real WIP host, not an alias of p27).

XDR / address handling (gated on CAP_0084_MUXED_CONTRACT):
- Bump the src/protocol-curr/xdr submodule to the CAP-0084 .x.
- Hash and JSON-serialize the new SC_ADDRESS_TYPE_MUXED_CONTRACT arm
  (LedgerHashUtils.h, XDRCereal.cpp).
- Wire the CAP_0084_MUXED_CONTRACT feature flag (configure.ac, common.mk,
  src/Makefile.am); enabled with
  --enable-next-protocol-version-unsafe-for-production.

Tests:
- SorobanTxTestUtils: makeMuxedContractAddress helper + de-muxing of
  MUXED_CONTRACT to the underlying contract in transfer invocations.
- InvokeHostFunctionTests: new muxed-contract transfer/mint sections in the
  "Stellar asset contract transfer with CAP-67 address types" test; update
  "Module cache across protocol versions" to account for p28's separate
  module cache (next protocol now adds to the module-cache entry count).
- Re-record test-tx-meta-baseline-next/InvokeHostFunctionTests.json and add
  the p28 cargo dep-tree expectation.

SPIKE: depends on unmerged upstream rs-soroban-env / rs-stellar-xdr / stellar-xdr.
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