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
[Merged by Bors] - support existing multiple bootstrap files #4875
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4875 +/- ##
=========================================
- Coverage 76.9% 76.8% -0.1%
=========================================
Files 261 261
Lines 30107 30119 +12
=========================================
- Hits 23163 23158 -5
- Misses 5459 5470 +11
- Partials 1485 1491 +6
|
} | ||
newPath := path[:idx+suffixLen+1] | ||
if exists, _ := afero.Exists(fs, newPath); exists { | ||
_ = fs.Remove(path) |
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.
Could this cause issues? Removing an existing file to make space for the old file to be renamed with new name?
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.
if you start a node repeatedly, you will see the following.
$ ls -l data/bootstrap/2
total 1404
-r-------- 1 k k 158713 Aug 15 22:12 epoch-2-update-bs-2023-08-15T20-12-53
-r-------- 1 k k 158713 Aug 15 22:53 epoch-2-update-bs-2023-08-15T20-53-20
-r-------- 1 k k 158713 Aug 15 23:23 epoch-2-update-bs-2023-08-15T21-23-44
-r-------- 1 k k 158713 Aug 16 02:39 epoch-2-update-bs-2023-08-16T00-39-21
-r-------- 1 k k 158713 Aug 16 02:47 epoch-2-update-bs-2023-08-16T00-47-43
-r-------- 1 k k 158713 Aug 16 03:01 epoch-2-update-bs-2023-08-16T01-01-58
-r-------- 1 k k 158713 Aug 16 19:26 epoch-2-update-bs-2023-08-16T17-26-07
-r-------- 1 k k 158713 Aug 16 20:15 epoch-2-update-bs-2023-08-16T18-15-46
-r-------- 1 k k 158713 Aug 16 20:16 epoch-2-update-bs-2023-08-16T18-16-00
those files are all identical. we just need one, and newPath
already exists (because it renamed the first one to newPath
on line 444. so it's safe to delete here.
bors merge |
## Motivation #4858 was not a backward compatible fix. explorer's node running with latest in develop crashed with ``` {"L":"INFO","T":"2023-08-18T16:28:53.473Z","N":"ff765.bootstrap","M":"loaded bootstrap file","node_id":"ff76543be7a1919e65ac9eac4739aa467b0e0baa202825a77b223fc9c791dc70","module":"bootstrap","persisted":"/root/data/node/bootstrap/2/epoch-2-update-bs-2023-08-10T06-00-08","epoch":"2","beacon":"0xe3e3389e","activeset_size":2367,"name":"bootstrap"} 1 {"L":"FATAL","T":"2023-08-18T16:28:53.473Z","N":"ff765.bootstrap","M":"unexpected suffix for fallback files","node_id":"ff76543be7a1919e65ac9eac4739aa467b0e0baa202825a77b223fc9c791dc70","module":"bootstrap","suffix":"08","name":"bootstrap"} ``` ## changes - rename legacy files with timestamp to the correct one ("epoch-2-update-bs-2023-08-10T06-00-08" -> "epoch-2-update-bs") - delete extra files ## testing - unit test - manually test with mainnet. sync a node with mainnet and restart multiple times so that there are multiple boostrap files for epoch 2. run new code and saw that only 1 file left "epoch-2-update-bs"
Pull request successfully merged into develop. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Motivation
#4858 was not a backward compatible fix.
explorer's node running with latest in develop crashed with
changes
testing