Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

v1.16: cost model could double count builtin instruction cost (backport of #32422) #32516

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 17, 2023

This is an automatic backport of pull request #32422 done by Mergify.
Cherry-pick of c69bc00 has failed:

On branch mergify/bp/v1.16/pr-32422
Your branch is up to date with 'origin/v1.16'.

You are currently cherry-picking commit c69bc00f69.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   program-runtime/src/compute_budget.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   runtime/src/cost_model.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

1. add tests to demo builtin cost could be double counted;
2. quick fix for now

(cherry picked from commit c69bc00)

# Conflicts:
#	runtime/src/cost_model.rs
@willhickey willhickey force-pushed the mergify/bp/v1.16/pr-32422 branch from bbb0558 to 4cd194a Compare July 18, 2023 17:01
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #32516 (a02aa10) into v1.16 (29bcd55) will decrease coverage by 0.1%.
The diff coverage is 95.7%.

@@            Coverage Diff            @@
##            v1.16   #32516     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         762      762             
  Lines      207599   207644     +45     
=========================================
+ Hits       170110   170143     +33     
- Misses      37489    37501     +12     

@tao-stones tao-stones requested a review from apfitzge July 18, 2023 22:26
@tao-stones tao-stones force-pushed the mergify/bp/v1.16/pr-32422 branch from f01c67e to a02aa10 Compare July 18, 2023 22:56
@t-nelson
Copy link
Contributor

does this not need a feature gate?

@tao-stones
Copy link
Contributor

does this not need a feature gate?

it's only in leader code, doesn't impact consensus. Also the leader adjusts block CU with actually consumed CUs after executing transactions, so the impact of this bug is a very small chance transactions could be included in a block, but not.

@tao-stones tao-stones merged commit 8ed7ebe into v1.16 Jul 19, 2023
@tao-stones tao-stones deleted the mergify/bp/v1.16/pr-32422 branch July 19, 2023 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants