Harden explicit mempool dependency tracking - #2480
Draft
a-shannon wants to merge 1 commit into
Draft
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 #2446 against
v6.0.7. GitHub closed the original PR automatically when itsv6.0.4base branch was deleted.Invariant
Every live mempool transaction ID must have exactly one ordered entry, with consistent registry, box-index, and dependency-graph state across insertion, replacement, removal, invalidation, eviction, late producer arrival, and reinsertion.
Why
#2439 fixed the deterministic duplicate-ID producer in
updateFamilyand added targeted cleanup for the corrupt states observed in the wild. The remaining dual use of mutable weighted keys in ordering, lookup, and dependency discovery still makes lifecycle correctness difficult to maintain.#2341 by @jozanek introduced the right architectural direction: keep transaction IDs stable in box indexes and model family relationships explicitly. This draft is the hardened
v6.0.7successor/integration of that work, reopened at Kushti's request for maintainer review rather than as an unrelated competing implementation.Changes
TxFamilyGraphwith separate spend and data-input/read edges.WeightedTxIdkeys, in input and output indexes.Preserved semantics
Validation
TxFamilyGraphSpec,ErgoMemPoolIndexSpec,OrderedTxPoolSpec,ErgoMemPoolSpec,CandidateGeneratorSpec,CandidateGeneratorPropSpec, andMempoolAuditorSpec.git diff --checkpassed onac0eff36c.v6.0.7; full upstream CI is still required.Related work and scope
Published as a draft for maintainer review and CI.