Skip to content

SPIKE: Protocol 28 (CAP-0084)#5337

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

SPIKE: Protocol 28 (CAP-0084)#5337
sisuresh wants to merge 7 commits into
stellar:masterfrom
sisuresh:p28-cap-0084

Conversation

@sisuresh

@sisuresh sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Protocol 28 / CAP-0084 (Muxed Contract Addresses) — muxed contract address support in core (SAC transfer to muxed contract; de-mux to underlying contract).

Changes

  • Merged latest master (p28 promoted WIP→full protocol; unifiedfastdev feature rename; p27 host bumped to 27.0.0/b03d2563).
  • p28 CAP-0084 host pinned to rs-soroban-env Instrument garbage collection process #1700 head 0df250f37aaae74e210c9016583c943fecdaba42 (v27.0.0), which repins rs-stellar-xdr seperate master key weight and threshold levels #552 to 3d2ad659a3a285aae9543069ee18cb6245a427ce. Submodule src/rust/soroban/p28 + src/rust/Cargo.toml rev; Cargo.lock + src/rust/src/dep-trees/p28-expect.txt regenerated.
  • C++ tests: makeMuxedContractAddress helper; "transfer to muxed contract (CAP-0084)" section.

Notes on the host pin

The #1700 head used here (0df250f3) intentionally sits on the pre-#1698 e2e API (two-iterator invoke_host_function, 2-arg wasm_module_memory_cost). rs-soroban-env #1698 ("lazily decode e2e ledger entries") changed those public APIs; core's p28 mirror glue (src/rust/src/soroban_proto_all.rs) is not adapted to it and master's promoted p28 host (883fd563) is likewise pre-#1698. #1700 reverts the accidental upstream/main merge that had dragged #1698 (plus #1702 and CAP-85) in, keeping the host CAP-0084-only at v27.0.0.

Build

  • Local build with --enable-next-protocol-version-unsafe-for-production passes (release, next protocol enabled).

Deferred

  • test-tx-meta-baseline-next re-record → follow-up if CI's --check-test-tx-meta flags CAP-0084 tx-semantics diffs.
  • XDRFieldResolver renders muxed-contract as "UNKNOWN" in --query (like other non-account/contract arms).

Upstream

sisuresh added 5 commits June 26, 2026 21:58
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.
@sisuresh

sisuresh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

sisuresh added 2 commits July 2, 2026 20:05
…b035c0

389ee9e accidentally re-pinned src/rust/soroban/p27 to the CAP-0084 host
(b5fdf26e) instead of p28. Restore p27 to the released baseline b03d2563f
(matches master) — p27 must never carry protocol-28 work.

Advance the p28 WIP host submodule + Cargo.toml/Cargo.lock to 26b035c0, which
gates CAP-0084 on the per-cap leaf feature cap_0084_muxed_contract (aggregated
by the umbrella `next` feature). Regenerate p28-expect.txt (stellar-xdr
cf7fdedf) and update the Makefile.am comment to match the new gating.
Bring CAP-0084 current with master (p28 promoted WIP->full protocol,
unified->fastdev, p27 host bump) and pin the p28 CAP-0084 host to the
stellar#1698-free rs-soroban-env#1700 head 0df250f3 (v27.0.0), which repins
rs-stellar-xdr#552 to 3d2ad659. Keeps core's p28 mirror glue on the
pre-stellar#1698 e2e API. Cargo.lock / p28-expect.txt regenerated.
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