Skip to content

better ipfs urls + small fixes - #3531

Open
Alenar wants to merge 4 commits into
mainfrom
djo/better-ipfs-url+small-fixes
Open

better ipfs urls + small fixes#3531
Alenar wants to merge 4 commits into
mainfrom
djo/better-ipfs-url+small-fixes

Conversation

@Alenar

@Alenar Alenar commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Content

This PR includes several changes and fixes small enough to want to avoid the complexity of doing several PRs:

  • Better IPFS url in aggregator artifacts: now prefixed with ipfs://, they have the nice side-effect of being compatible with both Kubo RPC /cat and /files/stat routes as is (no need to prefix the urls with /ipfs/ anymore for /files/stat)
  • fix IPFS devnet: the changes to ports in test(e2e): IPFS support #3528 was done a little too hastily, I forgot to apply it to the node peers configuration ... making the nodes unable to see each others 😅
  • aggregator signatures errors: avoid repeating the single signature payload twice when its validation fails (found while working on Blocks and transaction verification fails on testing-preview #3526).
  • aggregator dependency builder: add missing preload of the cardano blocks transactions prover cache (avoiding the need to wait for a first artifact to be able to prove blocks & transactions).

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • No new TODOs introduced

Issue(s)

Relates to #3528, #3526

…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).
@Alenar Alenar self-assigned this Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Test Results

     5 files  ± 0     221 suites  ±0   59m 38s ⏱️ - 1h 21m 28s
 3 580 tests  - 57   3 580 ✅  - 57  0 💤 ±0  0 ❌ ±0 
11 704 runs   - 64  11 704 ✅  - 64  0 💤 ±0  0 ❌ ±0 

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.
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::index_out_of_bounds
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::index_too_large_for_circuit_range
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::indices_not_increasing
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_merkle_path_mismatch
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_swap_keep_merkle_path
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_wrong_verification_key
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_corrupt_sibling
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_flip_position
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_length_long
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_length_short
…
mithril-aggregator ‑ artifact_builder::cardano_database_artifacts::immutable::tests::batch_upload::ipfs_batch_upload_yield_ipfs_urls

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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,

@jpraynaud jpraynaud left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants