fix(aggregator): make IPFS uploads resilient to a large MFS directory - #3546
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Directory CID retry errors should use operation-appropriate context before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Improves aggregator IPFS uploads for large MFS directories by reducing listing overhead, increasing RPC timeouts, and retrying directory CID lookups.
Changes:
- Lists MFS entries by name without loading child nodes.
- Raises the default Kubo RPC timeout to 10 seconds.
- Retries directory CID retrieval and updates fixtures and package versions.
File summaries
| File | Summary |
|---|---|
mithril-aggregator/src/tools/kubo_rpc_client/query/ipfs_files_ls.rs |
Optimizes MFS directory listings. |
mithril-aggregator/src/tools/kubo_rpc_client/api.rs |
Increases the default RPC timeout. |
mithril-aggregator/src/file_uploaders/ipfs_uploader.rs |
Adds directory CID retries; retry errors need operation-appropriate context. |
mithril-aggregator/src/artifact_builder/cardano_database_artifacts/immutable.rs |
Updates IPFS uploader test fixtures. |
mithril-aggregator/Cargo.toml |
Bumps the aggregator version. |
Cargo.lock |
Synchronizes the locked version. |
Review details
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
💡 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/fix-ipfs-timeout
branch
from
September 16, 2026 16:52
b9a7b64 to
2a18b01
Compare
Alenar
approved these changes
Sep 17, 2026
jpraynaud
force-pushed
the
jpraynaud/fix-ipfs-timeout
branch
from
September 17, 2026 10:06
2a18b01 to
066c36c
Compare
The long listing made Kubo load every child node from the datastore while only the entry names are used to skip already uploaded files.
A one second budget expired on 'files/stat' of a large sharded MFS directory right after a batch of uploads.
The helper is about to wrap the IPFS directory CID query, whose exhaustion must not be reported as an upload failure.
A single slow answer discarded a batch whose uploads all succeeded.
* mithril-aggregator from `0.10.6` to `0.10.7`
jpraynaud
force-pushed
the
jpraynaud/fix-ipfs-timeout
branch
from
September 17, 2026 14:27
066c36c to
6afbd8b
Compare
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 fixes for the IPFS upload of immutable archives failing with
operation timed outon a network with a large MFS directory:files/statandfiles/mkdirqueries on a sharded directory right after a batch of uploads.The original error received was:
Pre-submit checklist