HIP 93: location trust score implementation
andymck opened this issue · 9 comments
As per HIP93, after an initial assertion of its location during Wi-Fi access point onboarding, the system will periodically verify the access point's location. This is to prevent situations in which the Wi-Fi access point is onboarded in one location and then moved to a different location. In the current implementation the Location Validation service performs this verification twice per day. The timestamp of the last verification and the last derived lat/lng are subsequently included in the heartbeats submitted by the Wi-Fi access point to the Oracles.
The Mobile Verifier oracle as part of validating each heartbeat will validate the verified location and compare the provided lat/lng to the onchain asserted location and as per the rules defined in the HIP calculate a location trust score. In the current implementation, as the verified location can potentially change from one heartbeat to the next, the score is calculated and assigned on a per heartbeat basis. Then at the time of rewards calculation the Mobile Verifier oracle will take an average of the location trust scores assigned to the verified heartbeats and this averaged score will form the location trust score multiplier for the Wi-Fi access point for that epoch.
This average approach was chosen as the go-live solution. Other alternative solutions to determining the location trust score are listed below for discussion:
A. Use the median of the location trust scores calculated per heartbeat for the current epoch
B. Use the mode of the location trust scores calculated per heartbeat for the current epoch
C. Use the best case location trust score calculated per heartbeat for the current epoch
D. Use the worst case location trust score calculated per heartbeat for the current epoch
E. Use the most recent location trust score calculated per heartbeat for the current epoch
F. Other ?
Example Heartbeats
The example below illustrates the location trust score calculated for 24 heartbeats received from an access point over the course of one epoch.
heartbeat_number | assigned location trust score |
---|---|
1 | 0.25 |
2 | 0.25 |
3 | 0.25 |
4 | 0.25 |
5 | 0.25 |
6 | 0.25 |
7 | 0.25 |
8 | 0.25 |
9 | 0.25 |
10 | 0.25 |
11 | 1.0 |
12 | 1.0 |
13 | 1.0 |
14 | 1.0 |
15 | 1.0 |
16 | 1.0 |
17 | 1.0 |
18 | 1.0 |
19 | 1.0 |
20 | 1.0 |
21 | 1.0 |
22 | 1.0 |
23 | 1.0 |
24 | 1.0 |
Example Location Trust Scores
Based on the above heartbeats, the final location trust scores that would be utilzed during rewards for each listed solution would be as follows:
solution | location trust score |
---|---|
Average | 0.6875 |
Median | 1.0 |
Mode | 1.0 |
Best case | 1.0 |
Worst case | 0.25 |
Most Recent | 1.0 |
Removed and moved to HIP 97 channel
@heatedlime this is not quite the same as the HIP97 confidence level, though it's easy to confuse the two. Let's take it back into the HIP channel instead of hijacking this HIP93 clarification
Got it. @heatedlime you often have good opinions on this. Do you want this to be a separate HIP, rolled into HIP-98 and voted on.
Alternatively, this could be brought to the entire MWG.
Sorry for the late note here.
Got it. @heatedlime you often have good opinions on this. Do you want this to be a separate HIP, rolled into HIP-98 and voted on.
Alternatively, this could be brought to the entire MWG.
Sorry for the late note here.
- I don't believe this is a separate HIP.. they were just unclear specifications in this particular HIP
- This was already brought to the MWG but kept falling of the agenda or just not addressed in discord. No big deal since they're technically implementation clarifications with no objections.
- This is already deployed in production
@andymck I'm going to add how it's currently working into HIP 98, which will formalize it. Anyway you can send me the tables in markup format so I don't have to re-create them? I'm having a hard time trying to view your post's raw data.
@andymck I'm going to add how it's currently working into HIP 98, which will formalize it. Anyway you can send me the tables in markup format so I don't have to re-create them? I'm having a hard time trying to view your post's raw data.
should this not be a clarification change to hip93 since it's not explicitly stated how trust score is selected? Because otherwise what would happen if hip 98 doesn't pass
After discussion with the foundation, they were most comfortable including this in HIP 98. In the future, the Governance Committee should be able to approve these changes without a HIP. A new PR was created with the update.