Skip to content

fix: align WASM size budget with Callora contract limit - #1369

Closed
rikkhope-cyber wants to merge 8 commits into
CalloraOrg:mainfrom
rikkhope-cyber:1234-wasm-budget-fix
Closed

rikkhope-cyber wants to merge 8 commits into
CalloraOrg:mainfrom
rikkhope-cyber:1234-wasm-budget-fix

Conversation

@rikkhope-cyber

Copy link
Copy Markdown

Summary

Fixes #1234.

This PR aligns the Callora contract WASM size checks and documentation around the project's 100 KiB (102400-byte) budget.

Changes

  • Correct the outdated 64 KB Soroban claim in Cargo.toml.
  • Document the 100 KiB Callora WASM budget.
  • Keep the WASM size-check script at 102400 bytes.
  • Keep CI aligned with the same budget.
  • Report per-contract WASM size and remaining headroom.
  • Remove continue-on-error from the WASM size workflow so size failures can fail CI.
  • Update the README to refer to the Callora contract WASM budget.

No contract logic or dependency changes are included.

Clarified the Callora contract WASM size budget and corrected the previous claim of 64 KB. Removed outdated configuration details and emphasized the importance of the 100 KiB limit.
Removed 'continue-on-error' from several steps to ensure failures are reported.
Removed unnecessary header and outdated sections from README.
Align the Callora contract WASM size documentation and checks around a single 100 KiB (102400-byte) project budget.

This change:
- Corrects the outdated Soroban 64 KB claim in Cargo.toml.
- Documents the 100 KiB Callora contract WASM budget.
- Keeps the size-check script and CI aligned at 102400 bytes.
- Ensures the WASM size check reports per-contract headroom.
- Updates the README to refer to the Callora contract WASM budget instead of calling it Soroban's network-wide limit.
- Removes continue-on-error from the WASM size CI workflow so size-check failures can properly fail the job.

No contract logic or dependency changes are included.
Removed the SettlementError enum definition from batch.rs.
Refactor batch settlement error handling to use the shared SettlementError type and improve batch validation.

This change removes the duplicate SettlementError definition from batch.rs and reuses the contract-wide error type from errors.rs. It also adds clear handling for empty batches, oversized batches, and cross-tenant batches while preserving per-item settlement outcomes.

Individual settlement errors are converted into SettleOutcome values so each input receives a corresponding result, while batch-level validation errors are returned before processing begins.

No changes are made to the settlement error codes or contract business logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Match WASM size budget with Soroban 64KB claim

2 participants