Skip to content

feat: add zkVMProver::execute_estimated_cost with impls for all 3 zkVMs - #416

Merged
han0110 merged 3 commits into
masterfrom
han/feature/cost-estimator
Aug 29, 2026
Merged

feat: add zkVMProver::execute_estimated_cost with impls for all 3 zkVMs#416
han0110 merged 3 commits into
masterfrom
han/feature/cost-estimator

Conversation

@han0110

@han0110 han0110 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator
  • Add zkVMProver::execute_estimated_cost(&self, input) that returns (PublicValues, CostEstimation), naming it with execute_ prefix explicitly so people could be aware it's estimated by full execution with additional cost metering.
  • Implement for OpenVM using RvrMeteredInstance, which counts trace height of each AIR, and the cost unit is purely cell count
  • Implement for SP1 using GasEstimatingVMEnum, which counts rows of each category, and the cost unit is weighted by cell and constraints complexity
  • Implement for ZisK using the same emulator, which counts the cells of all AIRs, and the cost unit the the cell count.

@han0110
han0110 force-pushed the han/feature/cost-estimator branch from 6cafc8a to 48088a9 Compare August 28, 2026 08:31
@han0110
han0110 marked this pull request as draft August 28, 2026 10:52
@han0110
han0110 force-pushed the han/feature/cost-estimator branch from 48088a9 to c0e2d44 Compare August 28, 2026 10:57
@han0110
han0110 marked this pull request as ready for review August 28, 2026 17:43
@han0110
han0110 merged commit 9eff5dd into master Aug 29, 2026
29 checks passed
@han0110
han0110 deleted the han/feature/cost-estimator branch August 29, 2026 05:00
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.

1 participant