Adapt to most recent coordinator version and add client mask indices#34
Adapt to most recent coordinator version and add client mask indices#34cadaniluk wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
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-coordinatordependency revision to a newer commit. - Migrate coordinator interactions to the new round-based API (
wait_for_round, renamed phase triggers) and switch toOffChainCoordinatorClient. - Add
STOFFEL_CLIENT_INDEXfor 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; |
There was a problem hiding this comment.
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).
| use stoffel_mpc_coordinator::Coordinator; |
| @@ -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) | |||
There was a problem hiding this comment.
--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.
fcc56a8 to
8a227f1
Compare
No description provided.