Skip to content

Conversation

@alexpitsikoulis
Copy link
Collaborator

@alexpitsikoulis alexpitsikoulis commented Oct 27, 2025

Motivation

Currently execution fees are estimated from an execution which is costly, the new execution_cost_for_authorization function in snarkVM allows estimation from the authorization which is less costly.

Changes

Change the existing estimateExecutionFee function to generate the authorization, including generated inputs, and estimate the fee using that authorization with the new snarkVM execution_cost_for_authorization function.
The function now takes fewer arguments as proving_key and verifying_key are no longer needed.

Test Plan

A unit test has been introduced comparing the output of the fee estimation of an authorization to the output of the fee estimation of the execution itself.

@christianwwwwwwww christianwwwwwwww self-requested a review October 28, 2025 00:46
@iamalwaysuncomfortable iamalwaysuncomfortable merged commit 7e4344e into mainnet Oct 30, 2025
12 of 13 checks passed
@iamalwaysuncomfortable iamalwaysuncomfortable deleted the feat/fee-estimation branch October 30, 2025 00:03
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.

[Feature] Expose and support execution_cost_for_authorization

3 participants