feat: support to disable txindexer;#3141
Merged
zzzckck merged 2 commits intobnb-chain:developfrom Jun 3, 2025
Merged
Conversation
zzzckck
previously approved these changes
Jun 3, 2025
buddh0
previously approved these changes
Jun 3, 2025
The base branch was changed.
zzzckck
approved these changes
Jun 3, 2025
buddh0
approved these changes
Jun 3, 2025
sysvm
pushed a commit
to sysvm/bsc
that referenced
this pull request
Jun 16, 2025
This was referenced Jun 16, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In BSC, txindexer consumes considerable CPU and io resources in the background, and txindex data is mainly used for API to query transactions or receipt services based on txhash. Currently, it is of little use to roles such as validators, and an optional configuration can be provided to disable it.
After disabling txindexer, performance has improved to a certain extent.
Note that it is currently only recommended for validators to use this function. When txindexer is disabled and then re-enabled, a large number of missing txindexes will be built in the background, which will have a very large impact on performance.
Example
In a 5-day observation of mainnet traffic, when txindexer is disabled, the insert time is reduced by ~7%.
Node1, 10.213.32.90:
--cache 18000
Use disable txindexer version
Node1, 10.213.32.78:
--cache18000
v1.5.12
Changes
Notable changes: