From b62db443d5771d961947fdaecf37bb3717349239 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Thu, 17 Aug 2023 10:07:32 +0100 Subject: [PATCH 1/5] support invalid details for invalid beacons and witnesses --- src/service/poc_lora.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/service/poc_lora.proto b/src/service/poc_lora.proto index 7b9374b5..ff5727d2 100644 --- a/src/service/poc_lora.proto +++ b/src/service/poc_lora.proto @@ -160,6 +160,9 @@ message lora_invalid_beacon_report_v1 { /// The asserted elevation of the gateway in AGL ( above ground level) /// derived from gateway metadata int32 elevation = 6; + // provides any additional context for invalid reason + // for example the deny list version used as part of the deny list check + string invalid_details = 7; } // tagged invalid witness report produced by the verifier @@ -171,6 +174,9 @@ message lora_invalid_witness_report_v1 { // the participant to which the reason applies, // which rendered the report as invalid invalid_participant_side participant_side = 4; + // provides any additional context for invalid reason + // for example the deny list version used as part of the deny list check + string invalid_details = 5; } // tagged verified witness report produced by the verifier @@ -196,6 +202,9 @@ message lora_verified_witness_report_v1 { /// The asserted elevation of the gateway in AGL ( above ground level) /// derived from gateway metadata int32 elevation = 10; + // provides any additional context for invalid reason + // for example the deny list version used as part of the deny list check + string invalid_details = 11; } // POC report produced by the verifier From b8160d40ce3f0c4ce3ba5a305dccfed5707dbaf1 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Thu, 17 Aug 2023 15:51:49 +0100 Subject: [PATCH 2/5] switch to a oneof --- src/service/poc_lora.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/poc_lora.proto b/src/service/poc_lora.proto index ff5727d2..6c315237 100644 --- a/src/service/poc_lora.proto +++ b/src/service/poc_lora.proto @@ -162,7 +162,7 @@ message lora_invalid_beacon_report_v1 { int32 elevation = 6; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - string invalid_details = 7; + oneof invalid_details { string denied = 7; } } // tagged invalid witness report produced by the verifier @@ -176,7 +176,7 @@ message lora_invalid_witness_report_v1 { invalid_participant_side participant_side = 4; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - string invalid_details = 5; + oneof invalid_details { string denied = 5; } } // tagged verified witness report produced by the verifier @@ -204,7 +204,7 @@ message lora_verified_witness_report_v1 { int32 elevation = 10; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - string invalid_details = 11; + oneof invalid_details { string denied = 11; } } // POC report produced by the verifier From 8576f0feda3110ce5f3a97421a7e9b28cc7e120d Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Thu, 17 Aug 2023 16:00:44 +0100 Subject: [PATCH 3/5] dedicated invalid details message type --- src/service/poc_lora.proto | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/service/poc_lora.proto b/src/service/poc_lora.proto index 6c315237..eb5b7e41 100644 --- a/src/service/poc_lora.proto +++ b/src/service/poc_lora.proto @@ -145,6 +145,10 @@ message lora_valid_witness_report_v1 { uint32 reward_unit = 5; } +message invalid_details { + oneof data { string denied = 1; } +} + // tagged invalid beacon report produced by the verifier message lora_invalid_beacon_report_v1 { // Timestamp at ingest in millis since unix epoch @@ -162,7 +166,7 @@ message lora_invalid_beacon_report_v1 { int32 elevation = 6; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - oneof invalid_details { string denied = 7; } + invalid_details invalid_details = 7; } // tagged invalid witness report produced by the verifier @@ -176,7 +180,7 @@ message lora_invalid_witness_report_v1 { invalid_participant_side participant_side = 4; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - oneof invalid_details { string denied = 5; } + invalid_details invalid_details = 5; } // tagged verified witness report produced by the verifier @@ -204,7 +208,7 @@ message lora_verified_witness_report_v1 { int32 elevation = 10; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - oneof invalid_details { string denied = 11; } + invalid_details invalid_details = 11; } // POC report produced by the verifier From d9d56fe227b21302e6c99c2aea63f95765492d49 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Thu, 17 Aug 2023 16:47:24 +0100 Subject: [PATCH 4/5] review tweaks --- src/service/poc_lora.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/service/poc_lora.proto b/src/service/poc_lora.proto index eb5b7e41..2311fbc2 100644 --- a/src/service/poc_lora.proto +++ b/src/service/poc_lora.proto @@ -146,7 +146,7 @@ message lora_valid_witness_report_v1 { } message invalid_details { - oneof data { string denied = 1; } + oneof data { string denylist_tag = 1; } } // tagged invalid beacon report produced by the verifier @@ -166,7 +166,7 @@ message lora_invalid_beacon_report_v1 { int32 elevation = 6; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - invalid_details invalid_details = 7; + invalid_details details = 7; } // tagged invalid witness report produced by the verifier @@ -180,7 +180,7 @@ message lora_invalid_witness_report_v1 { invalid_participant_side participant_side = 4; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - invalid_details invalid_details = 5; + invalid_details details = 5; } // tagged verified witness report produced by the verifier @@ -208,7 +208,7 @@ message lora_verified_witness_report_v1 { int32 elevation = 10; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - invalid_details invalid_details = 11; + invalid_details details = 11; } // POC report produced by the verifier From 94ae5c44fa84e7b95e2cdc0b5a78afb7e94409b2 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Thu, 17 Aug 2023 16:52:05 +0100 Subject: [PATCH 5/5] revert to invalid_details naming --- src/service/poc_lora.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/poc_lora.proto b/src/service/poc_lora.proto index 2311fbc2..f2005ce2 100644 --- a/src/service/poc_lora.proto +++ b/src/service/poc_lora.proto @@ -166,7 +166,7 @@ message lora_invalid_beacon_report_v1 { int32 elevation = 6; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - invalid_details details = 7; + invalid_details invalid_details = 7; } // tagged invalid witness report produced by the verifier @@ -180,7 +180,7 @@ message lora_invalid_witness_report_v1 { invalid_participant_side participant_side = 4; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - invalid_details details = 5; + invalid_details invalid_details = 5; } // tagged verified witness report produced by the verifier @@ -208,7 +208,7 @@ message lora_verified_witness_report_v1 { int32 elevation = 10; // provides any additional context for invalid reason // for example the deny list version used as part of the deny list check - invalid_details details = 11; + invalid_details invalid_details = 11; } // POC report produced by the verifier