Skip to content

Conversation

@jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Aug 3, 2023

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 with --nodiscovery, 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 he realizes they need to index all historical blocks. However, adding txlookuplimit=0 and restarting geth has no effect.

So in this case, I think if we start a timer, there would at least be one opportunity to run the indexing process.

@jsvisa jsvisa requested a review from rjl493456442 August 4, 2023 12:29
@jsvisa
Copy link
Contributor Author

jsvisa commented Aug 10, 2023

@rjl493456442 please take another look, thanks

@fjl fjl removed the status:triage label Aug 15, 2023
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@holiman holiman added this to the 1.13.0 milestone Aug 21, 2023
@fjl fjl merged commit 7c0d90c into ethereum:master Aug 22, 2023
@jsvisa jsvisa deleted the core-timer-txindex branch August 22, 2023 02:18
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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 <[email protected]>
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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.

4 participants