github stellar/rs-soroban-sdk v30.0.0-rc.1
30.0.0-rc.1

pre-release3 hours ago

This is the first release candidate of soroban-sdk v30, supporting Protocol 30.

Important

Contracts using soroban-sdk v30 must be built with stellar contract build from stellar-cli v30.0.0 or newer.

See the migration guide for everything that needs to change when upgrading.

Highlights

Protocol 30

  • CAP-0084 • Muxed Contracts: a MuxedAddress with an id may now be a muxed contract address (W...), not only a muxed account address (M...). MuxedAddress::address() returns the contract address (C...) and MuxedAddress::id() returns the id. (#2130)
  • CAP-0087 • ML-DSA signature verification: new Crypto::ml_dsa_44_verify, ml_dsa_65_verify, and ml_dsa_87_verify for post-quantum (FIPS 204) signature verification. They work like ed25519_verify and panic on an invalid signature. (#2138)

Contract specs

  • Types, events, and errors are named in the spec by their full Rust path, which stellar contract build reduces to short names. Duplicate names, such as two State types in different modules or crates, are now given unique names (State, State2) and every reference in the spec points at the right entry. (#1970)
  • Specs are shaken by following references from the contract's functions, so spec markers in the Wasm are only needed for events and for errors raised by panics. Contracts carry fewer markers. (#2043, #2114)
  • Contract spec XDR is encoded at compile time. (#1965, #2080)

Breaking Changes

  • stellar-cli v30+ required to build contracts, as above. (#2082)
  • Contract specs of contracts with duplicate type, event, or error names will change when upgrading, as all but one of the entries sharing a name are renamed. Clients generated from those specs will see the new names. Give each type a unique name to keep names unchanged. (#1970)
  • Integer enums defined with #[contracttype] can no longer be passed to panic_with_error! or Env::panic_with_error. That support was accidental. Use #[contracterror] types. (#2043)
  • Contracts that read MuxedAddress::id() must not assume an address with an id is an account, as it may now be a muxed contract. Use MuxedAddress::address() for the address that holds a balance or authorizes. (#2130)
  • #[contract] now rejects contract types with fields, tuple structs, and generics. Only struct Contract; and struct Contract {} are accepted. Fields were previously silently ignored. (#2120)

For tool builders

  • The rssdk_spec_shaking contract meta entry is no longer written. Tools should pick how to shake a spec from the rssdkver meta entry, and for contracts built with v30+ follow references between spec entries instead of expecting a marker for every entry kept. (#2043)
  • The generated spec_xdr fns return entries as the SDK emits them, with full-path names and unshaken. Tools assembling specs from them need to reduce names with soroban_spec::reduce::reduce. (#1970, #2139)
  • soroban-token-spec and stellar-asset-spec: xdr() now returns the spec with names reduced and is no longer const. The unprocessed spec is available from the const fn xdr_unprocessed(). Both crates are now std. (#2139)
  • soroban_spec::shaking::generate_marker_for_xdr is now const and usable in no_std crates. (#2080)

Fixes

  • Fix contractimport! dropping an event's data_format, which made imported single-value and vec events encode as map. (#2074)
  • Fix a duplicate ctor compile error (E0428) for an empty #[contractimpl(contracttrait)] impl. (#2098)
  • Fix #[contracttrait] default fns ignoring the crate_path of the #[contractimpl], which broke renamed SDK dependencies. (#2089)
  • Fix MuxedAddress::try_from_val panicking on a non-address ScVal instead of returning ConversionError. (#2099)
  • Fix test clients not restoring set_auths, mock_auths, and mock_all_auths state when a call panics. (#2094)

Docs

  • Generated contract client fns now document when they panic and when their try_ variants return errors. (#2134)
  • TokenInterface docs link each function's events to the matching soroban-token-sdk event types. (#2132)

Dependencies

  • Update soroban-env and stellar-xdr to the Protocol 30 versions. (#2061, #2130, #2138)
  • Update stellar-strkey to 1.0.0. (#1913)
  • Remove unused dependencies, including curve25519-dalek. (#2092, #2093)

Known Issues

  • Spec entries for some #[contracttype] types (int enums, union enums, tuple structs) defined in a dependency crate can be missing from the contract spec when building without LTO. A fix was attempted in #2126 and reverted in #2137. Tracked in #2125.

What's Changed

Full Changelog: v29.0.1...v30.0.0-rc.1

Don't miss a new rs-soroban-sdk release

NewReleases is sending notifications on new releases.