Skip to content

[FEAT] Build Automated Gas Comparison Benchmark Framework #600

Description

@mijinummi

Labels: medium-difficulty, testing, benchmarks
Difficulty: Medium
Module: tests/benchmarks/


🧠 Concept

Create a test runner that executes contracts before and after applying GasGuard refactors, measuring actual gas spent using Anvil / Soroban RPC local testnets.

⚠️ Problem

Estimates are helpful, but developers want empirical proof showing the exact gas difference before merging refactored code.

📁 Implementation Scope

  • tests/benchmarks/gas-comparator.ts
  • tests/benchmarks/fixtures/

🛠️ Requirements

  1. Deploy original fixture contract and refactored contract to local dev node.
  2. Execute target transaction and capture gasUsed / resource units.
  3. Export a benchmark report comparing actual gas delta versus rule estimates.

🎯 Acceptance Criteria

  • Automatically generates empirical gas usage comparisons for test fixtures.
  • Validates accuracy of static analysis estimates against live execution traces.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions