Commit Graph

230 Commits

Author SHA1 Message Date
Alex Sharov
77d32ccdc6
"downloader manifest": cmd to produce manifest.txt (#9067)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-24 07:32:21 +00:00
Alex Sharov
657aafd5b7
allow erigon download .torrent from webseed by default (#9052) 2023-12-22 11:42:35 +07:00
Alex Sharov
9eb9151be4
atomic CRUD for .torrent files (#9043) 2023-12-21 05:15:32 +00:00
Alex Sharov
d41d523050
Downloader: add ProhibitNewDownloads() (#8939)
"whitelisting" mechanism (list of files - stored in DB) - which
protecting us from downloading new files after upgrade/downgrade was
broken. And seems it became over-complicated with time.
I replacing it by 1 persistent flag inside downloader:
"prohibit_new_downloads.lock"
Erigon will turn downloader into this mode after
downloading/verification of first snapshots.


```
//Corner cases:
	// - Erigon generated file X with hash H1. User upgraded Erigon. New version has preverified file X with hash H2. Must ignore H2 (don't send to Downloader)
	// - Erigon "download once": means restart/upgrade/downgrade must not download files (and will be fast)
	// - After "download once" - Erigon will produce and seed new files
```

------
`downloader --seedbox` is never "prohibit new downloads"
2023-12-12 16:05:56 +07:00
Alex Sharov
8cfafa446a
add command "downloader torrent_cat" (#8824) 2023-11-27 08:49:19 +07:00
Giulio rebuffo
8d8368091c
Add full support to beacon snapshots (#8665)
This PR adds beacon blocks snapshots for the following chains:

* Mainnet snapshots
* Sepolia snapshots
2023-11-13 14:10:57 +01:00
Alex Sharov
35bfffd621
sys deps up (#8695) 2023-11-11 15:04:18 +03:00
Alex Sharov
329d18ef6f
snapshots: reduce merge limit of blocks to 100K (#8614)
Reason: 
- produce and seed snapshots earlier on chain tip. reduce depnedency on
"good peers with history" at p2p-network.
Some networks have no much archive peers, also ConsensusLayer clients
are not-good(not-incentivised) at serving history.
- avoiding having too much files:
more files(shards) - means "more metadata", "more lookups for
non-indexed queries", "more dictionaries", "more bittorrent
connections", ...
less files - means small files will be removed after merge (no peers for
this files).


ToDo:
[x] Recent 500K - merge up to 100K 
[x] Older than 500K - merge up to 500K 
[x] Start seeding 100k files
[x] Stop seeding 100k files after merge (right before delete)

In next PR: 
[] Old version of Erigon must be able download recent hashes. To achieve
it - at first start erigon will download preverified hashes .toml from
s3 - if it's newer that what we have (build-in) - use it.
2023-11-01 23:22:35 +07:00
Alex Sharov
b311da959f
downloader: webseed better error messages (#8611) 2023-10-30 12:13:45 +07:00
Alex Sharov
33d5399436
downloader: support token (#8507) 2023-10-18 14:24:09 +07:00
Alex Sharov
3ac9f493b6
move chainname and snapcfg packages to erigon-lib (#8508) 2023-10-18 13:37:39 +07:00
Alex Sharov
6d9a4f4d94
rpcdaemon: must not create db - because doesn't know right parameters (#8445) 2023-10-12 14:11:46 +07:00
Alex Sharov
7dd678896a
downloader: move from snapshots/db to snapshots/downloader (#8375) 2023-10-05 14:25:00 +07:00
Alex Sharov
0165d00ee6
downloader: don't drop torrents after download (performance problem there solved) (#8358) 2023-10-04 12:34:45 +07:00
Alex Sharov
fa3b8c23b2
Downloader: step towards more complex datadir (#8286)
migration included - no manual actions required
2023-10-04 11:01:02 +07:00
Alex Sharov
ce47ad30e2
downloader: progress print better (#8350) 2023-10-04 09:57:37 +07:00
Alex Sharov
8dda88d866
downloader: check too big and too small content (#8349) 2023-10-03 14:24:08 +07:00
Alex Sharov
dbdb486dd3
downloader: download .torrent files from webseeds provider (#8346) 2023-10-03 11:21:41 +07:00
Alex Sharov
d0366ae34e
snapshots: remove concept of separated hist .toml file (#8326) 2023-09-29 11:30:02 +07:00
Alex Sharov
6cc2bd5751
downloader: non-readonly open db (so it can auto-recover if need) (#8312) 2023-09-28 11:38:29 +07:00
Alex Sharov
eb747c042a
Downloader: add tests to protect from re-downloading (#8191) 2023-09-15 13:46:59 +07:00
Alex Sharov
93fbda14a5
downloader: support --chain parameter (#8184) 2023-09-13 15:21:43 +07:00
Alex Sharov
2158b4916d
Downloader: correct logging when create .torrent files (#8182) 2023-09-13 11:49:45 +07:00
Alex Sharov
3cea1b9b9e
torrent: add --webseeds cli arg (#8176) 2023-09-12 12:18:47 +07:00
Alex Sharov
bf8ac9a38f
mdbx_to_mdbx: to use logger (#7860) 2023-07-09 08:04:20 +01:00
omahs
c21d77aa20
Fix: typos (#7710)
Fix: typos
2023-06-12 14:39:52 +07:00
ledgerwatch
e75ea786c0
[devnet tool] separate logging (#7526)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-17 07:36:06 +01:00
Alex Sharov
a2ad68d634
downloader: speedup "--downloader.verify" mode (#7529)
deduplicate logic
create more producer goroutines (torrent lib does limiting internally
amount of consumers/disk-readers/hashers by 2, and it's enough because
we can verify multiple files in parallel)
move flag from "downloader torrent_hashes --verify" to "downloader
--verify"
2023-05-17 06:33:59 +01:00
Alex Sharov
f23612bdfe
Enode logging broke when NAT Parameter set in 2.43.0 (#7480)
for https://github.com/ledgerwatch/erigon/issues/7472
2023-05-10 10:25:53 +07:00
ledgerwatch
fdd385cef1
[Devnet tool] Side-quest to improve logging - part 1 (#7445)
This is the beginning of the series of changes to make it possible to
run multiple instances of erigon inside a single process (as devnet tool
does), with the logging from these processes going to respective log
files correctly.
This is the first part where the initial infrastructure is being
established

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-07 07:28:15 +01:00
Alex Sharov
e1f549ff01
cli: use SplitAndTrim instead of strgings.Split(",") (#7369) 2023-04-23 10:54:55 +07:00
ledgerwatch
9690228ede
[Diagnostics] Simplify logging settings, introduce correct log rotation with lumberjack (#7273)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-07 21:08:44 +00:00
Alex Sharov
a44e0afbd6
Downloader main loop wait on close (#7082) 2023-03-13 02:12:30 +00:00
Alex Sharov
92c444bc1a
--torrent.staticpeers (#7052) 2023-03-08 08:30:00 +00:00
Alex Sharov
999899d66d
e3: read files list from db (#6833) 2023-02-13 05:17:01 +00:00
Alex Sharov
983db55dc5
Downloader: "incomplete" markers are more important than "complete", so commit them with fsync (#6825) 2023-02-10 13:20:19 +07:00
Alex Sharov
94fd30c5eb
"erigon snapshots retire" to save progress (#6485) 2023-01-02 12:26:56 +07:00
Enrique Jose Avila Asapche
e5ddccf212
Disable ipv6 flag (#6295)
This was a great idea #6261 
Added two new flags to turn off downloader ipv6 and/or ipv4 usage
2022-12-15 16:40:59 +07:00
Alex Sharov
8afeee56c8
Downloader extract, step2 (#6076) 2022-11-20 10:41:30 +07:00
Alex Sharov
e7a3c0789a
Disable ci3 (#6063) 2022-11-16 15:53:46 +03:00
Alex Sharov
93926646f8
e3: prepare downloader for extraction (#6061) 2022-11-16 15:48:23 +03:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Alex Sharov
8641d81511
downloader: nil ptr verify (#5833) 2022-10-22 11:52:05 +07:00
Alex Sharov
b9f6b098c3
downloader: log files progress at debug level (#5818) 2022-10-21 15:08:16 +07:00
Alex Sharov
86551e82f4
e3: parallel build missed indices (#5817) 2022-10-21 13:45:20 +07:00
Alex Sharov
606ce5c99a
add logging cli flags to various cmd (#5816) 2022-10-21 12:36:17 +07:00
Max Revitt
07ffa36d44
File system logging (#5812)
- lives in internal/logging
- all log flags moved to internal/logging/flags
- allows continued use of root logger via log.Info etc.
- update logger to take change allowing string to lvl for 'trace'

Verbosity flag is overridden by log.console.verbosity. Logs will be
colocated if all run as one process, only split where progs are run as
separate processes, in a future update this will be addressed so for
example rpcdeamon will always log to it's own file
2022-10-20 19:25:06 +01:00
Alex Sharov
4795217e4e
e3: prevent files ranges overlap (#5684) 2022-10-12 10:18:55 +07:00
Alex Sharov
ca9aa4723c
Compress params change (#5631)
as of https://github.com/ledgerwatch/erigon-lib/pull/651
2022-10-05 17:54:54 +07:00
Alex Sharov
2276f438aa
downloader: fix log progress race #5535 2022-09-27 10:57:00 +07:00