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

improve Pending() of txpool to reduce the latency when miner worker committing transactions #85

Merged

Conversation

andyzhang2023
Copy link
Contributor

Description

improve Pending() of txpool to reduce the latency when the miner worker commits transactions, by maintaining a copy of pending transactions for the worker, to avoid lock race condition.

Rationale

The miner worker has limited time to commit transactions, and it wastes too much to call Pending() to fetch transactions from the mem pool, which sometimes costs hundreds of milliseconds.

Changes

Notable changes:

  • Pending() method of txpool returns a copy of pending transactions instead of the original pending list.

owen-reorg pushed a commit to owen-reorg/op-geth that referenced this pull request Apr 25, 2024
…head

miner: Account for L1 Info Deposit gas usage in the pending pool
redhdx
redhdx previously approved these changes May 16, 2024
Copy link
Contributor

@redhdx redhdx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@redhdx redhdx left a comment

Choose a reason for hiding this comment

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

LGTM

@owen-reorg owen-reorg merged commit bc67f16 into bnb-chain:develop Jun 7, 2024
1 check 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.

3 participants