Support starting lbcd with snapshot #66

Open
opened 2022-06-18 05:05:27 +02:00 by roylee17 · 0 comments
roylee17 commented 2022-06-18 05:05:27 +02:00 (Migrated from github.com)

To help new nodes catch up faster without syncing blocks from scratch, we publish snapshots compressed in zstd format.

Some users requested a convenient way to start lbcd with the snapshot without manually downloading and uncompress the snapshot. This is handy for automated / integrated setup environment.

This can be done with:

  1. a wrapper script which downloads and uncompresses the snapshot before starting lbcd.
  2. --snapshot cli flag, which takes a file or url.
    Go has zstd package to do this.

Either implementation should support:

  1. Download a snapshot from a URL
    Uncompress from a downloaded snapshot

  2. Download and uncompress on the fly, for example:

curl https://snapshots.lbry.com/blockchain/lbcd_snapshot_1178238_v0.22.100_2022-06-17.tar.zst | zstd -d | tar xf - -C ${LBCD_DIR}

Note: 2) support of --snapshot is preferred so we don't require installing zstd packages

To help new nodes catch up faster without syncing blocks from scratch, we publish [snapshots](https://snapshots.lbry.com/blockchain/) compressed in [zstd](https://facebook.github.io/zstd/) format. Some users requested a convenient way to start **lbcd** with the snapshot without manually downloading and uncompress the snapshot. This is handy for automated / integrated setup environment. This can be done with: 1) a wrapper script which downloads and uncompresses the snapshot before starting **lbcd**. 2) `--snapshot` cli flag, which takes a file or url. Go has [zstd package](https://pkg.go.dev/github.com/klauspost/compress/zstd) to do this. Either implementation should support: 1. Download a snapshot from a URL Uncompress from a downloaded snapshot 2. Download and uncompress on the fly, for example: ``` curl https://snapshots.lbry.com/blockchain/lbcd_snapshot_1178238_v0.22.100_2022-06-17.tar.zst | zstd -d | tar xf - -C ${LBCD_DIR} ``` Note: 2) support of `--snapshot` is preferred so we don't require installing `zstd` packages
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbcd#66
No description provided.