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

fix: delete retry requests if confirmed or sent #4

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jhkimqd
Copy link

@jhkimqd jhkimqd commented Oct 2, 2024

This PR addresses a rare condition where some transactions' status changes (possibly due to network issues) and causes a memory leak in the pool-manager which was causing the system to crash. Although a restart of the pool-manager fixed the issue, after applying the changes in this PR, the same issue could no longer be reproduced.

Testing

The entire test had been conducted using Kurtosis CDK and loads were sent using polycli loadtest, using hermeznetwork/zkevm-pool-manager:v0.1.0

When sending moderate load (10,000 EOA transfers) to the CDK Erigon RPC node, it directs the transactions to the pool manager. The loadtest also involved 429 codes returned by the Erigon RPC, and had some transactions which had unexpected status values in the pool_manager_db

image

These were not mined - until a replacement transaction has been sent with higher gas prices.

image

This seemed to cause the pool-manager to detect these transactions and attempt to delete and enqueue them again - which seemed to be the source of the leak.

mem-leak

With this PR, the issue could no longer be reproduced under identical conditions.

image

Copy link

sonarcloud bot commented Oct 2, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM

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