Skip to content

[contract][gas] Add gas-regression gates to CI #517

Description

@Xhristin3

Severity

Medium

Files

contract/test/src/{gas_benchmarks.rs,gas_limits.rs,gas_regression.rs}, .github/workflows/ci.yml

Description

contracts/test/* scaffolds appear to support gas regression assertions, but the CI workflow's gas-profiling job uses continue-on-error and doesn't gate. Without a regression gate, refactors can silently double gas usage and nobody notices.

Acceptance Criteria

  • Add a baseline gas file per operation under contract/gas_baselines/
  • Assert within +/-10% in CI; failing regress to fail the build
  • Run gas benchmarks once per merged PR and store trending artifacts

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions