@@ -394,6 +394,79 @@ service poc_mobile {
394394 returns (unique_connections_resp_v1 );
395395 rpc submit_subscriber_mapping_activity (subscriber_mapping_activity_req_v1 )
396396 returns (subscriber_mapping_activity_res_v1 );
397+ rpc submit_ban (ban_req_v1 ) returns (ban_resp_v1 );
398+ }
399+
400+ message ban_resp_v1 { uint64 timestamp_ms = 1 ; }
401+
402+ message ban_req_v1 {
403+ // Address of the hotspot being banned
404+ bytes hotspot_pubkey = 1 ;
405+ // Timestamp in milliseconds the message was sent
406+ uint64 timestamp_ms = 3 ;
407+ // Signer of the message
408+ bytes ban_pubkey = 5 ;
409+ bytes signature = 6 ;
410+
411+ oneof ban_action {
412+ ban_details_v1 ban = 7 ;
413+ unban_details_v1 unban = 8 ;
414+ }
415+ }
416+
417+ message ban_details_v1 {
418+ // Helpful to have for display purposes
419+ string hotspot_serial = 2 ;
420+ string message = 3 ;
421+ ban_reason reason = 4 ;
422+ ban_type ban_type = 5 ;
423+ // Timestamp in milliseconds that the ban should expire
424+ // if not replaced by a subsequent ban.
425+ // Note: 0 value means no expiration.
426+ uint64 expiration_timestamp_ms = 6 ;
427+ }
428+
429+ enum ban_reason {
430+ ban_reason_unknown = 0 ;
431+ ban_reason_location_gaming = 1 ;
432+ ban_reason_data_farming = 2 ;
433+ }
434+
435+ message unban_details_v1 {
436+ // Helpful to have for display purposes
437+ string hotspot_serial = 2 ;
438+ string message = 3 ;
439+ }
440+
441+ enum ban_type {
442+ // Banned from receiving POC and Data Transfer rewards
443+ all = 0 ;
444+ // Banned from receiving only POC
445+ poc = 1 ;
446+ // Banned from receiving only Data Transfer rewards
447+ data = 2 ;
448+ }
449+
450+ // All ban messages received by the Ingester.
451+ message ban_ingest_report_v1 {
452+ // Timstamp in milliseconds since unix epoch
453+ uint64 received_timestamp_ms = 1 ;
454+ ban_req_v1 report = 2 ;
455+ }
456+
457+ enum verified_ban_ingest_report_status {
458+ verified_ban_ingest_report_status_valid = 0 ;
459+ verified_ban_ingest_report_status_invalid_ban_key = 1 ;
460+ }
461+
462+ // Ban messages signed by a valid key in the Verifier.
463+ message verified_ban_ingest_report_v1 {
464+ // Timestamp in milliseconds the report was verified by oracles
465+ uint64 verified_timestamp_ms = 1 ;
466+ // The verified report
467+ ban_ingest_report_v1 report = 2 ;
468+
469+ verified_ban_ingest_report_status status = 3 ;
397470}
398471
399472message unique_connections_req_v1 {
@@ -857,6 +930,7 @@ message verified_data_transfer_ingest_report_v1 {
857930 invalid_gateway_key = 1 ;
858931 invalid_routing_key = 2 ;
859932 duplicate = 3 ;
933+ banned = 4 ;
860934 }
861935 data_transfer_session_ingest_report_v1 report = 1 ;
862936 report_status status = 2 ;
0 commit comments