Repository navigation
Forward-port #932 (genesis append, #931) and #930 (StartOS RUST_LOG) to master - #934
Merged
Merged
Conversation
…#932) A full -reindex empties the database, and ChainState::new then took the empty store for a new datadir: genesis was not in the block index, so it appended the genesis block to the last block file. Every reindex left a duplicate genesis record behind, and on a datadir switched from Bitcoin Core it wrote into one of Core's files. On an empty store, ChainState::new now reads the first record of blk00000.dat, through the xor.dat key, and when its payload is the genesis block byte for byte, indexes genesis there. satd and Core both write genesis first. A datadir whose files do not begin with it (a new one, a pruned one) gets it written as before. Core reaches the same result by finding genesis in the files during its reindex. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit e17fe07)
StartOS starts every daemon with RUST_LOG=warn,start_core=debug in its environment, and satd takes its log filter from RUST_LOG over its own default of info. Under the package, the service log carried warnings only: no sync progress, no reindex phases, no shutdown steps. Found while testing the 0.6.1 reindex and stop fixes in a StartOS VM, where the process environment showed the inherited value. The satd daemon now sets RUST_LOG=info. A test checks the satd daemon's exec carries it, and that satd still reads RUST_LOG. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 33902a4)
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.
Brings two
release/0.6fixes tomaster, cherry-picked with-x:e17fe07b, fixes A full -reindex appends a duplicate genesis block to the last block file #931): a full-reindexno longer appends a second copy of genesis to the lastblk*.datfile. On an empty store,ChainState::newindexes genesis where it already sits, as the first record ofblk00000.dat, and appends it only when the block files do not begin with it.33902a46): the in-tree StartOS package runs satd withRUST_LOG=info. StartOS setsRUST_LOG=warn,start_core=debugfor every daemon, and satd honors it, so the service log showed warnings only.Both commits applied cleanly except for the release-notes files. Each code patch is identical to the one on
release/0.6: thegit patch-idof each original (all paths exceptCHANGELOG.mdanddocs/release-notes/) equals that of its cherry-pick here.Fixes #931
Release notes
The
CHANGELOG.mdbullets and thedocs/release-notes/0.6.1-pre.mdsections stay onrelease/0.6, as in #921, #926 and #928. They will reachmasterwith the 0.6.1 cut.Verified
Ran locally on this branch:
cargo clippy --all-targets --all-features -- -D warningscargo build --tests --features e2enodelib suite: 2159 passed, including both new genesis testsnpm test): 19 passed, including the newRUST_LOGcheckOn
release/0.6, both patches passed CI and a Devin review before they merged.🤖 Generated with Claude Code