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

Update storage gas cost #3746

Merged
merged 7 commits into from
Sep 8, 2024
Merged

Update storage gas cost #3746

merged 7 commits into from
Sep 8, 2024

Conversation

grarco
Copy link
Contributor

@grarco grarco commented Sep 3, 2024

Describe your changes

Recovers the fix to the storage gas cost that was done in #3510 and went lost in #3554. Adjusts the DEFAULT_GAS_LIMIT and the gas limits in the genesis files.

Also improves gas tracking for masp fee payment: the gas meter now does not account for the gas used up to that point (wrapper gas) which could prevent some txs that consume a lot of gas in that phase (e.g. batches) from successfully pay fees via the MASP.

Checklist before merging

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes

@grarco grarco changed the title Fix storage gas cost Update storage gas cost Sep 3, 2024
grarco added a commit that referenced this pull request Sep 3, 2024
@grarco grarco marked this pull request as ready for review September 3, 2024 18:04
@grarco
Copy link
Contributor Author

grarco commented Sep 4, 2024

@yito88 The ibc e2e tests are failing because of gas, the costs are now slightly higher than before so we might need to update Hermes

grarco added a commit that referenced this pull request Sep 4, 2024
@grarco
Copy link
Contributor Author

grarco commented Sep 5, 2024

@yito88 The ibc e2e tests are failing because of gas, the costs are now slightly higher than before so we might need to update Hermes

Actually, it seems like the only issue was a bug in the dry_run function, we don't need to update Hermes

@@ -37,7 +37,7 @@ where
let gas_scale = parameters::get_gas_scale(&state)?;

// Wrapper dry run to allow estimating the gas cost of a transaction
let (wrapper_hash, extended_tx_result, tx_gas_meter) =
let (wrapper_hash, extended_tx_result, tx_gas_meter, gas_used) =
Copy link
Contributor Author

@grarco grarco Sep 5, 2024

Choose a reason for hiding this comment

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

The modifications to this file are just temporary to fix a bug for which we were not tracking gas correctly. A better rework is provided in PR #3758 which is based on this one.

grarco added a commit that referenced this pull request Sep 6, 2024
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.42%. Comparing base (ef00f27) to head (d311278).
Report is 82 commits behind head on main.

Files with missing lines Patch % Lines
crates/node/src/dry_run_tx.rs 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3746   +/-   ##
=======================================
  Coverage   72.41%   72.42%           
=======================================
  Files         335      335           
  Lines      104005   103993   -12     
=======================================
- Hits        75320    75315    -5     
+ Misses      28685    28678    -7     

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

@grarco grarco added the gas label Sep 6, 2024
@Fraccaman Fraccaman added the merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass label Sep 8, 2024
mergify bot added a commit that referenced this pull request Sep 8, 2024
mergify bot added a commit that referenced this pull request Sep 8, 2024
@mergify mergify bot merged commit 790bd16 into main Sep 8, 2024
23 checks passed
@mergify mergify bot deleted the grarco/fix-storage-gas-cost branch September 8, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking: protocol gas merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants