Skip to content

mirror content provider complete#2378

Merged
Marketen merged 27 commits intodevelopfrom
feat/mirror-content-provider
Feb 24, 2026
Merged

mirror content provider complete#2378
Marketen merged 27 commits intodevelopfrom
feat/mirror-content-provider

Conversation

@Marketen
Copy link
Copy Markdown
Contributor

This pull request introduces a new HTTP mirror provider for DAppNode package content, enabling faster and more efficient access to package files via a configurable mirror. It also updates environment configuration, improves avatar URL fallback logic throughout the codebase, and adds support for mirror-based package data retrieval. The changes are grouped below by theme:

Mirror Provider Integration

  • Added a new HttpMirrorProvider implementation in mirrorProvider.ts to support fetching and streaming package files from a mirror, including progress tracking and error handling.
  • Defined mirror provider types and interfaces in types.ts, specifying methods for listing files, fetching files, streaming files, and building URLs.
  • Introduced utility functions in utils.ts for CID normalization and progress rounding.
  • Exported mirror provider modules from the content provider index for use throughout the codebase.

Configuration and Environment

  • Added mirror-related environment variables (CONTENT_MIRROR_BASE_URL, CONTENT_MIRROR_TIMEOUT_MS, CONTENT_MIRROR_MAX_BYTES) to params.ts and both docker-compose files, allowing mirror provider configuration via environment. [1] [2] [3]

Installer and Package Data Enhancements

  • Updated DappnodeInstaller to accept mirror provider configuration and added a new method getPackageDataForListing for fast mirror-based package data retrieval, bypassing IPFS and signature verification. [1] [2]
  • Modified image download logic in downloadImages.ts to support writing files using mirror provider parameters.

Avatar URL Fallback Improvements

  • Improved avatar URL fallback logic across multiple modules (fetchDirectory.ts, fetchRegistry.ts, fetchDnpRequest.ts, getOptimismConfig.ts, stakerComponent.ts) to ensure avatars are always available, using mirror URLs, manifest URLs, or empty string as needed. [1] [2] [3] [4] [5] [6] [7]

Manifest Data Extension

  • Extended manifest data selection in packageGetData.ts to include avatarUrl for richer package metadata.

These changes collectively enable mirror-based content retrieval, improve package listing performance, and ensure robust avatar handling throughout the DAppNode ecosystem.

@Marketen Marketen requested a review from a team as a code owner February 19, 2026 19:16
@github-actions github-actions bot temporarily deployed to commit February 19, 2026 19:29 Inactive
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 19, 2026

@github-actions github-actions bot temporarily deployed to commit February 20, 2026 09:17 Inactive
@github-actions github-actions bot temporarily deployed to commit February 20, 2026 09:38 Inactive
@github-actions github-actions bot temporarily deployed to commit February 20, 2026 10:38 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 08:22 Inactive
dependencies: labels.dependencies || {},
avatarUrl: labels.avatar ? multiaddressToIpfsGatewayUrl(labels.avatar) : "",
avatarUrl: labels.avatar
? labels.avatar.startsWith("http") ? labels.avatar : multiaddressToIpfsGatewayUrl(labels.avatar)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this mean that if the avatar is the mirror URL then use it otherwise behave as usual but for IPFS? if it is like that it sounds like a big assumption, is there other more generic workaround?

Otherwise leave a comment at least

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

simplified in 7299421

@github-actions github-actions bot temporarily deployed to commit February 23, 2026 10:53 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 11:41 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 11:48 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 12:38 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 12:56 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 14:55 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 17:24 Inactive
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 17:35 Inactive
@github-actions github-actions bot temporarily deployed to commit February 24, 2026 07:50 Inactive
@github-actions github-actions bot temporarily deployed to commit February 24, 2026 07:57 Inactive
@github-actions github-actions bot temporarily deployed to commit February 24, 2026 10:37 Inactive
@github-actions github-actions bot temporarily deployed to commit February 24, 2026 12:22 Inactive
@github-actions github-actions bot temporarily deployed to commit February 24, 2026 14:42 Inactive
@Marketen Marketen merged commit bd8970a into develop Feb 24, 2026
8 of 9 checks passed
@Marketen Marketen deleted the feat/mirror-content-provider branch February 24, 2026 16:49
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.

4 participants