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(rpc): failed fee estimation due to absence of l1_data_gas #2584

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

weiihann
Copy link
Contributor

@weiihann weiihann commented Mar 1, 2025

Fixes #2577

  • In RPC v8, L1Gas, L2Gas and L1DataGas are part of the spec and required.
  • In RPC v6 and v7, only L1Gas and L2Gas are part of the spec and required.
  • Blockifier will throw an error if L1DataGas is absent and L2Gas is non-zero.
  • To avoid that, if L2Gas is non-zero, we set the L1DataGas resource to zero.

@weiihann
Copy link
Contributor Author

weiihann commented Mar 1, 2025

Will need to test this using an actual syncing node.

Also, this kind of error gets unnoticed simply because we mock the VM in all of the RPC unit tests. To avoid that, we need to actually test against an actual vm. That's a separate task.

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.70%. Comparing base (c905aaf) to head (1a60d54).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2584      +/-   ##
==========================================
+ Coverage   73.68%   73.70%   +0.02%     
==========================================
  Files         137      137              
  Lines       16711    16720       +9     
==========================================
+ Hits        12313    12323      +10     
+ Misses       3536     3533       -3     
- Partials      862      864       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weiihann weiihann force-pushed the weiihann/fix/estimate-fee branch from 94e56c3 to cf05857 Compare March 1, 2025 07:45
@rodrigo-pino rodrigo-pino added Bug Something isn't working or security issue High priority Needs to be solved this week or the next labels Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working or security issue High priority Needs to be solved this week or the next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

starknet_estimateFee is not working
2 participants