Skip to content

Conversation

@cong-or
Copy link
Contributor

@cong-or cong-or commented Dec 8, 2025


Add transport configuration methods to HermesIpfsBuilder

Summary:

Adds builder methods to HermesIpfsBuilder for configuring libp2p transports, enabling Hermes to customize network transport settings for different deployment environments.

Changes:

Added three new builder methods to HermesIpfsBuilder:

  • enable_tcp() - Enable TCP transport
  • enable_quic() - Enable QUIC transport
  • enable_dns() - Enable DNS resolution

Reason:

Currently, HermesIpfsBuilder doesn't expose transport configuration options from the underlying rust-ipfs IpfsBuilder. This limits Hermes' ability to:

  • Configure transports for Docker networking environments
  • Adapt transport settings for different deployment scenarios
  • Match transport configuration to network capabilities

These methods are needed for Hermes to implement P2P features (pubsub, DHT) in a multi-node test environment where nodes run in isolated Docker containers and need to discover each
other.

Usage

  let node = HermesIpfsBuilder::new()
      .enable_tcp()      // New
      .enable_quic()     // New
      .enable_dns()      // New
      .with_default()
      .set_disk_storage(path)
      .start()
      .await?;

Implementation

Downstream Impact

This enables Hermes to:

  1. Configure transports selectively based on environment
  2. Test P2P features in Docker with appropriate transport setup
  3. Use DHT-based peer discovery (DHT methods already exist in hermes-ipfs)
  4. Form pubsub meshes between Hermes nodes

Testing

Can be verified downstream in Hermes by:

  • Starting multi-node Docker environment
  • Verifying nodes connect via configured transports
  • Confirming DHT and pubsub functionality works across nodes

  Add wrapper methods to enable TCP, QUIC, and DNS transports in
  HermesIpfsBuilder. These methods are required because connexa's
  TransportConfig disables all transports by default.

  - Add enable_tcp() method
  - Add enable_quic() method
  - Add enable_dns() method

  Without these methods, libp2p connections fail with "Multiaddr is
  not supported" errors. The methods must be called explicitly when
  building an IPFS node to enable P2P networking.

  Related to: #704
…sport-enable-methods

# Conflicts:
#	rust/hermes-ipfs/Cargo.toml
  Use the 'full' feature flag for connexa dependency instead of
  explicitly listing individual features. This is more maintainable
  and cleaner.

  Or if you prefer a shorter version:
  Format where clauses and add TODO comments documenting disabled
  default transport config and TLS/websocket options.
@cong-or cong-or self-assigned this Dec 8, 2025
@cong-or cong-or added the squad: hermetics Hermes Backend, System Development & Integration Team label Dec 8, 2025
@cong-or cong-or added this to Catalyst Dec 8, 2025
@cong-or cong-or moved this from New to 👀 In review in Catalyst Dec 8, 2025
@cong-or cong-or marked this pull request as ready for review December 8, 2025 12:48
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

📚 Docs Preview

The docs for this PR can be previewed at the following URL:

https://docs.dev.projectcatalyst.io/libs/feat/hermes-ipfs-transport-enable-methods

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Test Report | ${\color{lightgreen}Pass: 601/601}$ | ${\color{red}Fail: 0/601}$ |

Copy link
Contributor

@aido-mth aido-mth left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@no30bit no30bit left a comment

Choose a reason for hiding this comment

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

LGTM

@cong-or cong-or merged commit c9e3085 into main Dec 8, 2025
29 checks passed
@cong-or cong-or deleted the feat/hermes-ipfs-transport-enable-methods branch December 8, 2025 13:54
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Catalyst Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad: hermetics Hermes Backend, System Development & Integration Team

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants