feat: Add gradient-based gas optimization profiling to Soroban contract CI pipeline#696
Open
rindicomfort wants to merge 3 commits into
Open
feat: Add gradient-based gas optimization profiling to Soroban contract CI pipeline#696rindicomfort wants to merge 3 commits into
rindicomfort wants to merge 3 commits into
Conversation
|
@rindicomfort 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! 🚀 |
Smartdevs17
approved these changes
Jun 28, 2026
Owner
|
Possible reasons:
🤖 Drips Wave Merge Agent |
Smartdevs17
approved these changes
Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #667
Summary of Changes
This Pull Request implements an automated, gradient-based gas optimization profiling and regression check pipeline for the Soroban smart contracts.
1. Contract Profiling Test Suite
test_gas_benchmarkstocontracts/tests/integration_soroban.rs.e.cost_estimate().resources()to programmatically log resource footprints (CPU instructions, memory bytes, storage read/write counts, and write bytes) for all 20 contract functions.2. Profiling & Regression Checking Script
scripts/gas-benchmark.shandscripts/analyze-gas.pyto:cargo test.gas-benchmarks/baseline.json).10%). Fails execution (exit code1) if any function exceeds the threshold.gas-benchmarks/trends.json.gas-benchmarks/gas_trend.svg) graphing CPU instruction history for top functions.3. CI/CD Integration
rust-gas-benchmarkin.github/workflows/ci.yml.main, automatically regenerates the baseline snapshot and commits it back to the repository ([skip ci]).$GITHUB_STEP_SUMMARY) to display formatting, status badges, the trend graph, and stratified call trees.merge-protectionandci-successquality gates.4. Developer Documentation
gas-benchmarks/README.mdexplaining how to execute tests locally, change regression thresholds, add new function benchmarks, and interpret the resource allocation metrics.