From 8e3edc2053a16ec98421d83211399338836f91e4 Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Thu, 5 Dec 2024 15:42:05 +0200 Subject: [PATCH] Add gateway_info_v2, gateway_info_stream_req_v2, gateway_metadata_v2 (#432) * Add gateway_info_v2, gateway_info_stream_req_v2, gateway_metadata_v2 * Add rpc info_stream_v2 * Deprecate rpc info_stream(v1) * Add gateway_info_stream_res_v2 --- src/service/mobile_config.proto | 55 ++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index 88af8c41..3211a971 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -43,6 +43,13 @@ message cbrs_radio_deployment_info { } message gateway_metadata { + option deprecated = true; + // The res12 h3 index asserted address of the gateway as a string + // where an unasserted gateway returns an empty string + string location = 2; +} + +message gateway_metadata_v2 { // The res12 h3 index asserted address of the gateway as a string // where an unasserted gateway returns an empty string string location = 2; @@ -53,12 +60,22 @@ message gateway_metadata { } message gateway_info { + option deprecated = true; // The public key binary address and on-chain identity of the gateway bytes address = 1; // The gateway metadata as recorded on the blockchain gateway_metadata metadata = 2; // the asserted device type of the gateway device_type device_type = 3; +} + +message gateway_info_v2 { + // The public key binary address and on-chain identity of the gateway + bytes address = 1; + // The gateway metadata as recorded on the blockchain + gateway_metadata_v2 metadata = 2; + // the asserted device type of the gateway + device_type device_type = 3; // The unix epoch timestamp (in seconds) // when the data was read from chain and written to the db uint64 refreshed_at = 4; @@ -94,7 +111,28 @@ message gateway_info_res_v1 { bytes signature = 4; } +message gateway_info_res_v2 { + gateway_info_v2 info = 1; + // unix epoch timestamp in seconds + uint64 timestamp = 2; + // pubkey binary of the signing keypair + bytes signer = 3; + bytes signature = 4; +} + message gateway_info_stream_req_v1 { + option deprecated = true; + // max number of gateway info records in each message of the response stream + uint32 batch_size = 1; + // pubkey binary of the signing keypair + bytes signer = 2; + bytes signature = 3; + // Device types that will be returned in the response + // Returns all devices if empty + repeated device_type device_types = 4; +} + +message gateway_info_stream_req_v2 { // max number of gateway info records in each message of the response stream uint32 batch_size = 1; // pubkey binary of the signing keypair @@ -120,6 +158,16 @@ message gateway_info_stream_res_v1 { bytes signature = 4; } +message gateway_info_stream_res_v2 { + // a list of gateway info numbering up to the request batch size + repeated gateway_info_v2 gateways = 1; + // unix epoch timestamp in seconds + uint64 timestamp = 2; + // pubkey binary of the signing keypair + bytes signer = 3; + bytes signature = 4; +} + message entity_verify_req_v1 { // binary identifier of the entity bytes entity_id = 1; @@ -310,7 +358,12 @@ service gateway { returns (stream gateway_info_stream_res_v1); // Get a stream of gateway info rpc info_stream(gateway_info_stream_req_v1) - returns (stream gateway_info_stream_res_v1); + returns (stream gateway_info_stream_res_v1) { + option deprecated = true; + } + // Get a stream of gateway info (V2) + rpc info_stream_v2(gateway_info_stream_req_v2) + returns (stream gateway_info_stream_res_v2); } service entity {