From d45325c324d9da5131f66e8a96a046638120fc73 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sat, 25 Dec 2021 15:32:51 +0700 Subject: [PATCH] downloader readme --- cmd/downloader/readme.md | 46 ++++++++++++++++++++++++++++++++++++++ cmd/erigoncustom/README.md | 1 + 2 files changed, 47 insertions(+) create mode 100644 cmd/downloader/readme.md diff --git a/cmd/downloader/readme.md b/cmd/downloader/readme.md new file mode 100644 index 00000000000..ff69b8437d1 --- /dev/null +++ b/cmd/downloader/readme.md @@ -0,0 +1,46 @@ +# Downloader + +Is a service which does download and seed historical data. + +Historical data - is immutable, files have .seg extension. + +## Architecture + +Erigon does: + +- connect to Downloader +- share list of hashes (see https://github.com/ledgerwatch/erigon-snapshot ) +- wait for download of all snapshots +- then switch to normal staged sync (which doesn't require connection to Downloader) + +Downloader does: + +- create .torrent files in /snapshot directory (can be used by any torrent client) +- download everything. Currently rely on https://github.com/ngosang/trackerslist + see [./trackers/embed.go](./trackers/embed.go) +- automatically seeding +- operator can manually copy .seg files to /snapshot directory, then Downloader will not download files ( + but will verify it's hash). + +## How to + +### Start + +``` +downloader --datadir= --downloader.api.addr=127.0.0.1:9093 +erigon --downloader.api.addr=127.0.0.1:9093 --experimental.snapshot +``` + +### Limit download/upload speed + +``` +downloader --download.limit=10mb --upload.limit=10mb +``` + +### Add hashes to https://github.com/ledgerwatch/erigon-snapshot + +``` +downloader print_torrent_files --datadir= +``` + + diff --git a/cmd/erigoncustom/README.md b/cmd/erigoncustom/README.md index 0d20e52e9b5..67c0e078d7b 100644 --- a/cmd/erigoncustom/README.md +++ b/cmd/erigoncustom/README.md @@ -1,3 +1,4 @@ + # Erigon Custom This is an example of an app based on Erigon library that adds a custom