Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Upgrade txpool module to increase tps #43

Merged
merged 1 commit into from
Mar 21, 2022
Merged

Upgrade txpool module to increase tps #43

merged 1 commit into from
Mar 21, 2022

Conversation

mask-pp
Copy link

@mask-pp mask-pp commented Mar 16, 2022

More detail please refer the doc.

@ChuhanJin
Copy link

Can one of the admins verify this patch?

@0xmountaintop
Copy link

0xmountaintop commented Mar 16, 2022

will also be great to record tps before vs after in the PR description

@mask-pp
Copy link
Author

mask-pp commented Mar 16, 2022

will also be great to record tps before vs after in the PR description

ALready added the description!

Copy link

@hsyodyssey hsyodyssey left a comment

Choose a reason for hiding this comment

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

Hi Huan, as I understand it, this PR is trying to reduce GC pressure by reducing the declaration of large data structures, such as spammers. Logically this is very reasonable.

I have a small concern because spammers seems like not a thread-safe priority queue. But it seems the txpool will be locked by https://github.com/mask-pp/go-ethereum/blob/up_tps/core/tx_pool.go#L1172?  If so, looks good to me.

@mask-pp
Copy link
Author

mask-pp commented Mar 18, 2022

The used place of pool.spammers is in truncatePending func, and truncatePending locked in the pool.mu.lock() pool.mu.Unlock() area. So it's safe.

@mask-pp mask-pp merged commit 09a31cc into scroll-tech:zkrollup Mar 21, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants