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

pack: improve balance between votes and non-votes #2404

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

ptaffet-jump
Copy link
Contributor

Even if all the most lucrative transactions are votes, we don't want to fill the priority queue with votes because we'll hit the vote cost per block limit and have nothing else to schedule.

   Case             New Vote                 New Non-vote
   Votes < 25%   Replace worst non-vote    If better, replace worst
                 with it                   non-vote with it
   Votes > 75%   If better, replace        Replace worst vote with
                 worst vote with it        it
   Else          If better, replace worse of worst non-vote and
                 worst vote                                      

For example, if we're receiving very few votes, we'll use the entire priority queue for non-votes, but when we get a vote, we'll automatically insert it, even if it's less lucrative than one of the non-votes.

@ptaffet-jump ptaffet-jump added this pull request to the merge queue Jul 16, 2024
Merged via the queue into main with commit e60d9a6 Jul 16, 2024
11 checks passed
@ptaffet-jump ptaffet-jump deleted the ptaffet/pack-qos branch July 16, 2024 18:32
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