This repository was archived by the owner on Jan 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
feature: update validator and orchestrator to use libp2p node #621
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
There was a problem hiding this 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
P2PServiceand request/response channels in both validator and orchestrator. - Refactor
HardwareChallenge/HardwareValidatorto send requests viampsc::Senderinstead ofP2PClient. - Update orchestrator’s
NodeInviterand 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_challengemethod is still inside animpl<'a> HardwareChallenge<'a>block even though the struct no longer has a lifetime parameter. Change the impl toimpl HardwareChallengeto match the updated struct.
fn random_challenge(
Contributor
Author
|
closing in favour of #622 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.