{{ message }}
Repository navigation
cmd/utils: disabled transaction unindexing for archive node by default - #3624
Merged
allformless merged 3 commits intoApr 8, 2026
Merged
Conversation
Collaborator
Contributor
Author
|
@allformless I thought of that first, but since PR #32103 was closed upstream for doing something similar, I'm trying a different way. For PR #32103 -> remove this |
Collaborator
a little different with PR32103 |
Contributor
Author
|
@allformless Sure I will follow your guide. Thank you. Will complete this PR soon. |
Contributor
Author
allformless
previously approved these changes
Apr 8, 2026
zlacfzy
previously approved these changes
Apr 8, 2026
allformless
reviewed
Apr 8, 2026
allformless
approved these changes
Apr 8, 2026
zlacfzy
approved these changes
Apr 8, 2026
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
Exclude background transaction indexing from the
SyncProgress.Done()check so thateth.syncingreturnsfalseonce block sync and state indexing are complete, without waiting for the full transaction index to be built.Rationale
When running a node with
--gcmode=archive, the flag handler forcesTransactionHistory=0(index entire chain). For a node bootstrapped from a snapshot (e.g. at block ~88M on BSC), the tx indexer must index ~86 million historical blocks — a process that can take days or weeks.During this time,
SyncProgress.Done()returnsfalsebecause it requiresTxIndexRemainingBlocks == 0, soeth.syncingnever returnsfalseeven though block sync completed long ago and the node can fully serve current data.Transaction indexing is a background maintenance task, not part of the initial chain sync. State indexing (
StateIndexRemaining) is kept in the check because it is bounded by--history.stateand finishes in reasonable time.Note: upstream
go-ethereumPR #32103 attempted to fix this by removing the archive modeTransactionHistoryoverride inflags.go, but was rejected because transaction unindexing is very slow and causes significant I/O load. This fix takes a different approach by only changing the sync completion criteria.Example
Before (archive node started from snapshot, block sync done):
After:
Changes
Notable changes:
TxIndexRemainingBlocks == 0fromSyncProgress.Done()ininterfaces.goStateIndexRemaining == 0check is preserved — state indexing is bounded and completes in reasonable timetxIndexFinishedBlocksandtxIndexRemainingBlocksfields are still included in theeth_syncingresponse for monitoringBlockChain.TxIndexDone()) uses a separateTxIndexProgress.Done()method and is unaffectedFlow
Flow with step
api.b.SyncProgress(ctx)fetches the progress (which merges block sync + tx index + state index data)progress.Done()-- this calls our changed method in interfaces.goDone()returns true --> returns false (meaning "not syncing")Done()returns false --> returns the full progress map (the object the issue reporter sees with all those fields liketxIndexRemainingBlocks: 86132452)-> this is use config in #3621
Fixes #3621