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

Charge gas correctly in prove_commit2 #1400

Closed

Conversation

ZenGround0
Copy link
Contributor

When moving batch verify seals over from cron earlier we neglected to properly charge for gas and apply a check on proving batch size.

Since these constants are now shared between miner and power I moved them to the runtime policy.

@ZenGround0 ZenGround0 requested a review from anorth September 2, 2023 04:05
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (integration/direct-onboarding@18940d8). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                        @@
##             integration/direct-onboarding    #1400   +/-   ##
================================================================
  Coverage                                 ?   89.39%           
================================================================
  Files                                    ?      146           
  Lines                                    ?    28300           
  Branches                                 ?        0           
================================================================
  Hits                                     ?    25298           
  Misses                                   ?     3002           
  Partials                                 ?        0           

Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

I don't think this is the right thing to do, though could be necessary as a patch if the FVM doesn't come through.

See filecoin-project/ref-fvm#1852. I'm expecting the FVM to do the right thing. Using the constant from the async flow probably isn't the right number anyway (could be too high because old, or too low because discounted assuming parallelism).

Also I don't think we should impose any limit on proofs per epoch in a synchronous flow. We can't actually count "per epoch" without more state anyway.

I'm glad we both caught this, though.

@anorth
Copy link
Member

anorth commented Sep 2, 2023

cc @Stebalien @Kubuxu I'm currently assuming FVM will resolve this.

@ZenGround0
Copy link
Contributor Author

Got it, I'll close this down and we can reopen and modify if ref-fvm doesn't end up handling it

@ZenGround0 ZenGround0 closed this Sep 2, 2023
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.

3 participants