ci: enforce wasm size and resource-budget limits with Tollcraft tooling - #244
Conversation
Add a budget CI job that fails on WASM-size or budget regression: - WASM size ceiling per contract with committed baseline (.wasm-budget.json) and a stated 10% tolerance. - soroban-cost-linter (cargo cost-lint, pinned v0.1.1) runs over both contracts with findings surfaced in the job log. - soroban-budget-assert integration: Tier A #[budget_cpu_lt(N)] macro tests gate anchor_batch (count 1/500/1000), verify_receipt (proof depth 1/10), prune_batches (100 deletes), refund and deposit; Tier B cargo budget-report (--check) publishes network-simulated numbers when a funded testnet identity is present. Baselines are committed (budget.toml, .wasm-budget.json, budget_test.rs thresholds) and updated only by an explicit change. docs/BENCHMARKS.md now publishes per-function CPU/memory/read/write costs with headroom against the network limits, and justifies MAX_BATCH_SIZE = 1000 by the measured O(1) on-chain cost (99%+ CPU headroom) rather than by assertion.
|
@lawalajose Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
MergeKeeper review unavailable AI provider review response did not contain valid JSON No approval or merge action was taken. |
|
MergeKeeper review Scope: in scope for linked issue The PR successfully implements the budget CI job, Tollcraft tooling integration, committed baselines, documentation, and the measured justification for MAX_BATCH_SIZE as requested in the issue. Reviewed commit: |
|
MergeKeeper merge status Status: blocked Reason: One or more required CI checks failed. Failing checks:
Next steps:
|
Add a budget CI job that fails on WASM-size or budget regression:
Baselines are committed (budget.toml, .wasm-budget.json, budget_test.rs thresholds) and updated only by an explicit change. docs/BENCHMARKS.md now publishes per-function CPU/memory/read/write costs with headroom against the network limits, and justifies MAX_BATCH_SIZE = 1000 by the measured O(1) on-chain cost (99%+ CPU headroom) rather than by assertion.
Summary
Provide a brief summary of the changes in this pull request and the problem being solved.
Contract Change Safety Checklist
Please verify that your changes adhere to contract stability requirements:
docs/EVENTS.md)CHANGELOG.md?DEPLOYMENTS.mdbeen documented?cargo test) and/or exercised on Soroban testnet?Related Issues
Closes #52