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

feat: prevent processing same transaction twice #282

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

Sekhmet
Copy link
Contributor

@Sekhmet Sekhmet commented Mar 15, 2024

We've seen cases of pool transactions being processed multiple times. It's possible to happen if RPC node returns outdated transactions from pool. We only cache seen pool transactions for single block, so if new block is minted but RPC returns pool before that block it could trigger twice.

Now we cache all processed transactions - this should be managable memory wise and prevent it from ever happening.

We've seen cases of pool transactions being processed multiple times.
It's possible to happen if RPC node returns outdated transactions from pool.
We only cache seen pool transactions for single block, so if new block is minted
but RPC returns pool before that block it could trigger twice.

Now we cache all processed transactions - this should be managable memory wise
and prevent it from ever happening.
@Sekhmet Sekhmet requested a review from bonustrack March 15, 2024 12:07
Copy link
Contributor

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

utACK

@Sekhmet Sekhmet merged commit d7ff07b into master Mar 15, 2024
1 check passed
@Sekhmet Sekhmet deleted the sekhmet/cache-processed-transactions branch March 15, 2024 12:22
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