Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node location varies for nodes registered in Netherlands. #3021

Open
TullysInc opened this issue Jun 24, 2024 · 7 comments
Open

Node location varies for nodes registered in Netherlands. #3021

TullysInc opened this issue Jun 24, 2024 · 7 comments
Assignees
Milestone

Comments

@TullysInc
Copy link

  • There seems to be a difference in country name under location details for nodes registered in Netherlands. This appears to result in an issue when filtering Node IDs via country = Netherlands.

  • See input for the Farm IDs: 244 & 2995.

  • Farm ID 244: location for node ID_865 under this farm is captured as “Netherlands”, however, the remaining nodes under the same farm show = The Netherlands.

image

image

  • Farm ID 2995: all nodes under this Farm are indicating the location as The Netherlands.

  • In both cases we’re unable to filter down these nodes by country.

@scottyeager
Copy link
Contributor

I reviewed the list of all countries associated with nodes in GraphQL. There's another example of concern, which is "Turkey" vs "Türkiye". Here's an example node that is not getting associated with a country code or assigned a flag because it's country is Türkiye:

image

@ramezsaeed ramezsaeed added this to 3.15.x Jul 1, 2024
@ramezsaeed ramezsaeed added this to the 2.6.0 milestone Jul 1, 2024
@0oM4R 0oM4R moved this to Accepted in 3.15.x Jul 30, 2024
@0oM4R 0oM4R self-assigned this Aug 7, 2024
@0oM4R 0oM4R moved this from Accepted to In Progress in 3.15.x Aug 7, 2024
@0oM4R
Copy link
Contributor

0oM4R commented Aug 7, 2024

for dev net after checking the https://gridproxy.dev.grid.tf/stats
do we have multiple names for Egypt and others
Screenshot from 2024-08-07 15-19-45

for main net we have The Netherlands only and we are expecting Netherlands
check https://gridproxy.grid.tf/stats
image

QA net
image

test net
image

we can add hard coded solution, by replace turkey countries, or collect the other countries under Others
I suggest having Unicode or adding validation to create farms

@0oM4R
Copy link
Contributor

0oM4R commented Aug 11, 2024

After some investigation: we assume that the wheresiip database got updated, with new country names as both of gridproxy and graphql shows the same node location, also those values are just readable values of tfchain value
Screenshot from 2024-08-07 17-55-50
image

so we have three suggestion:

  1. update location value on the node: Recomended
    On an event on the node we can call the geoip service and check if it matches the stored value, if no will update the node location.

  2. Map the country names in GraphQL:
    on create node, GraphQL should use the longitude and latitude to set the country name using another service, so we will ignore the country and city fields from the chain and will overwrite it, and we can also add country code to manage regions in gridproxy

  3. Map the country names in GridProxy:
    using the longitude and latitude to set the county name, and use the output location to map the country name from Counties table in graphQL

@xmonader
Copy link
Contributor

Let's go with option 2

@0oM4R
Copy link
Contributor

0oM4R commented Aug 18, 2024

After some investigation: we assume that the wheresiip database got updated, with new country names as both of gridproxy and graphql shows the same node location, also those values are just readable values of tfchain value Screenshot from 2024-08-07 17-55-50 image

so we have three suggestion:

  1. update location value on the node: Recomended
    On an event on the node we can call the geoip service and check if it matches the stored value, if no will update the node location.
  2. Map the country names in GraphQL:
    on create node, GraphQL should use the longitude and latitude to set the country name using another service, so we will ignore the country and city fields from the chain and will overwrite it, and we can also add country code to manage regions in gridproxy
  3. Map the country names in GridProxy:
    using the longitude and latitude to set the county name, and use the output location to map the country name from Counties table in graphQL

After discution with @AhmedHanafy725 and @sameh-farouk , we think the second solution will not solve the problem, which is that MaxMind will have some updates, so we can't rely even on the lat/longitude of the node.
for example:
image

in MMDB each network is associated with geoname_id and some coordinates , but what if the network location got updated? the geoname_id and the coordinates will got updated, so any new node on that network will have the new coordinates, and the old nodes will still have the same coordinates ==> we have two nodes from the same network that appear on two different locations.

so we think the first solution is better, @xmonader what do you think?

@0oM4R
Copy link
Contributor

0oM4R commented Nov 5, 2024

threefoldtech/tfgrid-sdk-go#1248

@AhmedHanafy725 should we close this now ?

@AhmedHanafy725
Copy link
Contributor

@AhmedHanafy725 should we close this now?

no

@AhmedHanafy725 AhmedHanafy725 removed this from 3.15.x Nov 13, 2024
@AhmedHanafy725 AhmedHanafy725 modified the milestones: 2.6.0, 2.7.0 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants