Merged
Conversation
4d76f34 to
01c108d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the automatic/manual maintenance subsystem and the ledgerheaders table by migrating the last-closed-ledger tracking from a hash (lastclosedledger) to an encoded LedgerHeader stored directly in storestate (lastclosedledgerheader).
Changes:
- Remove
Maintainerand themaintenancecommand/config knobs/docs. - Replace
ledgerheaderspersistence with base64-encodedLedgerHeaderdata stored instorestate. - Add schema v27 migration to move
lastclosedledger+ledgerheaders→lastclosedledgerheaderand dropledgerheaders.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/transactions/TransactionFrame.cpp | Drops now-unused LedgerHeaderUtils include. |
| src/test/test.cpp | Removes test-only disabling of automatic maintenance. |
| src/main/PersistentState.h | Renames LCL persistent key enum to kLastClosedLedgerHeader. |
| src/main/PersistentState.cpp | Updates storestate mapping key to lastclosedledgerheader. |
| src/main/Maintainer.h | Removes automatic maintenance component. |
| src/main/Maintainer.cpp | Removes automatic maintenance implementation. |
| src/main/Config.h | Removes automatic maintenance config fields. |
| src/main/Config.cpp | Deprecates maintenance config keys (warn + ignore). |
| src/main/CommandLine.cpp | Removes catchup/standalone maintenance overrides. |
| src/main/CommandHandler.h | Removes maintenance route handler declaration. |
| src/main/CommandHandler.cpp | Removes maintenance route and handler implementation. |
| src/main/ApplicationUtils.cpp | Loads LCL protocol version from storestate-encoded header. |
| src/main/ApplicationImpl.h | Removes Maintainer member and accessor. |
| src/main/ApplicationImpl.cpp | Stops constructing/starting Maintainer. |
| src/main/Application.h | Removes getMaintainer() from Application API. |
| src/ledger/LedgerManagerImpl.cpp | Loads/stores LCL header from storestate instead of ledgerheaders. |
| src/ledger/LedgerHeaderUtils.h | Adds encode/decode helpers and hash→data lookup API. |
| src/ledger/LedgerHeaderUtils.cpp | Implements header encode/decode and hash→data lookup; removes old APIs. |
| src/history/test/HistoryTests.cpp | Removes test-time manual maintenance calls. |
| src/history/HistoryManagerImpl.cpp | Drops unused LedgerHeaderUtils include. |
| src/herder/test/HerderTests.cpp | Drops unused LedgerHeaderUtils include. |
| src/herder/HerderImpl.cpp | Adds SCP history trimming during slot erasure. |
| src/database/test/DatabaseTests.cpp | Adds/updates tests for storestate and ledgerheaders migration behavior. |
| src/database/Database.h | Bumps schema version to 27. |
| src/database/Database.cpp | Adds v27 migration to move LCL header into storestate and drop ledgerheaders. |
| src/bucket/test/BucketManagerTests.cpp | Removes test-time manual maintenance calls. |
| docs/stellar-core_example.cfg | Removes maintenance config docs. |
| docs/software/commands.md | Removes maintenance command docs. |
| docs/quick-reference.md | Removes maintenance section. |
Comments suppressed due to low confidence (1)
src/ledger/LedgerHeaderUtils.cpp:125
getHeaderDataForHash()declaresstd::shared_ptr<LedgerHeader> lhPtr;but never uses it. This will trigger an unused-variable warning and can be removed.
ZoneScoped;
std::shared_ptr<LedgerHeader> lhPtr;
c89182d to
7f67ab4
Compare
bboston7
previously approved these changes
Feb 27, 2026
Contributor
bboston7
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks for putting this together!
graydon
approved these changes
Feb 27, 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.
Gets rid of automatic maintenance, the
ledgerheaderstable, andlastclosedledgerinstorestate.