You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document soroban-sdk 26.1.0 user-facing changes: spec shaking v2 export deprecation, cfg on contracttrait, and Hash<N> guarantees #2480
soroban-sdk 26.1.0 was released on 2026-06-08. The following user-facing changes in this release (and the preceding 26.0.x patch series) are not yet covered in the Stellar docs.
Missing / incomplete documentation
1. export = ... deprecation under experimental_spec_shaking_v2
When experimental_spec_shaking_v2 is enabled, using export = true or export = false on #[contracttype], #[contracterror], and #[contractevent] macros now emits a compiler deprecation warning. Under v2, spec entries are determined by reachability (dead-code elimination), not by the export hint.
Docs needed:
A note in any existing guide that mentions export = ... (if one exists), or a new guide on experimental_spec_shaking_v2 behaviour.
Upgrade guidance: contracts using export = false to exclude internal types should migrate to letting the linker shake them out naturally.
2. #[cfg] attribute support on #[contracttrait] and #[contractimpl]
A bug fix that now correctly handles #[cfg(...)] attributes on:
#[contracttrait] default function methods (cfg/cfg_attr on default functions is explicitly rejected with a clear error)
#[contractimpl(contracttrait)] override methods (direct #[cfg] is now supported; the generated default-function wrapper is emitted under the inverse cfg)
Generated args helpers and test registration code now follow the same cfg as the method
Docs needed: A guide or section explaining how to use conditional compilation (#[cfg]) with contract traits and implementations — a common pattern for platform-specific logic or feature flags.
The SDK docs for Hash<N> were updated to clarify that while values returned by SDK crypto functions are hash outputs, Hash<N> is represented at contract boundaries as BytesN<N>, so accepting it as a contract argument does not prove the bytes came from a hash function.
Docs needed: Any documentation on the Hash<N> type or on writing custom account contracts (__check_auth) should note this provenance limitation — callers can pass arbitrary bytes in the Hash<N> position.
Activity