Skip to content

Add Soroban build artifact size budget and optimized release profile check for accountability_vault #371

@1nonlypiece

Description

@1nonlypiece

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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions