-
Notifications
You must be signed in to change notification settings - Fork 622
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
feature: Re-introduce Compute Costs #8915
Conversation
e24f7ab
to
8f9ab57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I'm still not quite sure how we can ensure profiles and gas match everywhere... But I gave it another round of questioning myself about cases we might have forgotten but couldn't find anything. And I would reason that we should have everything as follows:
- We use the gas profiles instead of the old counter only for function calls, which narrows down the potential problems.
- Inside function calls, we either pay for host function calls in VM logic or we account for the WASM op counter. The first case always goes through one of
pay_action_accumulated
,pay_per
orpay_base
, which we have now covered. The second case (WASM cost) is already computed through profiles, so there shouldn't be any changes. - There is (always) one exception:
contract_loading_fee
is not a host function but is still charged from the dynamic gas. Fortunately, we charge it usingpay_per
andpay_base
which covers this concern as well. - Other places have no business changing the function call gas cost.
All in all, I think we can merge this again and should be fine this time.
e9d3fd7
to
bc9cd57
Compare
feature: Limit compute usage of a chunk The commit addresses near#8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s. This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the `assert`, so any discrepancy should be caught on canary nodes. There are two follow-ups to this work: - near#8859 - near#8860
bc9cd57
to
11c9e27
Compare
This PR re-introduces changes from #8805 together with #8892 after fixing #8908: The PR addresses #8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s. This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the assert, so any discrepancy should be caught on canary nodes.
This PR re-introduces changes from #8805 together with #8892 after fixing #8908: The PR addresses #8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s. This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the assert, so any discrepancy should be caught on canary nodes.
This PR re-introduces changes from #8805 together with #8892 after fixing #8908: The PR addresses #8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s. This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the assert, so any discrepancy should be caught on canary nodes.
This PR re-introduces changes from #8805 together with #8892 after fixing #8908: The PR addresses #8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s. This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the assert, so any discrepancy should be caught on canary nodes.
This PR re-introduces changes from #8805 together with #8892 after fixing #8908: The PR addresses #8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s. This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the assert, so any discrepancy should be caught on canary nodes.
This PR re-introduces changes from #8805 together with #8892 after fixing #8908:
The PR addresses #8265 by introducing aggregation of compute usage across all operations performed during chunk application and limiting this compute usage to 1s.
This should not change the behavior of nodes in the short run because compute costs match gas costs which is validated by the assert, so any discrepancy should be caught on canary nodes.