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!: adjust gas distribution formula for NEP264 #6536

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

austinabell
Copy link
Contributor

Adjusting formula based on @matklad suggestion. It more closely represents distributing gas based on weights if the sum of weights is greater than the amount of gas remaining at the cost of performing slightly more arithmetic.

I think this makes more sense, but hard to think about the exact implications without some benchmark of the two.

@austinabell austinabell requested a review from a team as a code owner April 6, 2022 16:30
@austinabell austinabell requested a review from matklad April 6, 2022 16:30
@matklad
Copy link
Contributor

matklad commented Apr 6, 2022

Let's merge this: I doubt an extra integral division would be visible among all the other stuff we do to create a promise.

But it's good to check our assumtion that we can actually re-use the same cost for this new host function, I filed #6537 for that!

@near-bulldozer near-bulldozer bot merged commit a7a1f2f into master Apr 6, 2022
@near-bulldozer near-bulldozer bot deleted the austin/nep264_adjustment branch April 6, 2022 18:52
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.

None yet

2 participants