SPIKE: Protocol 28 (CAP-0084)#2
Closed
sisuresh wants to merge 1 commit into
Closed
Conversation
- Bump XDR rev pin (curr+next) to stellar/stellar-xdr@2769fed (PR stellar#305 head) carrying the CAP_0084 #ifdef gate; add CAP_0084 to XDR_FEATURES and the `stellar-xdr xfile preprocess --features` step on the .x fetch rules. - New XDR: SCAddressType.SC_ADDRESS_TYPE_MUXED_CONTRACT=5, struct MuxedContract { uint64 id; ContractID contractId; }, SCAddress muxedContract arm. curr/next regenerated byte-identical. - Make generated-JS const inlining reproducible and terser-safe: scripts/post-process-generated.py inlines bare const use sites (xdr.string(SCSYMBOL_LIMIT) -> xdr.string(32)) so terser cannot DCE an unbound identifier; wired as a post-xdrgen Makefile step for curr and next. - Regenerate types/{curr,next}.d.ts with MuxedContract; patch the dts Makefile recipes (node:lts-alpine + apk add yarn, drop -it). - Address now decodes/encodes the muxed-contract arm: Address.muxedContract(), fromScAddress/toScAddress round-trip (uint64 preserved as xdr.Uint64), contractId()/muxedId() accessors, <C-strkey>:<id> display, toBuffer() throws. Public typings (types/index.d.ts, types/test.ts) and unit tests added. Deferred: a canonical muxed-contract *strkey* (so the display string isn't constructor-parsable) — pending upstream standardization; mirrors go-stellar-sdk#1, which has the same residual gap.
This was referenced Jun 25, 2026
Owner
Author
|
Downstream: consumed by the Lab CAP-0084 SPIKE — sisuresh/laboratory#2 |
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 bumping
js-stellar-basefor Protocol 28 / CAP-0084 (muxed contract addresses).Changes
stellar-xdr@2769fed(PR WIP: feat(typescript): add XDR typings stellar/js-stellar-base#305 head);CAP_0084added to the regen feature gate. NewSC_ADDRESS_TYPE_MUXED_CONTRACTarm +MuxedContractstruct; curr/next byte-identical.Addressdecodes/encodes the muxed-contract arm:Address.muxedContract(contractId, id),fromScAddress/toScAddressround-trip (uint64 kept asxdr.Uint64, no precision loss),contractId()/muxedId()accessors,<C-strkey>:<id>display.toBuffer()throws for this arm (no canonical single-buffer encoding).scripts/post-process-generated.py, wired as a post-xdrgen Makefile step.types/{curr,next}.d.ts+ publicAddresstypings (types/index.d.ts,types/test.ts) updated; dts Makefile recipes patched (node:lts-alpine, drop-it). Hand-aligned the.d.tsdelta because dts-xdrmasterhas drifted from the committed format.Addressmuxed-contract unit tests (incl. a2^64-1mux id) + CHANGELOG.Deferred
Addressconstructor; round-trip is viaScAddress/ScVal. Pending upstream standardization. One residual decision for human review — mirrors go-stellar-sdk, which made the same call.toBuffer()for the muxed arm — intentionally throws.Links
Upstream (pinned
.x): stellar/stellar-xdr#305Mirrors (same residual strkey gap): sisuresh/go#1
Downstream (re-pin once stellar#305 merges): feeds
js-stellar-sdk→stellar-laboratoryPart of the CAP-0084 / Protocol 28 rollout: