Skip to content

Use maxmind to store node locations #2074

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

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Use maxmind to store node locations #2074

merged 1 commit into from
Jul 11, 2022

Conversation

softsimon
Copy link
Member

This PR only looks up and STORES location data for all the nodes.

New config option that defaults to disable:

MAXMIND: {
    ENABLED: boolean;
    GEOLITE2_CITY: string;
    GEOLITE2_ASN: string;
  },

New columns for the 'nodes' table is added and 1 new database table for the location info names are stored in a separate new table called geo_names.

@softsimon softsimon requested review from wiz and nymkappa July 11, 2022 15:56
@cla-bot cla-bot bot added the cla-signed label Jul 11, 2022
Copy link
Member

@wiz wiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK @ v2.5.0-dev [51949466]

root@localhost [mempool_mainnet_lightning]> select * from nodes where as_number = 397444 \G;
*************************** 1. row ***************************
     public_key: 03db10aa09ff04d3568b0621750794063df401e6853c79a21a83e1a3f3b5bfb0c8
     first_seen: 2021-08-01 08:18:16
     updated_at: 2022-07-10 08:38:03
          alias: ldk-ln-node.bitcoin.ninja
          color: #000000
        sockets: 69.59.18.80:9735,[2620:6e:a000:dead:0:babe:bad:cafe]:9735
      as_number: 397444
        city_id: 5128581
     country_id: 6252001
accuracy_radius: 100
 subdivision_id: 5128638
      longitude: -73.9664
       latitude: 40.7494
1 row in set (0.011 sec)

@wiz wiz merged commit 929a4b9 into master Jul 11, 2022
@wiz wiz deleted the simon/maxmind branch July 11, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy