Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: PhoenixEmpire on July 21, 2018, 04:46:22 PM



Title: What are seed nodes?
Post by: PhoenixEmpire on July 21, 2018, 04:46:22 PM
I have red in some forum discussions but I haven't exactly understood it.

Can someone explain seednodes technically?

I have a good knowledge on how Blockchain works, what are nodes, consensus algorithm etc etc...


Title: Re: What are seed nodes?
Post by: achow101 on July 21, 2018, 06:38:34 PM
Seed nodes are nodes that generally have a high uptime and have had many connections to many other nodes. They are used by nodes that are first joining the network to get a list of other nodes to connect to. The DNS Seeders give out lists of seed nodes and there are also some hard coded fallback seed nodes in Bitcoin Core to be used if the DNS Seeders are unavailable.

It is important to note that nodes do not connect to seed nodes as a normal node. Rather they connect, request IP addresses of other nodes (using the getaddr message) and then disconnect. Nodes then connect to the nodes that were given in the addr message (the response to getaddr).


Title: Re: What are seed nodes?
Post by: JostikSSS on July 21, 2018, 07:32:59 PM
I have red in some forum discussions but I haven't exactly understood it.

Can someone explain seednodes technically?

I have a good knowledge on how Blockchain works, what are nodes, consensus algorithm etc etc...

There are two types of seed DNS seeds and seed nodes as you have defined. DNS segments are stored in chainparams.cpp. To date, this file lists the following nodes.

seed.bitcoin.sipa.be
dnsseed.blue meat.me
dnsseed.bitcoin.dashjr.org
seed.bitcoinstats.com
seed.bitcoin.jonasschnelli.ch
seed.btc.petertodd.org
I ran nslookup on these DNS names and they return a list of IP addresses (14-26) that seemed to run bitcoin nodes.

There is also the concept of seed nodes, which are hard-coded IP addresses in case someone encounters a DNS failure or other problem. These nodes are connected only if the other discovery mechanism does not work.


Title: Re: What are seed nodes?
Post by: PhoenixEmpire on July 21, 2018, 07:45:02 PM
Seed nodes are nodes that generally have a high uptime and have had many connections to many other nodes. They are used by nodes that are first joining the network to get a list of other nodes to connect to. The DNS Seeders give out lists of seed nodes and there are also some hard coded fallback seed nodes in Bitcoin Core to be used if the DNS Seeders are unavailable.

It is important to note that nodes do not connect to seed nodes as a normal node. Rather they connect, request IP addresses of other nodes (using the getaddr message) and then disconnect. Nodes then connect to the nodes that were given in the addr message (the response to getaddr).

From what I understood DNS seeders act as a watch tower constantly looking and recording the nodes that run Bitcoin client that has highup time and lots of connections.

So once a new node joins the network, it requests latest node list from the DNS nodes.

And if the DNS nodes failed to deliver the node list, there is a fallback seed node list hard-coded into Bitcoin Client.

I am just trying to put it into simpler terms  ;D

So the fallback seed nodes are there for emergency use only. And they have to be updated regularly over time. right?


Title: Re: What are seed nodes?
Post by: alexrossi on July 21, 2018, 08:07:14 PM
From what I understood DNS seeders act as a watch tower constantly looking and recording the nodes that run Bitcoin client that has highup time and lots of connections.


AFAIK they aren't acting as a watch tower, they are just domains with A records updated manually, that provides IP addresses of well-connected, but arbitrary chosen nodes.


Title: Re: What are seed nodes?
Post by: PhoenixEmpire on July 21, 2018, 09:09:07 PM
From what I understood DNS seeders act as a watch tower constantly looking and recording the nodes that run Bitcoin client that has highup time and lots of connections.


AFAIK they aren't acting as a watch tower, they are just domains with A records updated manually, that provides IP addresses of well-connected, but arbitrary chosen nodes.

Ah makes sense, I also took a quick look into the hard-coded DNS domains
https://github.com/bitcoin/bitcoin/blob/07ce278455757fb46dab95fb9b97a3f6b1b84faf/src/chainparams.cpp#L132

from the comments I see each domain is maintained by a Bitcoin developer.


Title: Re: What are seed nodes?
Post by: achow101 on July 24, 2018, 01:22:00 PM
From what I understood DNS seeders act as a watch tower constantly looking and recording the nodes that run Bitcoin client that has highup time and lots of connections.

So once a new node joins the network, it requests latest node list from the DNS nodes.

And if the DNS nodes failed to deliver the node list, there is a fallback seed node list hard-coded into Bitcoin Client.

I am just trying to put it into simpler terms  ;D

So the fallback seed nodes are there for emergency use only. And they have to be updated regularly over time. right?
Yes

AFAIK they aren't acting as a watch tower, they are just domains with A records updated manually, that provides IP addresses of well-connected, but arbitrary chosen nodes.
There is a server that allows the DNS records to change. In order to get nodes to provide as the A records, the DNS seeder also runs a crawler which searches for nodes and checks their uptimes, etc.


Title: Re: What are seed nodes?
Post by: brolekset on August 03, 2018, 02:28:32 PM
There are two types of seeds of DNS seeds and seed nodes, as you have determined. DNS segments are stored in chainparams.cpp all "seed nodes" refer to known clients (or suspects) bitcoins, which can be more or less constant. The DNS seed nodes are those that were obtained through a DNS lookup; others through their IP address. A more thorough answer (including other initial methods of connecting the "initial boot" than these hard-coded seeds) was given to another question.