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

Tx indexing fix #1131

Merged
merged 17 commits into from
Apr 17, 2024
Merged

Tx indexing fix #1131

merged 17 commits into from
Apr 17, 2024

Conversation

ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented Mar 25, 2024

Why this should be merged

Currently uindexor stucks at first block if state sync is enabled. This fixes the problem by skipping the last indexed tail to last state synced block.

Closes: ava-labs/coreth#405

How this works

It jumps to the latest state synced block if lookup limit is non-zero, in cases:
1- At startup to repair with latest state synced block, in case the VM already started normal operations after a successful state sync.
2- When a state sync is completed

It also enables unindexor to perform a startup cleanup with respect to the latest accepted block.

How this was tested

Added UT, will deploy to a bugged node.

How is this documented

No need

@ceyonur ceyonur changed the base branch from master to geth-v.13.2-x March 25, 2024 15:41
@ceyonur ceyonur changed the base branch from geth-v.13.2-x to master April 15, 2024 12:17
@ceyonur ceyonur changed the base branch from master to geth-v.13.2-x April 15, 2024 12:17
@ceyonur ceyonur changed the base branch from geth-v.13.2-x to master April 15, 2024 12:24
@ceyonur ceyonur self-assigned this Apr 15, 2024
@ceyonur ceyonur added the bug Something isn't working label Apr 15, 2024
@ceyonur ceyonur marked this pull request as ready for review April 15, 2024 17:44
@ceyonur ceyonur requested a review from darioush as a code owner April 15, 2024 17:44
core/blockchain_test.go Outdated Show resolved Hide resolved
core/rawdb/accessors_state_sync.go Outdated Show resolved Hide resolved
core/test_blockchain.go Show resolved Hide resolved
core/test_blockchain.go Outdated Show resolved Hide resolved
core/test_blockchain.go Outdated Show resolved Hide resolved
core/test_blockchain.go Outdated Show resolved Hide resolved
plugin/evm/syncervm_test.go Outdated Show resolved Hide resolved
plugin/evm/syncervm_test.go Outdated Show resolved Hide resolved
ceyonur and others added 9 commits April 15, 2024 21:11
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
@ceyonur ceyonur enabled auto-merge (squash) April 16, 2024 18:58
ceyonur and others added 2 commits April 16, 2024 21:58
* avoids using sleep in test

* track all goroutines

* trying harder

* add some debug information in case of fail

* Update core/blockchain.go

Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>

* Update core/blockchain.go

Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>

---------

Signed-off-by: Darioush Jalali <darioush.jalali@avalabs.org>
darioush
darioush previously approved these changes Apr 17, 2024
@ceyonur ceyonur disabled auto-merge April 17, 2024 14:36
@ceyonur ceyonur merged commit 7893288 into master Apr 17, 2024
9 checks passed
@ceyonur ceyonur deleted the tx-indexing-fix branch April 17, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Tx Unindexer cannot proceed if block does not exist in DB
2 participants