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

core: ensure txindex will be triggered at least once (#27847) #660

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

Conversation

chiphamskymavis
Copy link
Contributor

@chiphamskymavis chiphamskymavis commented Jan 16, 2025

Currently, we trigger the logic to (un)index transactions when the node receives a new block. However, in some cases the node may not receive new blocks (eg, when the Geth node is configured without peer discovery, or when it acts as an RPC node for historical-only data).

In these situations, the Geth node user may not have previously configured txlookuplimit (i.e. the default of around one year), but later realizes they need to index all historical blocks. However, adding txlookuplimit=0 and restarting geth has no effect. This change makes it check for required indexing work once, on startup, to fix the issue.

Cherry-pick: ethereum/go-ethereum#27847

Currently, we trigger the logic to (un)index transactions when the node receives a new
block. However, in some cases the node may not receive new blocks (eg, when the Geth node
is configured without peer discovery, or when it acts as an RPC node for historical-only
data).

In these situations, the Geth node user may not have previously configured txlookuplimit
(i.e. the default of around one year), but later realizes they need to index all
historical blocks. However, adding txlookuplimit=0 and restarting geth has no effect. This
change makes it check for required indexing work once, on startup, to fix the issue.

Co-authored-by: Martin Holst Swende <martin@swende.se>
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