Skip to content

Adapt to most recent coordinator version and add client mask indices#34

Closed
cadaniluk wants to merge 4 commits into
mainfrom
feature/reservation-masked-shares-cordian
Closed

Adapt to most recent coordinator version and add client mask indices#34
cadaniluk wants to merge 4 commits into
mainfrom
feature/reservation-masked-shares-cordian

Conversation

@cadaniluk
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

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

Updates the Stoffel VM runner and Docker setup to work with a newer stoffel-mpc-coordinator API, including explicit client mask slot indices for coordinator-based runs.

Changes:

  • Bump stoffel-mpc-coordinator dependency revision to a newer commit.
  • Migrate coordinator interactions to the new round-based API (wait_for_round, renamed phase triggers) and switch to OffChainCoordinatorClient.
  • Add STOFFEL_CLIENT_INDEX for docker-compose clients so coordinator client mode can claim reserved mask slots.

Reviewed changes

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

File Description
docker-compose.yml Adds STOFFEL_CLIENT_INDEX for both clients so entrypoint can pass --client-index.
crates/stoffel-vm/src/bin/stoffel-run.rs Adapts to new coordinator API (round-based waits, renamed triggers), updates off-chain client type, and adjusts flow for reserved mask indices.
crates/stoffel-vm/Cargo.toml Updates coordinator dependency rev to match the new API used by stoffel-run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

use stoffel_mpc_coordinator::off_chain::node_rpc::{NodeRPCClient, NodeRPCServer};
use stoffel_mpc_coordinator::off_chain::OffChainCoordinator;
use stoffel_mpc_coordinator::on_chain;
use stoffel_mpc_coordinator::Coordinator;
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

Coordinator is imported but not used anywhere in this file (the only match is the use statement). This triggers an unused_imports warning in clippy; remove the import (or reference the trait explicitly if it’s required for method resolution).

Suggested change
use stoffel_mpc_coordinator::Coordinator;

Copilot uses AI. Check for mistakes.
Comment on lines 2716 to 2720
@@ -2714,11 +2717,6 @@ async fn main() {
on_chain::setup_coord(provider, contract, t as u64, 1, None).await;
let coord_for_rpc = coord_instance.coord();

// Grant roles (leader only)
if as_leader {
coord_instance.grant_roles(node_ids.clone()).await.unwrap();
}

// Parse expected client addresses (on-chain uses Ethereum addresses)
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

--node-ids is still parsed (see node_ids in argument parsing), but after removing the grant_roles(...) call this value is never used. This makes the flag silently ignored; either remove the flag/variable, or reintroduce the corresponding on-chain role setup using the new coordinator API.

Copilot uses AI. Check for mistakes.
@cadaniluk cadaniluk force-pushed the feature/reservation-masked-shares-cordian branch from fcc56a8 to 8a227f1 Compare May 13, 2026 10:57
@cadaniluk cadaniluk closed this May 13, 2026
@cadaniluk cadaniluk deleted the feature/reservation-masked-shares-cordian branch May 13, 2026 10:57
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