Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions src/service/mobile_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,28 @@ message gateway_info_v3 {
uint64 num_location_asserts = 6;
}

message gateway_info_v4 {
// The public key binary address and on-chain identity of the gateway
bytes address = 1;
// The gateway metadata
gateway_metadata_v3 metadata = 2;
// The asserted device type of the gateway
device_type_v2 device_type = 3;
// The Unix epoch timestamp (in seconds) when the gateway was first added to
// the database
uint64 created_at = 4;
// The Unix epoch timestamp (in seconds) when the gateway parameters were last
// updated. NOTE: This field is also updated when the location or owner
// changes.
uint64 updated_at = 5;
// Count of hotspot location changes
uint64 num_location_asserts = 6;
// The gateway's owner
string owner = 7;
// The Unix epoch timestamp (in seconds) when the owner was last changed
uint64 owner_changed_at = 8;
}
Comment on lines 131 to 151
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a discrepancy between the PR description and the code changes. The PR description states "Add owner and owner_changed_at to gateway_info_v3", but the code actually creates a new gateway_info_v4 message with these fields, leaving gateway_info_v3 unchanged. This is the correct approach for maintaining backward compatibility, but the PR description should be updated to reflect that this creates a V4 version rather than modifying V3.

Copilot uses AI. Check for mistakes.

message gateway_info_req_v1 {
// The public key address of the gateway to look up
bytes address = 1;
Expand Down Expand Up @@ -208,6 +230,32 @@ message gateway_info_stream_req_v3 {
uint64 min_location_changed_at = 6;
}

message gateway_info_stream_req_v4 {
// 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_v2 device_types = 4;
// The Unix epoch timestamp (in seconds).
// Filters the response based on the last time gateway parameter(s) was
// updated (Includes location and owner changing).
// Use 0 if you don't want to apply this filter
// NOTE: It is recommended to use the highest `updated_at` field from
// returned radios in the next subsequent requests.
uint64 min_updated_at = 5;
// The Unix epoch timestamp (in seconds).
// Filters the response based on the last time gateway changed its location.
// Use 0 if you don't want to apply this filter
Comment on lines +245 to +251
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instruction text differs from the corresponding field in gateway_info_stream_req_v3 (line 229-230). In v3, it says "Use 0 to fetch all gateways" while in v4 line 251 it says "Use 0 if you don't want to apply this filter". For consistency across API versions, consider using the same phrasing as v3.

Suggested change
// Use 0 if you don't want to apply this filter
// NOTE: It is recommended to use the highest `updated_at` field from
// returned radios in the next subsequent requests.
uint64 min_updated_at = 5;
// The Unix epoch timestamp (in seconds).
// Filters the response based on the last time gateway changed its location.
// Use 0 if you don't want to apply this filter
// Use 0 to fetch all gateways.
// NOTE: It is recommended to use the highest `updated_at` field from
// returned radios in the next subsequent requests.
uint64 min_updated_at = 5;
// The Unix epoch timestamp (in seconds).
// Filters the response based on the last time gateway changed its location.
// Use 0 to fetch all gateways.

Copilot uses AI. Check for mistakes.
uint64 min_location_changed_at = 6;
// The Unix epoch timestamp (in seconds).
// Filters the response based on the last time gateway's owner was changed
// Use 0 if you don't want to apply this filter
uint64 min_owner_changed_at = 7;
}

message gateway_info_stream_req_v2 {
// max number of gateway info records in each message of the response stream
uint32 batch_size = 1;
Expand Down Expand Up @@ -255,6 +303,16 @@ message gateway_info_stream_res_v3 {
bytes signature = 4;
}

message gateway_info_stream_res_v4 {
// a list of gateway info numbering up to the request batch size
repeated gateway_info_v4 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;
Expand Down Expand Up @@ -475,6 +533,11 @@ service gateway {
// Get a stream of gateway info (V3)
rpc info_stream_v3(gateway_info_stream_req_v3)
returns (stream gateway_info_stream_res_v3);

// V4
// Get a stream of gateway info (V4)
rpc info_stream_v4(gateway_info_stream_req_v4)
returns (stream gateway_info_stream_res_v4);
}

service entity {
Expand Down