// Copyright 2019 Cartesi Pte. Ltd. // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software distributed // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. syntax = "proto3"; import "cartesi-machine.proto"; package CartesiMachineManager; service MachineManager { rpc NewSession (NewSessionRequest) returns (CartesiMachine.Hash) {} rpc SessionRun (SessionRunRequest) returns (SessionRunResponse) {} rpc SessionStep (SessionStepRequest) returns (SessionStepResponse) {} rpc SessionStore (SessionStoreRequest) returns (CartesiMachine.Void) {} rpc SessionReadMemory (SessionReadMemoryRequest) returns (SessionReadMemoryResponse) {} rpc SessionWriteMemory (SessionWriteMemoryRequest) returns (CartesiMachine.Void) {} rpc SessionGetProof (SessionGetProofRequest) returns (CartesiMachine.MerkleTreeProof) {} rpc EndSession (EndSessionRequest) returns (CartesiMachine.Void) {} } message NewSessionRequest { CartesiMachine.MachineRequest machine = 1; string session_id = 2; bool force = 3; } message SessionRunRequest { string session_id = 1; repeated uint64 final_cycles = 2; } message SessionRunProgress { uint64 progress = 1; uint64 application_progress = 2; uint64 updated_at = 3; uint64 cycle = 4; } message SessionRunResult { repeated CartesiMachine.RunResponse summaries = 1; repeated CartesiMachine.Hash hashes = 2; } message SessionRunResponse { oneof run_oneof { SessionRunProgress progress = 1; SessionRunResult result = 2; } } message SessionStepRequest { string session_id = 1; uint64 initial_cycle = 2; oneof step_params_oneof { CartesiMachine.StepRequest step_params = 3; }; } message SessionStepResponse { CartesiMachine.AccessLog log = 1; } message SessionStoreRequest { string session_id = 1; CartesiMachine.StoreRequest store = 2; } message SessionReadMemoryRequest { string session_id = 1; uint64 cycle = 2; CartesiMachine.ReadMemoryRequest position = 3; } message SessionReadMemoryResponse { CartesiMachine.ReadMemoryResponse read_content = 1; } message SessionWriteMemoryRequest { string session_id = 1; uint64 cycle = 2; CartesiMachine.WriteMemoryRequest position = 3; } message SessionGetProofRequest { string session_id = 1; uint64 cycle = 2; CartesiMachine.GetProofRequest target = 3; } message EndSessionRequest { string session_id = 1; bool silent = 2; }