Continue candidate assembly after limit overflow - #2479
Open
a-shannon wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopens #2444 against
v6.0.7. GitHub closed the original PR automatically when itsv6.0.4base branch was deleted.Invariant
A valid transaction that cannot fit the current candidate must not prevent later independent transactions from being considered, or cause its later dependents to be eliminated from the mempool.
Root cause
CandidateGenerator.collectTxsreturned immediately when adding a valid transaction plus the updated fee transaction exceeded the candidate cost or size limit. Because the mempool sequence is priority-ordered rather than size-packed, one non-fitting transaction could starve every later transaction.Simply continuing is unsafe: a later transaction spending or reading the omitted transaction's output would appear to have a missing box and could be returned in
EliminateTransactions.Fix
Regression coverage
The properties cover size and cost head-of-line blocking, fee and no-fee overflow branches, regular and data-input dependency propagation, conflicts inside and outside deferred families, and exact equality at the existing strict limits.
Validation
CandidateGeneratorSpec: 19/19 passed.CandidateGeneratorPropSpec: 16/16 passed.git diff --checkpassed on721dbf783.v6.0.7replay found no blocker or duplicate implementation.Scope
This remains a focused candidate-selection fix. It does not introduce package scoring or change data-input CPFP policy. #2303 is complementary; #2462 changes fee collection and may require a later combined rebase if it lands first.