From 4c36a4c1d1f4a02105914cf00ce0d31791f8e01a Mon Sep 17 00:00:00 2001 From: ghe0 Date: Sat, 5 Jul 2025 16:36:35 +0300 Subject: [PATCH] allow VM nodes to offer multiple slot offers --- proto/snp/vm.proto | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/proto/snp/vm.proto b/proto/snp/vm.proto index 8cbbb3d..9efb739 100644 --- a/proto/snp/vm.proto +++ b/proto/snp/vm.proto @@ -58,15 +58,20 @@ message RegisterVmNodeReq { uint64 price = 7; } +message VmNodeOffer { + uint64 price = 1; + uint64 vcpus = 2; + uint64 memory_mib = 3; + uint64 disk_mib = 4; +} + message VmNodeResources { string node_pubkey = 1; uint32 avail_ports = 2; uint32 avail_ipv4 = 3; uint32 avail_ipv6 = 4; - uint32 avail_vcpus = 5; - uint32 avail_memory_mib = 6; - uint32 avail_storage_mib = 7; - uint32 max_ports_per_vm = 8; + uint32 max_ports_per_vm = 5; + repeated VmNodeOffer offers = 6; } message NewVmReq { @@ -176,10 +181,7 @@ message VmNodeListResp { string city = 5; string ip = 6; // required for latency test repeated string reports = 7; // TODO: this will become an enum - uint64 price = 8; // nanocredits per unit per minute - uint64 vcpus = 9; - uint64 memory_mib = 10; - uint64 disk_mib = 11; + repeated VmNodeOffer offers = 9; bool public_ipv4 = 12; bool public_ipv6 = 13; }