SPIKE: Protocol 28 (CAP-0085)#5347
Draft
sisuresh wants to merge 2 commits into
Draft
Conversation
sisuresh
marked this pull request as ready for review
July 14, 2026 21:00
sisuresh
marked this pull request as draft
July 14, 2026 21:11
Contributor
There was a problem hiding this comment.
Pull request overview
Stages Protocol 28 / CAP-0085 support for externally managed contract executables.
Changes:
- Adds gated p28 Soroban host, dependencies, dispatch, and module caching.
- Gates external-reference contract creation on protocol 28.
- Adds admission validation tests for both create variants.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.gitmodules |
Adds p28 and CAP-0085 fork sources. |
Cargo.lock |
Locks p28 host and XDR dependencies. |
common.mk |
Defines the CAP-0085 C++ flag. |
configure.ac |
Adds the CAP-0085 build conditional. |
src/Makefile.am |
Builds gated XDR and p28 host code. |
src/herder/TransactionQueue.cpp |
Passes ledger protocol into host-function validation. |
src/herder/test/TransactionQueueTests.cpp |
Tests external-reference validation rules. |
src/rust/Cargo.toml |
Pins the p28 host dependency. |
src/rust/src/dep-trees/p28-expect.txt |
Records p28 dependencies. |
src/rust/src/soroban_module_cache.rs |
Adds the p28 module cache. |
src/rust/src/soroban_proto_all.rs |
Registers and dispatches the p28 host. |
src/transactions/FeeBumpTransactionFrame.cpp |
Forwards protocol-aware validation. |
src/transactions/FeeBumpTransactionFrame.h |
Updates the validation override. |
src/transactions/TransactionFrame.cpp |
Implements protocol-gated executable validation. |
src/transactions/TransactionFrame.h |
Updates the validation interface. |
src/transactions/TransactionFrameBase.h |
Adds the ledger-version parameter. |
src/transactions/test/TransactionTestFrame.cpp |
Forwards test-frame validation. |
src/transactions/test/TransactionTestFrame.h |
Updates the test-frame override. |
src/util/ProtocolVersion.h |
Defines the CAP-0085 activation version. |
Comment on lines
+1371
to
+1372
| REQUIRE(tx->validateHostFn(gate)); | ||
| REQUIRE_FALSE(tx->validateHostFn(gate - 1)); |
Comment on lines
+1641
to
+1642
| #[cfg(feature = "next")] | ||
| proto_versioned_functions_for_module!(p28), |
Wire up a per-protocol soroban-env-host submodule for protocol 28 (CAP-85, externally managed contract executables), gated behind the `next` feature and WIP_SOROBAN_PROTOCOL, mirroring the existing p27 module: - .gitmodules + src/rust/soroban/p28 submodule (rs-soroban-env CAP-85). - src/rust/Cargo.toml: soroban-env-host-p28 git/rev pin (+ unified feature). - src/rust/src/soroban_proto_all.rs: p28 adaptor module + HOST_MODULES entry; soroban_curr aliased to p28 under `next`. - src/rust/src/soroban_module_cache.rs: p28_cache field + arms. - src/rust/src/dep-trees/p28-expect.txt, Cargo.lock: regenerated. - configure.ac / common.mk / src/Makefile.am: CAP-85 flag wiring. - src/protocol-curr/xdr, ProtocolVersion.h, TransactionFrame.cpp: p28 XDR. The p28 host is pinned at the CAP-85 branch with rs-soroban-env stellar#1698 ("lazily decode ledger entries passed in e2e flow") reverted, so the host keeps the pre-stellar#1698 e2e_invoke/wasm_module_memory_cost interface that core's mirror-of-p27 glue targets. Adopting stellar#1698 requires separate C++ bridge work and is out of scope for this WIP host.
Thread ledgerVersion through TransactionFrameBase::validateHostFn and
accept CONTRACT_EXECUTABLE_EXTERNAL_REF for FROM_ADDRESS CREATE_CONTRACT /
CREATE_CONTRACT_V2 starting at EXTERNAL_EXECUTABLE_REF_PROTOCOL_VERSION
(protocol 28), matching CAP-0085 ("InvokeHostFunctionOp update") and the
p28 host (rs-soroban-env#1703). Removes the SPIKE TODO that had left
external-ref creates rejected core-side. FROM_ASSET still requires
STELLAR_ASSET; non-next behavior unchanged.
Adds a gated TransactionQueue section covering both host-fn variants
(external-ref accepted at p28 / rejected below it, FROM_ASSET+external-ref
rejected).
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.
SPIKE draft for Protocol 28 / CAP-0085 (externally managed contract executables). Based on dmkozh's drafts.
Changes
src/rust/soroban/p28submodule + Cargo pin at rs-soroban-env Load generator tweaks #1704 headb505cd78,CAP_0085_EXECUTABLE_REFflag triple,EXTERNAL_EXECUTABLE_REF_PROTOCOL_VERSION = V_28.ledgerVersionthroughvalidateHostFn; acceptCONTRACT_EXECUTABLE_EXTERNAL_REFfor FROM_ADDRESSCREATE_CONTRACT/CREATE_CONTRACT_V2at protocol ≥ 28 (CAP-0085 "InvokeHostFunctionOp update"), plus a gatedTransactionQueuetest for both variants.Deferred
-vnextdeb/docker image is a manual Jenkins build; downstream deb/image pins wait for the artifact matching this PR HEAD.--check-test-tx-metaleft to CI — this change is mempool-admission only (no ledger-apply meta).Upstream
.x,CAP_0085_EXECUTABLE_REF), rs-soroban-env#1703 (host draft)Downstream (separate PRs, not this one)