From ab41ba7caaad6bf111011fa011fcb63eeaf7d0ea Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Mon, 26 Aug 2024 17:07:05 -0700 Subject: [PATCH 1/4] add settlement status to data transfer session marking wether the transfer session can have it's DC burned immediately, or needs to wait for manual intervention and settlement. --- src/service/poc_mobile.proto | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 537c4025..aeb85b2e 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -631,6 +631,13 @@ enum cell_type { nova_generic_wifi_outdoor = 7; } +enum data_transfer_session_settlement_status { + // The Session is able to be burned immediately + settled = 0; + // The Session is pending settlement, do not burn + pending = 1; +} + message data_transfer_session_req_v1 { /// data_transfer_event represents traffic usage happening on a hotspot /// it is traffic quota or timer based @@ -643,6 +650,7 @@ message data_transfer_session_req_v1 { bytes pub_key = 3; bytes signature = 4; uint64 rewardable_bytes = 5; + data_transfer_session_settlement_status status = 6; } message data_transfer_event { @@ -801,4 +809,4 @@ message verified_subscriber_verified_mapping_event_ingest_report_v1 { subscriber_verified_mapping_event_verification_status status = 2; // Timestamp in milliseconds since unix epoch uint64 timestamp = 3; -} \ No newline at end of file +} From fc0af5389e6e84048522bdac13e44ad88d6c5741 Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Tue, 27 Aug 2024 10:39:52 -0700 Subject: [PATCH 2/4] Add a report for data transfer sessions that were ingested with pending --- src/service/poc_mobile.proto | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index aeb85b2e..53944ebd 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -700,6 +700,24 @@ message invalid_data_transfer_ingest_report_v1 { uint64 timestamp = 3; } +message pending_data_transfer_session_v1 { + // Public Key of the Hotspot + bytes pub_key = 1; + // Public Key of the Payer + bytes payer = 2; + + uint64 upload_bytes = 3; + uint64 download_bytes = 4; + uint64 rewardable_bytes = 5; + + // Timestamp in seconds since the epoch + // From the DataTransferEvent + uint64 event_timestamp = 6; + // Timestamp in milliseconds since the epoch + // From the file the transfer session was processed + uint64 received_timestamp = 7; +} + message oracle_boosting_report_v1 { // UUID of the coverage object for the given hex bytes coverage_object = 1; From f9ae660fbc5324d7e399237d17a835f76b36761c Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Wed, 28 Aug 2024 10:09:38 -0700 Subject: [PATCH 3/4] Use the same timestamp granularity within a message --- src/service/poc_mobile.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 53944ebd..e41389e7 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -710,8 +710,9 @@ message pending_data_transfer_session_v1 { uint64 download_bytes = 4; uint64 rewardable_bytes = 5; - // Timestamp in seconds since the epoch + // Timestamp in milliseconds since the epoch // From the DataTransferEvent + // NOTE: Be sure to convert `data_transfer_event.timestamp` from seconds -> milliseconds uint64 event_timestamp = 6; // Timestamp in milliseconds since the epoch // From the file the transfer session was processed From 3d3bbb70cb07c9606797779a9fcb7f73f2018e19 Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Wed, 28 Aug 2024 10:30:46 -0700 Subject: [PATCH 4/4] comments < 80 --- src/service/poc_mobile.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index e41389e7..4e49d9db 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -711,8 +711,8 @@ message pending_data_transfer_session_v1 { uint64 rewardable_bytes = 5; // Timestamp in milliseconds since the epoch - // From the DataTransferEvent - // NOTE: Be sure to convert `data_transfer_event.timestamp` from seconds -> milliseconds + // From the DataTransferEvent, be sure to convert + // `data_transfer_event.timestamp` from seconds -> milliseconds uint64 event_timestamp = 6; // Timestamp in milliseconds since the epoch // From the file the transfer session was processed