-
Notifications
You must be signed in to change notification settings - Fork 27
feature: update validator and orchestrator to use libp2p node #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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(
|
closing in favour of #622 |
Uh oh!
There was an error while loading. Please reload this page.