v23 to v25
Resource Limits Enforced by Default
Impact: High - Tests may failEnv::default() now enforces Mainnet resource limits for contract invocations. Tests will panic if any resource limit is exceeded.
What changed:
- Previously: Tests ran without resource enforcement
- Now: Mainnet resource limits enforced by default
- Instructions: 600,000,000
- Memory: 41,943,040 bytes
- Disk read entries: 100
- Write entries: 50
- Ledger entries: 100
- Disk read bytes: 200,000
- Write bytes: 132,096
- Contract events size: 16,384 bytes
- Max contract data key size: 250 bytes
- Max contract data entry size: 65,536 bytes
- Max contract code entry size: 131,072 bytes
Events API Return Type Changed
Impact: Low - Backward compatibleEvents::all() return type changed from Vec<(Address, Vec<Val>, Val)> to ContractEvents.
What changed:
- Old return type:
Vec<(Address, Vec<Val>, Val)> - New return type:
ContractEvents
filter_by_contract(&Address)- Filter events by contractto_xdr()- Convert events to XDR format
New Cryptographic Features (Non-Breaking)
Impact: None - Additive only New features added in v25:- BN254 elliptic curve support via
env.crypto().bn254() - Poseidon/Poseidon2 permutations via
hazmat-cryptofeature contracttraitmacro for reusable interfaces
v22 to v23
contractevent Replaces Events::publish
Impact: Medium - Recommended migration
The Events::publish method is replaced by the type-safe contractevent macro.
What changed:
- Old: Manual event publishing with
env.events().publish() - New: Type-safe events with
#[contractevent]
- Type safety for events
- Automatic specification generation
- Better tooling support
- Multiple data formats: map (default), vec, single-value
Token Transfer Uses MuxedAddress
Impact: Medium - Token implementations only
The TokenInterface::transfer function’s to parameter changed from Address to MuxedAddress.
What changed:
- Old signature:
transfer(env: Env, from: Address, to: Address, amount: i128) - New signature:
transfer(env: Env, from: Address, to: MuxedAddress, amount: i128)
MuxedAddress accepts Address arguments seamlessly. Contracts calling transfer don’t need changes.
Archived Entry Testing Behavior Changed
Impact: Low - Test behavior change Accessing archived persistent entries in tests no longer panics. Automatic restoration is emulated instead. What changed:- Old behavior: Panic when accessing archived entries
- New behavior: Automatic restoration emulated
v21 to v22
Contract Registration API Changed
Impact: High - All tests affectedEnv::register_contract and Env::register_contract_wasm replaced by unified Env::register and Env::register_at.
What changed:
- Removed:
register_contract,register_contract_wasm - Added:
register,register_at
- Single API for native and Wasm contracts
- Constructor arguments required (use
()if none) - More consistent with deployment API
Contract Deployment API Changed
Impact: High - Contract deployments affectedDeployerWithAddress::deploy replaced by DeployerWithAddress::deploy_v2.
What changed:
- Old:
deploy(wasm_hash) - New:
deploy_v2(wasm_hash, constructor_args)
fuzz_catch_panic Deprecated
Impact: Low - Fuzz tests only
fuzz_catch_panic function deprecated in favor of try_ client functions.
What changed:
- Deprecated:
fuzz_catch_panic - Recommended:
try_prefixed client methods
Test Snapshot Events Changed
Impact: Medium - Test snapshots affected Diagnostic events no longer included in test snapshots. What changed:- Old: Contract events + system events + diagnostic events
- New: Contract events + system events only
v20 to v21
CustomAccountInterface Signature Type Changed
Impact: Medium - Custom account contracts only The__check_auth function’s signature_payload parameter changed from BytesN<32> to Hash<32>.
What changed:
- Old type:
BytesN<32> - New type:
Hash<32>
Hash<32> provides type safety by ensuring values come from secure cryptographic functions.
Version Summary
| Version | Major Changes | Impact Level |
|---|---|---|
| v25 | Resource limits enforced, Events API, BN254, Poseidon | High (tests may fail) |
| v23 | contractevent macro, MuxedAddress, archived entries | Medium |
| v22 | Registration API, deployment API, test snapshots | High |
| v21 | CustomAccountInterface signature type | Medium |
Migration Tips
Incremental Migration
Migrate one major version at a time:- Update dependencies
- Fix compilation errors
- Run tests and fix failures
- Update test snapshots if needed
- Review behavior changes
Testing Strategy
- Compilation: Ensure code compiles with new SDK
- Unit tests: Run existing tests to catch behavior changes
- Resource limits: Test with and without limits to identify optimization needs
- Integration tests: Verify contracts work correctly with updated dependencies
Common Issues
Resource limit failures:Getting Help
- Documentation: docs.rs/soroban-sdk
- Discord: Stellar Discord
- GitHub: rs-soroban-sdk
- Migration guide: Migration Overview