Repository navigation
Support fully qualified type names for v30 - #2798
leighmcculloch wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
🔵 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:--imagebuilds 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.
| [workspace.dependencies.soroban-sdk] | ||
| version = "28.0.0" | ||
| version = "30.0.0" | ||
| git = "https://github.com/stellar/rs-soroban-sdk" | ||
| rev = "a2e51be61dc5c179595ba5b26da7da724e253886" |
| // optimization. The var says only that this CLI shakes; which | ||
| // rules it shakes a given contract by comes from the model that | ||
| // contract's meta selects. Current and new SDK versions no | ||
| // longer read this var, relying on the CLI version below | ||
| // instead, but it must keep being set for past SDK versions that | ||
| // require it. |
| [package] | ||
| name = "stellar-bye" | ||
| version = "28.1.0" | ||
| version = "30.0.0" |
| [package] | ||
| name = "soroban-hello" | ||
| version = "28.1.0" | ||
| version = "30.0.0" |
| let (base64, spec) = Spec::spec_to_base64(stellar_asset_spec::xdr())?; | ||
| (base64, spec, None) |
There was a problem hiding this comment.
Doesn't stellar_asset_spec::xdr() need to get reduced?
There was a problem hiding this comment.
stellar contract info interface --contract-id CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC --output json-formattedshows the un-reduced names for the testnet XLM contract
| if: runner.os == 'Linux' | ||
| - run: cargo build | ||
| - run: rustup target add wasm32v1-none | ||
| - run: make build-test-wasms |
There was a problem hiding this comment.
I think this job deploys contracts right? We probably need to build with CLI
There was a problem hiding this comment.
Seems to be implied by this failure, that un-reduced specs cause the issue:
Rejected promise returned by test. Reason:
TypeError (XdrReaderError) {
message: 'XDR Read Error: saw 63 length String, max allowed is 60',
}
| let (base64, spec) = Spec::spec_to_base64(stellar_asset_spec::xdr())?; | ||
| (base64, spec, None) |


What
Update the xdr, sdk and env crates for v30 and teach
contract buildto 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.