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(katana): block env wrongly updated with cli value #1744

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Conversation

kariy
Copy link
Member

@kariy kariy commented Apr 1, 2024

fix #1724

updated the test to make sure the gas prices doesn't get modified with the cli value in the update_block_env method.

now actual tx execution would result in a similar fee value that you get when doing fee estimation

@kariy
Copy link
Member Author

kariy commented Apr 1, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kariy and the rest of your teammates on Graphite Graphite

@kariy kariy changed the title fix genesis gas price not being used Pull Request Summary Apr 1, 2024
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.06%. Comparing base (ad58e43) to head (6c56131).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1744      +/-   ##
==========================================
+ Coverage   68.01%   68.06%   +0.04%     
==========================================
  Files         304      304              
  Lines       32912    32950      +38     
==========================================
+ Hits        22385    22426      +41     
+ Misses      10527    10524       -3     

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

@kariy kariy changed the title Pull Request Summary fix(katana): Apr 1, 2024
@kariy kariy changed the title fix(katana): fix(katana): block env wrongly updated with cli value Apr 1, 2024
@kariy kariy marked this pull request as ready for review April 1, 2024 12:01
@@ -179,7 +179,6 @@ impl<EF: ExecutorFactory> Backend<EF> {

block_env.number += 1;
block_env.timestamp = timestamp;
block_env.l1_gas_prices = self.config.env.gas_price.clone();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this line is not removed, the updated tests would fail

@kariy
Copy link
Member Author

kariy commented Apr 1, 2024

cc @broody can you test on this pr

@broody
Copy link
Collaborator

broody commented Apr 1, 2024

@kariy confirmed issue fixed, thx! Appreciate another alpha release with this

@kariy kariy merged commit a23a0c6 into main Apr 1, 2024
12 checks passed
@kariy kariy deleted the fix-gas-price branch April 1, 2024 16:49
kariy added a commit that referenced this pull request Apr 1, 2024
)

ref #1744 

to limit and simplify how gas prices can be set in katana.

currently there are two ways to do this:
1. using the `--*-gas-price` cli arg
2. set in the genesis config

this change only allow the gas price to be set using one way or the other and not through a combination of both (eg pass a genesis config but set gas prices in cli) which makes it counterintuitive imo
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.

[BUG] Katana setting gas price in genesis issues
2 participants