Adding metadata coordinator#860
Merged
Merged
Conversation
3ce7871 to
3dedddc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the distributed proving flow to support (1) arbitrary request metadata propagated into the coordinator job state/logging and (2) an “execution-only” mode where workers execute without generating proofs, returning timing + instance/step metrics.
Changes:
- Add
metadataandexecution_onlytoLaunchProofRequestand expose them via the coordinator CLI. - Introduce
TaskType::EXECUTION/Executionresult payloads and implement execution-only handling in worker + coordinator. - Track and surface
instances/total_instances/executed_stepsacross worker/coordinator messages and logs.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| distributed/crates/worker/src/worker_node.rs | Adds execution-only task handling and response shaping for execution vs contribution results. |
| distributed/crates/worker/src/worker.rs | Implements execution-only computation path and propagates instances through computation results and aggregation. |
| distributed/crates/grpc-api/src/conversions.rs | Maps new DTO/proto fields for metadata, execution-only requests, and execution-only responses. |
| distributed/crates/grpc-api/proto/zisk_distributed_api.proto | Adds metadata/execution-only fields and new Execution response type / task type. |
| distributed/crates/coordinator/src/coordinator.rs | Stores metadata on jobs, dispatches execution-only tasks, and adds execution-only completion handling + logging. |
| distributed/crates/coordinator/src/cli/main.rs | Adds --metadata key=value (repeatable) and --execution-only flags. |
| distributed/crates/coordinator/src/cli/handler_prove.rs | Sends metadata/execution-only flags in launch requests. |
| distributed/crates/common/src/types.rs | Extends shared types with job metadata/execution-only flags and adds Execution job phase + instances tracking. |
| distributed/crates/common/src/dto.rs | Extends DTOs for metadata, execution-only requests, execution-only result payloads, and instances fields. |
| Cargo.toml | Switches proofman dependencies to a feature branch. |
| Cargo.lock | Updates lockfile, including proofman branch source changes and dependency resolution updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1538
to
+1565
| fn extract_execution_data( | ||
| &self, | ||
| result_data: ExecuteTaskResponseResultDataDto, | ||
| ) -> CoordinatorResult<JobResultData> { | ||
| match result_data { | ||
| ExecuteTaskResponseResultDataDto::Execution(exec_data) => { | ||
| let zisk_executor_time = | ||
| Self::extract_execution_info(&exec_data.zisk_executor_time); | ||
| let instances = exec_data.instances; | ||
| let executed_steps = exec_data.executed_steps; | ||
|
|
||
| Ok(JobResultData::Challenges(ContributionsResult { | ||
| witness_info: WitnessInfo { | ||
| summary_info: String::new(), | ||
| publics: Vec::new(), | ||
| proof_values: Vec::new(), | ||
| witness_time: 0.0, | ||
| total_instances: executed_steps as usize, | ||
| }, | ||
| challenges: Vec::new(), | ||
| zisk_executor_time, | ||
| task_received_time: chrono::DateTime::<Utc>::from_timestamp( | ||
| (exec_data.zisk_executor_time.task_received_time / 1000.0) as i64, | ||
| ((exec_data.zisk_executor_time.task_received_time % 1000.0) * 1_000_000.0) | ||
| as u32, | ||
| ), | ||
| instances, | ||
| })) |
Comment on lines
1505
to
1511
| let witness_info = WitnessInfo { | ||
| summary_info: ch_list.witness_info.summary_info, | ||
| publics: ch_list.witness_info.publics, | ||
| proof_values: ch_list.witness_info.proof_values, | ||
| witness_time: ch_list.witness_info.witness_time, | ||
| total_instances: ch_list.witness_info.total_instances as usize, | ||
| }; |
Comment on lines
+330
to
+350
| // If challenges are empty, this is execution-only mode | ||
| let (task_type, result_data_msg) = if challenges.is_empty() { | ||
| let executed_steps = self.worker.get_executed_steps(); | ||
| ( | ||
| TaskType::Execution as i32, | ||
| Some(ResultData::Execution(Execution { | ||
| instances: result_data.3, | ||
| executed_steps, | ||
| zisk_execution_time: Some(zisk_execution_time), | ||
| })), | ||
| ) | ||
| } else { | ||
| ( | ||
| TaskType::PartialContribution as i32, | ||
| Some(ResultData::Challenges(ChallengesList { | ||
| challenges, | ||
| witness_info: Some(witness_info), | ||
| zisk_execution_time: Some(zisk_execution_time), | ||
| })), | ||
| ) | ||
| }; |
277a379 to
7beff12
Compare
7beff12 to
b95e371
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.