Repository navigation
feat(aggregator): new tools clear-immutables-archives-cache command - #3674
Merged
Alenar merged 14 commits intoNov 4, 2026
Merged
Conversation
Alenar
requested review from
damrobi,
jpraynaud and
turmelclem
as code owners
November 2, 2026 17:17
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Active issues remain, including Clippy-failing unused imports and cache deletion logic that mishandles six-digit archive numbers.
4 open issues
What changed in this PR
Adds the tools clear-immutables-archives-cache aggregator command for inspecting and optionally deleting cached immutable archives, while reorganizing existing tools commands into dedicated submodules.
Changes:
- Adds dry-run and
--deletecache-clearing behavior with local-uploader warnings. - Introduces archive detection, summaries, deletion utilities, tests, and shared cache-path constants.
- Splits existing tools commands into submodules and updates aggregator documentation.
| File | Summary | Review notes |
|---|---|---|
mithril-aggregator/src/tools/mod.rs |
Exports immutable archive cache-cleaning utilities. | No findings. |
mithril-aggregator/src/tools/immutables_archives_cache_cleaner.rs |
Detects, summarizes, deletes, and tests cached immutable archives. | Moderate (2 votes): validation should accept archive numbers with at least five digits, including values ≥100000. Nit (2 votes): use grammatically correct singular/plural “immutable archive(s)” in summaries. |
mithril-aggregator/src/dependency_injection/builder/protocol/artifacts.rs |
Uses the shared immutable archive directory constant. | No findings. |
mithril-aggregator/src/dependency_injection/builder/mod.rs |
Defines shared artifact and immutable archive directory constants. | No findings. |
mithril-aggregator/src/commands/tools_command/recompute_certificates_hash.rs |
Extracts certificate hash recomputation into its own command module. | Critical (1 vote): remove unused Map and Value imports to satisfy the no-warnings Clippy check. |
mithril-aggregator/src/commands/tools_command/mod.rs |
Defines the modular tools command and subcommand dispatch. | No findings. |
mithril-aggregator/src/commands/tools_command/generate_keypair.rs |
Extracts keypair generation into its own module. | No findings. |
mithril-aggregator/src/commands/tools_command/clear_immutables_archives_cache.rs |
Implements the new cache inspection and deletion command. | Critical (1 vote): remove unused Map and Value imports. Nit (1 vote): correct “immutables archives” to “immutable archives” in the user-facing message. |
mithril-aggregator/src/commands/tools_command.rs |
Removes the former monolithic tools command implementation. | No findings. |
docs/website/root/manual/develop/nodes/mithril-aggregator.md |
Documents the new command, options, warnings, and configuration. | Nits (1 vote each): add the command to the subcommands table and command summary table, and mirror the updated help and configuration sections in the maintained versioned page. |
Review effort: Lite
jpraynaud
approved these changes
Nov 3, 2026
Alenar
force-pushed
the
djo/3653/aggregator/migration-of-immutables-archives
branch
from
November 3, 2026 18:06
fceebea to
35e6e6c
Compare
…eCertificatesHashCommandConfiguration' This config struct only applied to the certificate hash recomputation so its naming was misleading.
this simplify the test and allow catching leftover or unexpected files.
- always warn in 'tools clear-immutables-archives-cache' - handle immutable file archives with more than 5 digits - clarify 'snapshot_directory' description. - fix grammar
* mithril-aggregator from `0.10.29` to `0.10.30`
Alenar
force-pushed
the
djo/3653/aggregator/migration-of-immutables-archives
branch
from
November 4, 2026 11:30
35e6e6c to
9344d21
Compare
Alenar
deleted the
djo/3653/aggregator/migration-of-immutables-archives
branch
November 4, 2026 12:56
This branch was successfully deployed
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.



Content
This PR includes a new
tools clear-immutables-archives-cacheaggregator command.The aggregator caches the immutable files archives it builds in
{snapshot_directory}/cardano-database/immutable.For an efficient IPFS distribution, aggregators must upload byte-identical archives, so this cache must be recomputed each time the archive compression changes (e.g. when the
zstdlibrary version is bumped).This command clears it so the archives get rebuilt.
--deletedeletes the archives (other files are kept)localsnapshot uploader is used, as this directory is then served as istoolscommand into one submodule per subcommandPre-submit checklist
Issue(s)
Relates to #3653