SPIKE: Protocol 28 (CAP-0085)#1525
Draft
sisuresh wants to merge 1 commit into
Draft
Conversation
Pin the vendored next-channel XDR to stellar-xdr#308 head
(76218a994f8c5ba752cba368080fb2f89843ad3c) and enable
CAP_0085_EXECUTABLE_REF on the `next` channel only (protocol 28 is not on
`curr` yet; the curr pin is left unchanged). Split the Makefile
XDR_FEATURES into _CURR/_NEXT so the cap flag applies to next only.
Targeted codec additions to src/base/generated/next_{generated.js,d.ts}
(regen-shape preserved): SCVal SCV_EXECUTABLE_TAG arm (22), ContractExecutable
CONTRACT_EXECUTABLE_EXTERNAL_REF variant (2), and ContractExecutableExternalRef
struct. String fields are typed `string | Buffer` per the codec's existing
convention (ScString is a value, not a type). scValToNative's default case
already handles the new SCVal arm, so no hand-written SDK helpers were added.
Wire scripts/post-process-generated.py (xdrgen const-inlining, mirrors the
CAP-0084 stack) into the Makefile and apply it to next_generated.js: the
next codec was un-loadable on main (bare `SCSYMBOL_LIMIT`/`SC_SPEC_DOC_LIMIT`
refs ReferenceError), which blocked verifying the CAP-0085 types. curr is
left untouched (it uses the older declaration style; the script would corrupt
it and curr is out of scope for CAP-0085).
Verified: next codec round-trips scvExecutableTag and ContractExecutable
external_ref; `pnpm build:prod` (tsc) passes against the new .d.ts.
Canonical XDR: stellar/stellar-xdr#308. Host draft context:
stellar/rs-soroban-env#1703.
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): Protocol 28 / CAP-0085 — externally managed contract executables. Based on the canonical XDR in stellar/stellar-xdr#308.
Changes
nextXDR channel to stellar-xdr#308 head (76218a99) and addXDR_FEATURES_NEXT=CAP_0085_EXECUTABLE_REF(next-only;currpin/features left unchanged — protocol 28 is not oncurryet).xdr/next/Stellar-contract.x+ regeneratedsrc/base/generated/next_{generated.js,d.ts}:SCValSCV_EXECUTABLE_TAG(22),ContractExecutableCONTRACT_EXECUTABLE_EXTERNAL_REF(2), andContractExecutableExternalRefstruct. String fields typedstring | Buffer(the codec's convention;ScStringis a value, not a type).scripts/post-process-generated.py(xdrgen const-inlining, mirrors the CAP-0084 stack) and applied it tonext_generated.js: thenextcodec was un-loadable onmain(bareSCSYMBOL_LIMIT/SC_SPEC_DOC_LIMIT→ ReferenceError), which blocked verifying the new types.nextcodec round-tripsscvExecutableTagandContractExecutableexternal_ref;pnpm build:prod(tsc) passes.Deferred
SCV_EXECUTABLE_TAG(host-side operation;scValToNative's default already decodes the arm). Flagged for reviewer.currconst-inlining left untouched (pre-existing;curruses the older declaration style the script would corrupt, and it's out of scope for CAP-0085).make generateat the new pin would also surface an unrelated upstreamStellar-ledger.xcomment change (stellar-xdr main, not Update Axios #308); not in this PR's committed files (targeted edits).Upstream
.x, CAP_0085_EXECUTABLE_REF)Independent of the CAP-0083/CAP-0084 p28 SPIKE stacks. Stays draft.