Skip to content

Conversation

@noot
Copy link
Contributor

@noot noot commented Jul 9, 2025

  • implement shared libp2p node which handles the authentication protocol
  • implement validator libp2p node with handling of required request-response message types (hardware challenge)
  • implement orchestrator libp2p node with handling of required request-response message types (invite, get task logs, restart task)
  • update validator and orchestrator to use libp2p node when started
  • remove iroh from validator and orchestrator

@noot noot requested a review from Copilot July 9, 2025 21:27

This comment was marked as outdated.

@noot noot changed the title feature: update validator to use libp2p node feature: update validator and orchestrator to use libp2p node Jul 10, 2025
@noot noot requested a review from Copilot July 10, 2025 23:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces direct P2P client integrations with a shared libp2p Service using channels, refactors hardware challenges and orchestration invites/log retrieval to use the new Service, and updates startup and API routes accordingly.

  • Introduce a single P2PService and request/response channels in both validator and orchestrator.
  • Refactor HardwareChallenge/HardwareValidator to send requests via mpsc::Sender instead of P2PClient.
  • Update orchestrator’s NodeInviter and API route handlers to enqueue P2P requests on channels.

Reviewed Changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/validator/src/validators/hardware_challenge.rs Swapped out direct P2PClient calls for a channel-based request
crates/validator/src/p2p/mod.rs Added Service to bridge hardware challenge channel to libp2p
crates/orchestrator/src/node/invite.rs Refactored NodeInviter to send invites via channel
crates/orchestrator/src/api/routes/nodes.rs Updated restart/log routes to enqueue and await channel responses
crates/orchestrator/src/main.rs Initialize and spawn P2PService and wire invite/get/restart channels
Comments suppressed due to low confidence (1)

crates/validator/src/validators/hardware_challenge.rs:80

  • The random_challenge method is still inside an impl<'a> HardwareChallenge<'a> block even though the struct no longer has a lifetime parameter. Change the impl to impl HardwareChallenge to match the updated struct.
    fn random_challenge(

@noot
Copy link
Contributor Author

noot commented Jul 11, 2025

closing in favour of #622

@noot noot closed this Jul 11, 2025
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.

2 participants