Skip to content

Update orchestrator.proto#1900

Open
adesandro wants to merge 1 commit intonexus-xyz:mainfrom
adesandro:patch-1
Open

Update orchestrator.proto#1900
adesandro wants to merge 1 commit intonexus-xyz:mainfrom
adesandro:patch-1

Conversation

@adesandro
Copy link

Explanation of Changes and Innovations
Improvements

Field Naming:

Renamed uuid in RegisterUserRequest to user_id for consistency with user_id in other messages. Renamed public_inputs_list in Task to input_sets for clarity, as it represents multiple sets of inputs. Renamed all_proof_hashes in SubmitProofRequest to individual_proof_hashes to better describe its purpose. Renamed TaskType values PROOF_HASH and ALL_PROOF_HASHES to HASH_REQUIRED and INDIVIDUAL_HASHES for clarity.

Reserved Fields:

In SubmitProofRequest, reinstated node_id as field 1 (previously reserved) for consistency, as it’s logical to include the submitting node’s ID.

Required Fields in NodeTelemetry:

Made flops_per_sec, memory_used, and memory_capacity required (removed optional) to ensure meaningful telemetry data.

Documentation:

Added detailed comments for all messages, fields, and enums to clarify their purpose and usage. Specified constraints (e.g., Ed25519 key length, latitude/longitude ranges).

Pagination:

Added limit field to GetTasksRequest to control page size, improving flexibility.

Innovations

Task Prioritization:

Added priority (int32) to Task to allow scheduling high-priority tasks (1 = lowest, 10 = highest).

Node Versioning:

Added version to RegisterNodeRequest and Node to track node software versions, aiding compatibility checks.

Task Status Tracking:

Introduced TaskStatus enum and GetTaskStatusRequest/Response messages to allow querying task progress (e.g., pending, assigned, completed, failed).

Metadata Support:

Added map<string, string> metadata to Task, Node, and NodeTelemetry for extensible custom attributes (e.g., configuration, hardware specs).

Proof Verification:

Added SubmitProofResponse with verification_status and error_message to provide feedback on proof submission.

Geo-Location Precision:

Replaced NodeTelemetry.location (string) with a GeoLocation message containing latitude, longitude, and country_code for precise geolocation data.

Error Handling:

Added ErrorResponse message for consistent error reporting across RPC methods.

Enhanced GetNodeResponse:

Included the full Node message in GetNodeResponse to provide complete node details, not just the wallet address.

Backward Compatibility

Deprecated Fields: Retained all deprecated fields (program_id, public_inputs, task_id in GetProofTaskResponse) to ensure existing clients work without modification.
New Fields: Added new fields with unique field numbers to avoid conflicts (e.g., priority as 7, metadata as 8 in Task).
Enums: Kept existing enum values (NodeType, TaskDifficulty, TaskType) unchanged and used reserved ranges for future expansion.

Explanation of Changes and Innovations
Improvements

Field Naming:

Renamed uuid in RegisterUserRequest to user_id for consistency with user_id in other messages.
Renamed public_inputs_list in Task to input_sets for clarity, as it represents multiple sets of inputs.
Renamed all_proof_hashes in SubmitProofRequest to individual_proof_hashes to better describe its purpose.
Renamed TaskType values PROOF_HASH and ALL_PROOF_HASHES to HASH_REQUIRED and INDIVIDUAL_HASHES for clarity.


Reserved Fields:

In SubmitProofRequest, reinstated node_id as field 1 (previously reserved) for consistency, as it’s logical to include the submitting node’s ID.


Required Fields in NodeTelemetry:

Made flops_per_sec, memory_used, and memory_capacity required (removed optional) to ensure meaningful telemetry data.


Documentation:

Added detailed comments for all messages, fields, and enums to clarify their purpose and usage.
Specified constraints (e.g., Ed25519 key length, latitude/longitude ranges).


Pagination:

Added limit field to GetTasksRequest to control page size, improving flexibility.



Innovations

Task Prioritization:

Added priority (int32) to Task to allow scheduling high-priority tasks (1 = lowest, 10 = highest).


Node Versioning:

Added version to RegisterNodeRequest and Node to track node software versions, aiding compatibility checks.


Task Status Tracking:

Introduced TaskStatus enum and GetTaskStatusRequest/Response messages to allow querying task progress (e.g., pending, assigned, completed, failed).


Metadata Support:

Added map<string, string> metadata to Task, Node, and NodeTelemetry for extensible custom attributes (e.g., configuration, hardware specs).


Proof Verification:

Added SubmitProofResponse with verification_status and error_message to provide feedback on proof submission.


Geo-Location Precision:

Replaced NodeTelemetry.location (string) with a GeoLocation message containing latitude, longitude, and country_code for precise geolocation data.


Error Handling:

Added ErrorResponse message for consistent error reporting across RPC methods.


Enhanced GetNodeResponse:

Included the full Node message in GetNodeResponse to provide complete node details, not just the wallet address.



Backward Compatibility

Deprecated Fields: Retained all deprecated fields (program_id, public_inputs, task_id in GetProofTaskResponse) to ensure existing clients work without modification.
New Fields: Added new fields with unique field numbers to avoid conflicts (e.g., priority as 7, metadata as 8 in Task).
Enums: Kept existing enum values (NodeType, TaskDifficulty, TaskType) unchanged and used reserved ranges for future expansion.
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.

1 participant