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
I have completed the Stellar contract Wasm size optimization.
Key results:
Major Size Reductions: Wasm binaries were reduced by 55% to 68% across all contracts through build profile optimizations.
Monitoring Established: contracts/stellar/SIZE.md now tracks sizes and defines a 110 KB budget per contract.
CI Gate Integrated: A new CI job ensures that future changes staying within the budget.
The release profile changes (opt-level=z, lto=fat, codegen-units=1, panic=abort, strip=symbols) are exactly right, and the SIZE.md baseline table with the "what to do if you exceed budget" runbook is the right shape for the issue.
Two things to fix before merge:
Rebase against develop. This PR was opened against an older main and the CI diff currently replaces the stellar-nightly job that landed in Add Stellar Soroban property tests #13. We need both jobs to coexist: keep stellar-nightly (the 16,384-case proptest schedule) AND add stellar-size-check. After git rebase origin/develop, the CI file should have both jobs side by side.
Run a full optimization pass. SIZE.md notes that stellar contract optimize was unavailable due to missing wasm-opt, so the "optimized" column is just the release profile, not actually post-wasm-opt. Install binaryen (brew install binaryen or apt install binaryen), rerun stellar contract optimize on each crate, and update the table. Realistic optimized sizes for these contracts should be smaller than what's currently shown.
Once the rebase is clean and the optimize step has actually run, this is ready. Thanks @Lynndabel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have completed the Stellar contract Wasm size optimization.
Key results:
Major Size Reductions: Wasm binaries were reduced by 55% to 68% across all contracts through build profile optimizations.
Monitoring Established: contracts/stellar/SIZE.md now tracks sizes and defines a 110 KB budget per contract.
CI Gate Integrated: A new CI job ensures that future changes staying within the budget.
Closes #18