Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(executor/estimate): fee estimation should fail for reverts #2597

Merged
merged 4 commits into from
Feb 18, 2025

Conversation

kkovaacs
Copy link
Contributor

This change aligns the behavior of starknet_estimateFee with starknet_simulateTransactions, ensuring that fee estimation fails for reverted transactions, while simulation continues to provide estimates and traces with revert reasons.

In the expected output for the test we can also see that our handling of Cairo1RevertSummary within an error stack is suboptimal: instead of having the string representation in there we should properly convert the summary into multiple frames. I've created #2596 for that problem.

This change aligns the behavior of starknet_estimateFee with
starknet_simulateTransactions, ensuring that fee estimation fails for
reverted transactions, while simulation continues to provide estimates
and traces with revert reasons.
@kkovaacs kkovaacs requested a review from a team as a code owner February 17, 2025 07:27
And use `Transaction::tx_hash()` instead.
Fee estimation and transaction simulation now uses a shared code path
for execution -- but the expected behavior for a reverted transaction
is different between the two.

This commit makes the expected revert behavior explicit in the shared
code path.
Base automatically changed from krisztian/fix-rpc-call-failure-error-stack to main February 18, 2025 08:09
@kkovaacs kkovaacs requested a review from sistemd February 18, 2025 08:10
@kkovaacs kkovaacs merged commit bb114a7 into main Feb 18, 2025
7 of 8 checks passed
@kkovaacs kkovaacs deleted the krisztian/rpc-fix-fee-estimation-for-reverted-txs branch February 18, 2025 11:02
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.

2 participants