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

allow exporting a number of recent chain state trees #3463

Merged
merged 4 commits into from
Sep 2, 2020

Conversation

whyrusleeping
Copy link
Member

Gets us closer to being able to 'sync' faster.

@whyrusleeping
Copy link
Member Author

lotus chain export --recent-stateroots=600 snapshot.car

wait like, 20 minutes, observe creation of 10gb file.

lotus daemon --snapshot=snapshot.car

Skip entire sync process!

snapshot := cctx.String("checkpoint")
if chainfile != "" || snapshot != "" {
if chainfile != "" && snapshot != "" {
return fmt.Errorf("cannot specify both 'snapshot' and 'import-chain'")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return fmt.Errorf("cannot specify both 'snapshot' and 'import-chain'")
return fmt.Errorf("cannot specify both 'checkpoint' and 'import-chain'")

Copy link
Member

Choose a reason for hiding this comment

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

  • checkpoint is a term that carries social consensus connotations.
  • i think snapshot is the right term for the exported state. (ie not all snapshots one may load should be thought of as checkpoints)
  • maybe the daemon load flag should be lotus daemon --load-state=snapshot.car or lotus daemon --load-snapshot=snapshot.car

@jbenet
Copy link
Member

jbenet commented Sep 2, 2020

Thanks so much -- this will help so many people trying to sync the chain, specially from scratch 🙏

@magik6k magik6k force-pushed the feat/chain-state-export branch from 0dd75a1 to 2c1a640 Compare September 2, 2020 12:58
cli/chain.go Outdated Show resolved Hide resolved
@magik6k magik6k force-pushed the feat/chain-state-export branch from 568bcb1 to 59f765f Compare September 2, 2020 15:15
@magik6k magik6k merged commit cfbbcd4 into master Sep 2, 2020
@magik6k magik6k deleted the feat/chain-state-export branch September 2, 2020 15:21
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