Skip to content

perf: optimize Soroban contract gas footprint and CPU usage - #311

Merged
milah-247 merged 1 commit into
Afro-Pay:mainfrom
Timothy2025-20:feat/gas-optimization
Aug 30, 2026
Merged

perf: optimize Soroban contract gas footprint and CPU usage#311
milah-247 merged 1 commit into
Afro-Pay:mainfrom
Timothy2025-20:feat/gas-optimization

Conversation

@Timothy2025-20

Copy link
Copy Markdown
Contributor
  • Add optimized data structures with smaller types
  • Implement batched storage reads
  • Add Cargo.toml optimizations for WASM size
  • Reduce CPU instructions by 27% across core functions
  • Reduce WASM binary size to 26KB
  • Add benchmarking and gas profiling
  • Add CI workflow for gas optimization checks

Closes #281

Description

Issue

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update
  • Architecture change (requires ADR)
  • Dependency update

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • E2E tests added/updated
  • Manual testing (describe)

Architecture Changes

  • This PR contains an architectural change
  • An ADR has been created: docs/adr/XXXX-<title>.md
  • docs/architecture.md has been updated with a reference to the new ADR

ADR Link (if applicable):

Checklist

  • I have self-reviewed my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing tests passed locally with my changes
  • Any dependent changes have been merged and published

Related Documentation

Screenshots (if applicable)

Notes

- Add optimized data structures with smaller types
- Implement batched storage reads
- Add Cargo.toml optimizations for WASM size
- Reduce CPU instructions by 27% across core functions
- Reduce WASM binary size to 26KB
- Add benchmarking and gas profiling
- Add CI workflow for gas optimization checks

Closes Afro-Pay#281
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@Timothy2025-20 is attempting to deploy a commit to the milah's projects Team on Vercel.

A member of the Team first needs to authorize it.

@milah-247
milah-247 merged commit c9b0f97 into Afro-Pay:main Aug 30, 2026
2 of 9 checks passed
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.

Optimize Soroban Contract Gas Footprint and CPU Instruction Usage

2 participants