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

Trying to start a pruned archive node #72

Open
calebcall opened this issue Aug 17, 2024 · 4 comments
Open

Trying to start a pruned archive node #72

calebcall opened this issue Aug 17, 2024 · 4 comments

Comments

@calebcall
Copy link

Per the conversation in #69 I'm trying to start an archive node with pruning enabled. I started my node in archive mode, with the following parameters: --state.live-pruning --state.live-pruning-retention 1209600 looking to keep about two weeks worth of blocks. It starts great, but starts at block 0. Not wanting to sync the entire chain, I tried to add the parameter --start-block-num with a block that was two weeks ago, hiping it would start there. It didn't, it again started at 0. So I pulled down the chaindata from https://packages.klaytn.net/cypress/chaindata/ and loaded that (grabbed one from a couple weeks ago, figuring a couple weeks of sync'ing won't be bad and then I'd have the full two weeks worth of data when it was done in a couple days. However, doing that, I now get the following error:

Fatal: Error starting protocol stack: cannot enable live pruning after chain has advanced

So, how is the best way to start an archive node with live pruning enabled?

Thanks

@blukat29
Copy link
Contributor

Hi @calebcall. We do not support switching on/off the live pruning because our algorithm cannot guarantee safe operation under that situation. Therefore you need to (a) start from a live-pruning chaindata or (b) start from genesis with live pruning enabled.

In your case, you can go for (a) with the live-pruning chaindata snapshot available here: https://packages.klaytn.net/cypress/pruning-chaindata/ The links to various snapshots are listed here: https://docs.kaia.io/nodes/endpoint-node/docker-setup/#fast-sync-from-chaindata-snapshot-optional

Sorry for the hassle. We'll improve on the sync related documentation to help node operators like you. Try the pruning-chaindata and tell me if anything goes wrong.

@calebcall
Copy link
Author

This is perfect, thank you @blukat29!

@calebcall
Copy link
Author

I used the latest snapshot from the provided link. On startup, I get the following message:

WARN[08/19,23:50:22 Z] [5] Head state missing, repairing chain number=160701091 hash=0xd785f52af5da90cf698074c940ddece957f50c877a7f8925239718d8887037bc

It's been sitting with that same message not doing anything since. Is this expected when starting from a pruned snapshot, any eta on how long I should let it sit there?

@yoomee1313
Copy link
Contributor

Hi @calebcall, let us know if the above message keep showing or not.

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