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

Solution for the busted snapshots #234

Closed
blxdyx opened this issue Oct 22, 2023 · 5 comments
Closed

Solution for the busted snapshots #234

blxdyx opened this issue Oct 22, 2023 · 5 comments

Comments

@blxdyx
Copy link
Collaborator

blxdyx commented Oct 22, 2023

Description

The history data in the ./data/snapshots meet some error.

How to fix

  1. Check the latest commit 24b2aaa.
  2. make erigon && make integration
  3. cd ./data/snapshots and remove all the snapshots after block 28,500,000, such as 'v1-0285000-029000*' and also remove the 'db' in this dir. (If dont work, may delete all the snapshots)
  4. integration stage_headers --reset
  5. run with --downloader.verify

Or just download the latest snapshot and use the latest commit resync(Spend more time).

Expected behaviour

After finish the steps, it will fix the busted snapshots.

@blxdyx blxdyx changed the title Fix for the Fix the busted snapshots Oct 22, 2023
@blxdyx blxdyx changed the title Fix the busted snapshots Solution for the busted snapshots Oct 22, 2023
@rayn316
Copy link

rayn316 commented Oct 23, 2023

An error occurred while executing this command.
cmd: ./bin/integration stage_headers --reset --datadir=/node/archive/bsc/erigon/ --chain=bsc

INFO[10-23|11:29:17.565] Clear                                    table=MaxTxNum
INFO[10-23|11:29:37.569] [fillind_db_from_snapshots] Total difficulty index: 2756k/27999k
INFO[10-23|11:29:57.569] [fillind_db_from_snapshots] Total difficulty index: 5013k/27999k
INFO[10-23|11:30:17.568] [fillind_db_from_snapshots] Total difficulty index: 8117k/27999k
INFO[10-23|11:30:37.569] [fillind_db_from_snapshots] Total difficulty index: 11197k/27999k
INFO[10-23|11:31:00.853] [fillind_db_from_snapshots] Total difficulty index: 14913k/27999k
INFO[10-23|11:31:17.568] [fillind_db_from_snapshots] Total difficulty index: 18250k/27999k
INFO[10-23|11:31:37.568] [fillind_db_from_snapshots] Total difficulty index: 21393k/27999k
INFO[10-23|11:31:57.568] [fillind_db_from_snapshots] Total difficulty index: 24417k/27999k
INFO[10-23|11:32:17.569] [fillind_db_from_snapshots] Total difficulty index: 27504k/27999k
EROR[10-23|11:32:21.004] unknown ancestor

@blxdyx
Copy link
Collaborator Author

blxdyx commented Oct 23, 2023

An error occurred while executing this command. cmd: ./bin/integration stage_headers --reset --datadir=/node/archive/bsc/erigon/ --chain=bsc

INFO[10-23|11:29:17.565] Clear                                    table=MaxTxNum
INFO[10-23|11:29:37.569] [fillind_db_from_snapshots] Total difficulty index: 2756k/27999k
INFO[10-23|11:29:57.569] [fillind_db_from_snapshots] Total difficulty index: 5013k/27999k
INFO[10-23|11:30:17.568] [fillind_db_from_snapshots] Total difficulty index: 8117k/27999k
INFO[10-23|11:30:37.569] [fillind_db_from_snapshots] Total difficulty index: 11197k/27999k
INFO[10-23|11:31:00.853] [fillind_db_from_snapshots] Total difficulty index: 14913k/27999k
INFO[10-23|11:31:17.568] [fillind_db_from_snapshots] Total difficulty index: 18250k/27999k
INFO[10-23|11:31:37.568] [fillind_db_from_snapshots] Total difficulty index: 21393k/27999k
INFO[10-23|11:31:57.568] [fillind_db_from_snapshots] Total difficulty index: 24417k/27999k
INFO[10-23|11:32:17.569] [fillind_db_from_snapshots] Total difficulty index: 27504k/27999k
EROR[10-23|11:32:21.004] unknown ancestor

Use the latest commit? Make integration use the latest commit.

@rayn316
Copy link

rayn316 commented Oct 23, 2023

@blxdyx yes, The tools are all the latest commit.
erigon version 1.1.9-dev-24b2aaa6

@blxdyx
Copy link
Collaborator Author

blxdyx commented Oct 23, 2023

Try use the latest snapshot to resync

@tpalaz
Copy link

tpalaz commented Oct 23, 2023

I can confirm this is working as expected. My node was stuck on block 29.9 million for quite some time from a scratch sync.

I went back to block ~29.5 and sync'd from there as I had messed around with resetting headers a few times and some other things.

Incase anyone needs this, here's a useful command to find the snapshot files above 29.5 million (can also pipe to exec rm {} \ to delete):

find . -type f -regextype posix-extended -regex ".*-0(29[5-9][0-9]{2}|[3-9][0-9]{4})-.*"

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

No branches or pull requests

3 participants