Add Soroban build artifact size budget and optimized release profile check for accountability_vault
Description
The workspace contracts/Cargo.toml defines an optimized release profile (opt-level = "z", lto, strip), but there is no check that the built .wasm stays within a size budget. Add a script/CI check that builds accountability_vault with stellar contract build and fails if the artifact exceeds a documented threshold. This guards against accidental bloat as the contract grows.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Add a wasm size-budget check building
contracts/accountability_vault
- Use the optimized profile already in
contracts/Cargo.toml
- Document the budget and how to update it in
contracts/README.md
- Wire into the contracts CI job under
.github/
Suggested execution
- Fork the repo and create a branch
git checkout -b chore/wasm-size-budget
- Implement changes
- Add a build/size-check script and CI step
- Update
contracts/README.md
- Verify against a current build
- Add threshold configuration
- Test and commit
- Run tests, cover edge cases
- Include test output and notes
Example commit message
chore: enforce wasm size budget for accountability_vault
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Add Soroban build artifact size budget and optimized release profile check for accountability_vault
Description
The workspace
contracts/Cargo.tomldefines an optimizedreleaseprofile (opt-level = "z",lto,strip), but there is no check that the built.wasmstays within a size budget. Add a script/CI check that buildsaccountability_vaultwithstellar contract buildand fails if the artifact exceeds a documented threshold. This guards against accidental bloat as the contract grows.Requirements and context
contracts/accountability_vaultcontracts/Cargo.tomlcontracts/README.md.github/Suggested execution
git checkout -b chore/wasm-size-budgetcontracts/README.mdExample commit message
chore: enforce wasm size budget for accountability_vaultGuidelines