stellar-deprecated / horizon

This repository has moved to the go monorepo: https://github.com/stellar/go/tree/master/services/horizon
Apache License 2.0
218 stars 106 forks source link

"reingest" does not import accounts, assets and effects data #420

Open nengine opened 6 years ago

nengine commented 6 years ago

I didn't set INGEST=true at the beginning and now I wanted to import all historical data from stellar-core. I did "horizon db reingest", but accounts, assets and effects data was not imported. I do however see lots of data in ledger table.

Is reingest is a correct way to reimport the data from stellar-core?

Thanks.

06chaynes commented 6 years ago

In your stellar-core.cfg, did you set CATCHUP_COMPLETE to true OR set a value for CATCHUP_RECENT?

nengine commented 6 years ago

Hello, I have default settings as CATCHUP_COMPLETE=false. It seems like then stellar-core database is only keeping most recent ledgers? Thanks.

06chaynes commented 6 years ago

Yeah I ran into that as well, you need to set that to true. Doing so will sync from the beginning. Then you should be able to ingest the data with horizon. I am somewhat new to this as well but this solution has worked for me.

06chaynes commented 6 years ago

Note that you will need to wait for the core to sync before horizon can start ingesting

nengine commented 6 years ago

I have four stellar-core nodes and setting CATCHUP_COMPLETE=true to only one of them where horizon is configured to connect. Would it automatically load all entire history after this? Thanks a lot.

06chaynes commented 6 years ago

Yeah, though it will take a while for the core to sync. You can watch the output of horizon during that time and you'll see a warning each time it attempts to start ingesting. After a certain point in the sync it will be able to start ingesting, this also will take some time.

Here's something that will give you an idea of the amount of data involved in this process: https://stellar.stackexchange.com/questions/81/how-big-is-the-ledger/153#153