From a9dcfbe9fec5a86cd69aa2853db124aae9b85598 Mon Sep 17 00:00:00 2001 From: Noor Date: Wed, 12 Mar 2025 20:04:15 +0000 Subject: [PATCH] Add AppNodeFilters and AppNodeListResp messages; implement ListAppNodes and GetOneAppNode RPCs in BrainAppCli --- proto/sgx/brain.proto | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/proto/sgx/brain.proto b/proto/sgx/brain.proto index 204308e..273710c 100644 --- a/proto/sgx/brain.proto +++ b/proto/sgx/brain.proto @@ -65,10 +65,35 @@ message ListAppContractsReq { // string node_pubkey = 3; } + +message AppNodeFilters { + uint32 vcpus = 1; + uint32 memory_mb = 2; + uint32 storage_mb = 3; + string country = 4; + string region = 5; + string city = 6; + string ip = 7; + string node_pubkey = 8; +} + +message AppNodeListResp { + string operator = 1; + string node_pubkey = 2; + string country = 3; + string region = 4; + string city = 5; + string ip = 6; // required for latency test + uint64 price = 7; // nanoLP per unit per minute + repeated string reports = 8; // TODO: this will become an enum +} + service BrainAppCli { rpc DeployApp (NewAppReq) returns (NewAppRes); rpc DeleteApp (DelAppReq) returns (Empty); rpc ListAppContracts (ListAppContractsReq) returns (stream AppContract); + rpc ListAppNodes (AppNodeFilters) returns (stream AppNodeListResp); + rpc GetOneAppNode (AppNodeFilters) returns (AppNodeListResp); } message RegisterAppNodeReq {