feat(client): add a file system backend for the certificate chain cache - #3562
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved cache publication and integration issues can compromise correctness and prevent the advertised CLI reuse behavior.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a filesystem-backed certificate verification cache for reuse across client runs.
Changes:
- Implements staged and committed certificate storage with expiration and cleanup.
- Exposes the backend behind
fsandunstablefeatures. - Adds filename validation, Tokio filesystem support, tests, and changelog documentation.
| File | Summary |
|---|---|
mithril-client/src/certificate_client/verify_cache/mod.rs |
Registers and exports the filesystem cache backend. |
mithril-client/src/certificate_client/verify_cache/file_cache.rs |
Implements the filesystem cache; unresolved concerns remain around partial commits and publishing incomplete files. |
mithril-client/src/certificate_client/mod.rs |
Exports the cache, but the CLI does not yet configure or use it. |
mithril-client/Cargo.toml |
Adds filesystem support; the fs feature documentation should also mention certificate caching. |
CHANGELOG.md |
Documents the new backend. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jpraynaud
force-pushed
the
jpraynaud/3522-fs-certificate-chain-cache
branch
2 times, most recently
from
September 24, 2026 16:12
7fc6b90 to
2ee72b7
Compare
jpraynaud
force-pushed
the
jpraynaud/3522-fs-certificate-chain-cache
branch
from
September 25, 2026 15:59
2ee72b7 to
c4a9eec
Compare
Base automatically changed from
jpraynaud/3521-early-stop-certificate-chain-cache
to
main
September 28, 2026 16:07
…cache Certificates are staged per chain validation id and committed with atomic renames, unparsable files are invalidated and expired entries and batches are swept.
* mithril-client from `0.14.26` to `0.14.27`
jpraynaud
force-pushed
the
jpraynaud/3522-fs-certificate-chain-cache
branch
from
September 28, 2026 16:21
c4a9eec to
faf3736
Compare
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 the file system backend of the certificate chain cache of
mithril-client, so that the certificates verified by one CLI run are reused by the next ones:FileCertificateVerifierCache, available with thefsandunstablefeatures, storing one JSON file per committed certificate with its expiration date undercommitted/<space>/, where the space is the fingerprint of the genesis verification key that validated it.staged/<certificate chain validation id>/, with the creation date of the batch in acreated_atfile.-and_, since the previous hash of a downloaded certificate could otherwise make the client read and delete files outside the cache.fsfeature oftokioto thefsfeature of the crate.Pre-submit checklist
Comments
fsfeature rather than on non-WASM targets.created_atfile (interrupted creation) expires from the last modification of its directory.Issue(s)
Closes #3522