{"id":13499321,"url":"https://github.com/cdecker/lseed","last_synced_at":"2025-08-02T01:11:45.994Z","repository":{"id":57502225,"uuid":"74777834","full_name":"cdecker/lseed","owner":"cdecker","description":"A DNS seed for the Lightning Network","archived":false,"fork":false,"pushed_at":"2020-04-13T20:44:46.000Z","size":23,"stargazers_count":17,"open_issues_count":1,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-01T18:12:27.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdecker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-25T17:44:42.000Z","updated_at":"2024-06-23T06:29:46.000Z","dependencies_parsed_at":"2022-09-13T07:02:03.800Z","dependency_job_id":null,"html_url":"https://github.com/cdecker/lseed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdecker%2Flseed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdecker%2Flseed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdecker%2Flseed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdecker%2Flseed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdecker","download_url":"https://codeload.github.com/cdecker/lseed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238720382,"owners_count":19519340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:00:32.193Z","updated_at":"2025-02-13T19:32:51.410Z","avatar_url":"https://github.com/cdecker.png","language":"Go","readme":"# lseed -- A Lightning DNS Seed\n\nUpon first joining the Lightning Network, a node must open a few connections to existing nodes in the network.\nHowever, it can only learn of nodes that are present in the network through its peers.\nThis Seed helps bootstrapping new nodes by indexing nodes that are present in the network and returning a random sample when queried.\n\nIn addition the seed provides a way to query for specific nodes, e.g., allowing nodes to quickly find their peers even though the switched IP or port.\n\n## Supported Queries\n\nGenerally this implementation supports both IPv4 and IPv6 queries, i.e., `A` and `AAAA` queries.\nIn addition it supports `SRV` queries that return a mix of IPv4 nodes and IPv6 nodes, and their associated `A` and `AAAA` answers.\n\n### A \u0026 AAAA Queries\n\nThe seed answers incoming `A` and `AAAA` queries with up to 25 known nodes in the network.\nThe nodes are filtered by their listening port, and only nodes that listen on the default Lightning port, 9735, are returned.\nThis is necessary since it is not possible to specify the port in `A` and `AAAA` answers.\n\n### SRV Queries\n\nUpon receiving an `SRV` query the seed will sample up to 25 nodes from the known nodes, regardless of their listening port, and return them, specifying an alias and the port.\nThe `SRV` query attempts to return a balanced set of IPv4 and IPv6 nodes.\n\nIn addition to the alias and port, the seed will also attach the matching `A` and `AAAA` records, such that a single query return both IP and port, and nodes may initiate connections without further queries.\n \n## Node Queries (A \u0026 AAAA)\n\nGiven the alias from the `SRV` queries, a client can also directly query for a specific node.\nIf the node's ID is `03edd9462482dbe1f1ea75db38a345c2b1d8a325c5c86f72aa9ea191a94be8b664` then the corresponding alias will be:\n\n    3edd9462482dbe1f1ea75db38a345c2b1d8a325c5c86f72aa9ea191a94be8b6.64.lseed.bitcoinstats.com\n\t\nThe leading `0` character is removed from the pubkey, and the pubkey is split into two chunks. The first chunk is 63 characters long, while the second chunk is 2 characters long.\nThe two chunks are then dot-separated and prefixed to the seed's domain, `lseed.bitcoinstats.com` in this case.\n\nThe answer contains the record matching the query, or the record of the other IP version type in the additional section if IP versions do not match. \n\n## Information Source\n\nCurrently the seed will poll a local Lightning node periodically and update its local view accordingly.\nIn future I'd like to introduce a number of different information sources and add further tests, such as testing for reachability before returning nodes.\n","funding_links":[],"categories":["Developer Resources"],"sub_categories":["Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdecker%2Flseed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdecker%2Flseed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdecker%2Flseed/lists"}