better ipfs urls + small fixes - #3531
Conversation
…oader Using `ipfs://` url scheme is more standard and allows usage as is, without prefixing, with both `files/stat` and `cat` kubo RPC endpoints.
making the nodes unable to connect to each other.
…ion error the two validators (`/register_signatures` http route handler and `SignatureProcessor`) already include them in a "full_payload" log trace. So we do not need to repeat it, especially since they quite huge, this polute the logs.
… service Else if an aggregator restarts, it won't be able to compute proofs for "blocks and transaction" artifacts until a new artifact is produced (which can take several minutes).
Test Results 5 files ± 0 221 suites ±0 59m 38s ⏱️ - 1h 21m 28s Results for commit f0c164f. ± Comparison against base commit cccb650. This pull request removes 58 and adds 1 tests. Note that renamed tests count towards both. |
There was a problem hiding this comment.
🟡 Changes recommended
The new URL format breaks backward compatibility for existing artifacts and older clients.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates IPFS artifact URLs, fixes devnet peer ports, improves signature errors, and preloads prover caches.
Changes:
- Emits
ipfs://artifact URLs. - Corrects IPFS swarm peer configuration.
- Simplifies signature validation errors.
- Preloads both prover caches and expands uploader test access.
File summaries
| File | Summary |
|---|---|
mithril-test-lab/ipfs-devnet/commands/mkfiles/kubo-configure-swarm.sh |
Aligns peer ports with node configuration. |
mithril-client/src/file_downloader/ipfs.rs |
Updates IPFS URL handling. Critical (3 votes): legacy bare paths are no longer normalized for files/stat. |
mithril-aggregator/src/multi_signer.rs |
Reduces duplicated signature error payloads. |
mithril-aggregator/src/file_uploaders/ipfs_uploader.rs |
Exposes the uploader test constructor across modules. |
mithril-aggregator/src/dependency_injection/builder/protocol/artifacts.rs |
Preloads both prover caches. |
mithril-aggregator/src/artifact_builder/cardano_database_artifacts/immutable.rs |
Emits ipfs:// immutable artifact URLs. Critical (2 votes): this breaks clients consuming previously persisted bare-path locations. |
Review details
Suppressed comments (2)
mithril-aggregator/src/artifact_builder/cardano_database_artifacts/immutable.rs:979
- Use “yields” rather than “yield” in this newly added test name so the behavior description is grammatically correct.
async fn ipfs_batch_upload_yield_ipfs_urls() {
mithril-client/src/file_downloader/ipfs.rs:176
- The newly updated comment is ungrammatical: “location is expected a path” should read “location is expected to be a path.”
// `location` is expected a path in the form `ipfs://<directory-CID>/<filename>`.
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Ok(ImmutablesLocation::Ipfs { | ||
| uri: MultiFilesUri::Template(TemplateUri(format!( | ||
| "{directory_cid}/{{immutable_file_number}}.tar.zst" | ||
| "ipfs://{directory_cid}/{{immutable_file_number}}.tar.zst" |
| .post( | ||
| "api/v0/files/stat", | ||
| &with_ipfs_namespace_prefix(ipfs_path), | ||
| ipfs_path, |
Content
This PR includes several changes and fixes small enough to want to avoid the complexity of doing several PRs:
ipfs://, they have the nice side-effect of being compatible with both Kubo RPC/catand/files/statroutes as is (no need to prefix the urls with/ipfs/anymore for/files/stat)testing-preview#3526).Pre-submit checklist
Issue(s)
Relates to #3528, #3526