Skip to content

Deduplicate tx in default mempool insert#3

Merged
iboss-ptk merged 1 commit intorelease/v2.x.xfrom
fix/default-mempool-dedup
Aug 19, 2025
Merged

Deduplicate tx in default mempool insert#3
iboss-ptk merged 1 commit intorelease/v2.x.xfrom
fix/default-mempool-dedup

Conversation

@iboss-ptk
Copy link
Copy Markdown

Problem

The current DefaultMempool lacks duplicate detection, causing transactions with the same transaction to accumulate and hit capacity limits. This led to "failed to insert tx into mempool: pool reached max tx capacity" errors after upgrading to v2.1.7-mempool.

Solution

Replaced simple array-based implementation with linked list + hash map implementation such that it detects duplicated tx on insert while maintaining O(1) time complexity and improves time complexity for other operations (Remove -> O(1), Contains -> O(1))

Copy link
Copy Markdown

@PaddyMc PaddyMc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gg 🧙

@iboss-ptk iboss-ptk merged commit 4200fca into release/v2.x.x Aug 19, 2025
4 of 7 checks passed
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