-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d4f538
commit d45325c
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <your_datadir>/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 <your_datadir>/snapshot directory, then Downloader will not download files ( | ||
but will verify it's hash). | ||
|
||
## How to | ||
|
||
### Start | ||
|
||
``` | ||
downloader --datadir=<your_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=<your_datadir> | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
# Erigon Custom | ||
|
||
This is an example of an app based on Erigon library that adds a custom | ||
|