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

Gas estimation: Overestimate before the nv16 upgrade #8617

Closed
wants to merge 2 commits into from

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented May 6, 2022

Related Issues

Resolves #8417

Proposed Changes

Opening this using Option 2 in the issue -- we haven't finalized a decision yet, but easy enough to open this PR.

I'm still not convinced we need to do anything here, and might prefer to go with Option 1 (do nothing). Important messages in Lotus have a retry mechanism that will re-estimate gas (I know PoSt does, would be worth examining other messages around sealing and dealmaking).

Uses a static blowup factor of 2 for now. Exact value is TBD, if we go with this approach.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@arajasek arajasek requested a review from a team as a code owner May 6, 2022 16:13
return res.MsgRct.GasUsed, nil
// Overestimate gas used around the
if ts.Height() <= build.UpgradeFVM1Height && (build.UpgradeFVM1Height-ts.Height() <= 5) {
ret *= 2
Copy link
Contributor

Choose a reason for hiding this comment

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

The best course of action will be to set the overestimation on a per (actor, method) basis for the top 5 or 7 tuples for 80th percentile and the rest of 80th percentile of all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Kubuxu I'm happy to go with that. Feel free to take over this PR / close and open a new one, thanks for volunteering to do it :)

@jennijuju jennijuju changed the title Gas estimation: Overestimate before the M1 upgrade Gas estimation: Overestimate before the nv16 upgrade May 6, 2022
@Kubuxu
Copy link
Contributor

Kubuxu commented May 9, 2022

Superseded by #8620

@Kubuxu Kubuxu closed this May 9, 2022
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