Repository navigation
Conversation
`charon create cluster --zipped` and `charon dkg --zipped` created the archive with os.Create (usually world-readable 0644), although it holds validator key shares and the ENR private key. It is now 0600, including an archive left from an earlier run. BundleOutput also closed the tar and gzip writers only in defers, after deleting the originals and ignoring their errors, so a failed flush (e.g. a full disk) could lose key shares. The archive is now flushed, synced and closed before anything is deleted. category: bug ticket: none
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4833 +/- ##
==========================================
+ Coverage 67.73% 67.75% +0.01%
==========================================
Files 255 255
Lines 33749 33689 -60
==========================================
- Hits 22860 22825 -35
+ Misses 10888 10863 -25
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BundleOutput now writes to a 0600 temporary file in the target directory and renames it into place once it is flushed, synced and closed, so the archive name never holds a partial archive. A failed run removes the temporary file and leaves the originals. An archive left by an earlier run is replaced rather than archived into the new one.
|
KaloyanTanev
approved these changes
Nov 10, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



charon create cluster --zippedandcharon dkg --zippedcreated the archive with os.Create (usually world-readable 0644), although it holds validator key shares and the ENR private key. It is now 0600, including an archive left from an earlier run. BundleOutput also closed the tar and gzip writers only in defers, after deleting the originals and ignoring their errors, so a failed flush (e.g. a full disk) could lose key shares. The archive is now flushed, synced and closed before anything is deleted.Worth testing with the dappnode package import to ensure there are no issues uncovered by this change (the main place --zipped is used)
category: bug
ticket: none