Skip to content

Support fully qualified type names for v30 - #2798

Merged
leighmcculloch merged 30 commits into
mainfrom
qualified-spec-names-for-v30
Oct 22, 2026
Merged

leighmcculloch merged 30 commits into
mainfrom
qualified-spec-names-for-v30

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

What

Update the xdr, sdk and env crates for v30 and teach contract build to reduce the fully qualified type and event names in contract specs and to shake specs by the version recorded in the wasm.

Why

Contracts built with soroban-sdk v30 name user-defined types and events by their fully qualified path, which the CLI must read, shorten and shake correctly; this replaces #2751, #2674 and #2720.

Known limitations

The sdk, env and xdr crates are pinned to git revisions until they are released.

@leighmcculloch
leighmcculloch marked this pull request as ready for review October 13, 2026 15:27
@leighmcculloch
leighmcculloch requested a review from a team as a code owner October 13, 2026 15:27
Copilot AI lite review requested due to automatic review settings October 13, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Two moderate build-path issues remain unresolved; the warning wording also needs correction.

0 open findings

What changed in this PR

Updates Soroban dependencies and CLI contract builds for v30 fully qualified type/event names.

Changes:

  • Pins v30 SDK, environment, XDR, and related revisions.
  • Adds spec shaking and qualified-name reduction.
  • Updates fixtures, tests, interface generation, and CI workflows.

Review findings:

  • Cargo.toml — moderate: raw fixture builds bypass required v30 post-processing.
  • build.rs — moderate: --image builds bypass the new transformation.
  • build.rs — nit: collision warnings also cover reserved-name renaming.
File Description
deny.toml Allows temporary pinned Git dependencies.
cmd/​soroban-cli/​src/​utils/​contract-workspace-template/​Cargo.toml.removeextension Updates the generated SDK version to v30.
cmd/​soroban-cli/​src/​commands/​contract/​info/​interface.rs Passes SDK version to Rust interface generation.
cmd/​soroban-cli/​src/​commands/​contract/​build.rs Adds version-aware shaking and qualified-name reduction.
cmd/​soroban-cli/​src/​commands/​contract/​arg_parsing.rs Adapts tests to widened XDR names.
cmd/​crates/​soroban-test/​tests/​it/​build.rs Adds qualified-name and shaking integration coverage.
cmd/​crates/​soroban-test/​tests/​fixtures/​workspace-with-qualified-names/​contracts/​names/​src/​lib.rs Defines qualified-name fixture types and events.
cmd/​crates/​soroban-test/​tests/​fixtures/​workspace-with-qualified-names/​contracts/​names/​Cargo.toml Defines fixture contract metadata.
cmd/​crates/​soroban-test/​tests/​fixtures/​workspace-with-qualified-names/​Cargo.toml Defines the fixture workspace.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​token/​Cargo.toml Updates the token fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​token_renamed/​Cargo.toml Updates the renamed-token fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​swap/​Cargo.toml Updates the swap fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​hello_world/​Cargo.toml Updates the hello-world fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​empty_constructor/​Cargo.toml Updates the empty-constructor fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​custom_type/​Cargo.toml Updates the custom-type fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​custom_account/​Cargo.toml Updates the custom-account fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​constructor/​Cargo.toml Updates the constructor fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​test-wasms/​auth/​Cargo.toml Updates the auth fixture to v30.
cmd/​crates/​soroban-test/​tests/​fixtures/​hello/​Cargo.toml Updates the hello fixture.
cmd/​crates/​soroban-test/​tests/​fixtures/​bye/​Cargo.toml Updates the bye fixture.
cmd/​crates/​soroban-spec-tools/​src/​lib.rs Supports widened type and event names.
cmd/​crates/​soroban-spec-tools/​src/​event.rs Updates event-name construction.
cmd/​crates/​soroban-spec-tools/​src/​contract.rs Formats widened contract names.
Cargo.toml Updates workspace dependencies and v30 revisions.
Cargo.lock Locks updated dependency revisions.
.github/​workflows/​rpc-tests.yml Updates the protocol version.
.github/​workflows/​ledger-emulator.yml Updates the protocol version.
.github/​workflows/​bindings-ts.yml Updates the protocol version.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI lite review requested due to automatic review settings October 13, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Fixture generation and the contract build --image path do not apply the new spec post-processing.

0 open findings

🧠 Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 13, 2026 19:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Pin the generated-project SDK revision and ensure contract build --image applies the same post-processing guarantees.

2 open findings

🧠 Review effort: Lite

Comment thread cmd/soroban-cli/src/utils/contract-workspace-template/Cargo.toml.removeextension Outdated
Comment thread cmd/soroban-cli/src/commands/contract/build.rs
Copilot AI lite review requested due to automatic review settings October 14, 2026 16:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical v3 capability and fixture-processing issues remain unresolved.

2 open findings
2 resolved since last review

🧠 Review effort: Lite

Comment thread Cargo.toml Outdated
Comment thread cmd/soroban-cli/src/commands/contract/build.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Build-generated and container-produced WASMs do not consistently receive the new spec processing.

2 open findings

🧠 Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 14, 2026 21:40
@leighmcculloch
leighmcculloch force-pushed the qualified-spec-names-for-v30 branch from 08c60c7 to de1b884 Compare October 16, 2026 16:45
leighmcculloch added a commit to jayz22/rs-soroban-sdk that referenced this pull request Oct 19, 2026
### What

In `soroban-token-spec` and `stellar-asset-spec`, change `xdr()` to
return the spec with its type and event names reduced by
`soroban_spec::reduce::reduce`, and keep the unreduced spec in a `const`
fn `xdr_unprocessed()`. Make both crates std, and exclude them from the
wasm publish dry run. Document on the generated `spec_xdr` fns, and in a
v30 migration note, that their entries are unprocessed and must be
reduced when assembled into a spec.

Also add docs to all spec xdr fns noting they are unprocessed.

### Why

Specs generated by the SDK have not yet passed through `stellar contract
build`, so the assembled spec names types and events by their fully
qualified paths, such as
`::stellar_asset_spec::TransferWithMuxedString`, which tooling cannot
decode.

It's not possible for the spec xdr functions generated by the sdk to
return processed versions because the spec xdr fns hold a single entry
and a single entry cannot be reduced on its own, so best we can do is
document their new behaviour. A change like this is not ideal, but a
tradeoff in the new way specs are generated. These functions are not
typically used by contracts in any case.

The `*-spec` crates are designed specifically for other applications,
like the stellar-cli, to import the spec. So it makes sense to offer
processed versions in those crates.

Close stellar#2140

Blocking stellar/stellar-cli#2798

### SemVer Change

- [x] Major (`vX._._`) - Breaking change to the public API.
- [ ] Minor (`v_.Y._`) - Additive change to the public API.
- [ ] Patch (`v_._.Z`) - No change to the public API.
leighmcculloch added a commit to stellar/quickstart that referenced this pull request Oct 22, 2026
### What

Add protocol 30 Soroban config settings for the local network, which are
the p27 settings plus the host's cost params for the nine ML-DSA cost
types protocol 30 adds, and a pull-request-only `nightly-p30` image that
runs core master with the `protocol-next` rpc and horizon.

### Why

At protocol 30 the local network falls back to the p27 settings, whose
cost param lists are nine entries short, so the config upgrade fails and
the container never becomes healthy, and no published image pairs a
protocol 30 core with an rpc that can read its ledger close meta, which
blocks testing protocol 30 contracts (stellar/stellar-cli#2798).
@leighmcculloch
leighmcculloch marked this pull request as ready for review October 22, 2026 00:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The protocol-wide dependency upgrade and WASM spec rewriting warrant human review supported by passing build and end-to-end integration checks.

3 open issues
2 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The major dependency migration and WASM spec rewriting warrant human review backed by successful v30 integration validation.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@leighmcculloch
leighmcculloch merged commit 0c905da into main Oct 22, 2026
152 checks passed
@leighmcculloch
leighmcculloch deleted the qualified-spec-names-for-v30 branch October 22, 2026 02:55
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Spec entries for types defined in a dependency crate can be lost

4 participants