Skip to content

Harden mempool fee weight arithmetic - #2378

Open
a-shannon wants to merge 8 commits into
ergoplatform:masterfrom
a-shannon:fix/mempool-fee-weight-overflow
Open

a-shannon wants to merge 8 commits into
ergoplatform:masterfrom
a-shannon:fix/mempool-fee-weight-overflow

Conversation

@a-shannon

@a-shannon a-shannon commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Mempool fee weights now scale high fees without overflow. Parent-family weight updates, replacement averages and fee statistics use bounded arithmetic, with direct regressions for high-fee scaling and saturation.

Review

Head 52837caf3465be3f0b61769ae9ca775a54661be6 preserves all five owning files from c221e07aafb60e8b56f3d391c1f16017cb09a420 unchanged.

The earlier head c221e07a merged master 5528ef569a41ebccbc8658212e6ee3c97d990b96. Its five-file review increment retains the original arithmetic changes and regression file. The OrderedTxPool conflict resolution preserves master's current-transaction lookup, index cleanup, invalidation set, missing-parent handling and recursion limits; only the weight addition changes at that join.

Review the added shared prerequisites separately.

Shared prerequisites and integration order

The branch reuses convergence helper H 0f9f75c1, settled-seed/isolation fixture D 71f33c6e, and synchronizer reader fixture R 76e5ec4b, owned by #2535. Continuation/download correction G d62c945a is owned by #2511; header/body cache wake-up X a772a5cb is owned by #2549.

Integrate R before G and the required shared/production increments before this arithmetic correction. The whole #2535 branch is not a prerequisite of #2511. GitHub's upstream-master diff includes the cumulative prerequisites until they merge. Mining targets, convergence assertions and existing deadlines are preserved.

Validation

Normal Test and IntegrationTest compilation passed on the final tree, with 82/82 focused cases: 49 synchronization/history/cache cases and 33 convergence/isolation cases. Historical validation on c221e07a passed MempoolWeightSpec (3), OrderedTxPoolSpec (6) and ErgoMemPoolSpec (29), totaling 38/38; those unchanged owner inputs were not rerun as part of the new 82-case gate. Independent composition review of that master refresh found no blockers.

The earlier native integration result passed 12/13 and timed out during final DeepRollBack convergence. That result describes the preceding head. The shared liveness composition passed native CI at pinned #2535 head efbd1e917fe74f0f680a2e3c9e4d93595a59b06a (run 34734047921); this supports the explicit prerequisites without proving an exclusive cause for the earlier timeout.

The local gate did not run Docker. Exact-head native CI for this updated PR is pending; follow the integration tracker.

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