-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Downloader: add ProhibitNewDownloads()
#8939
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but maybe we should actually look into whether the files with differing hash are even generated correctly. if that was done it is a pass for me
@Giulio2002 this ticket is not related to "differrent file hash" problem. it's about:
|
Actually there is invariant: "after first sync cycle - where it downloading all snapshots for first time - erigon must not see uncomplete / partially-downloaded files" - because we download and read them in same and erigon/rpcdaemon just assume - everything it see is valid/fully-downloaded. |
"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.
downloader --seedbox
is never "prohibit new downloads"