Author

Topic: How do wallets connect to nodes? (Read 790 times)

newbie
Activity: 19
Merit: 0
April 22, 2013, 07:53:15 PM
#12
The system still isn't fully decentralized, though. If it was, there would need to be a sort of distributed peer tracker(akin to torrent DHT). Still, there's no true way to bootstrap without a seed node unless one were to try scanning the entire IPv4 internet for nodes.

Well if I am understanding this correctly you do not have to go through the nodes listed in the source code. You can easily specify a different node. This list of nodes however makes it easier for new users to get connected by having several connections ready to connect to. From what I understand it is still completely decentralized. You do not have to use bitcoin-qt. There are other wallets. Therefore, if you think bitcoin-qt is promoting a bad blockchain, then you use a different client. If you think a certain node is promoting a bad blockchain you can specify to connect to a different node.
However, there is no reason to think that any of the nodes or bitcoin-qt are doing anything wrong so it is easier for simplicity. The moment someone discovers something is wrong, there will be a big outcry. Things will get fixed or worked around.

I hope I got it right and it makes sense. Please, correct any mistakes.
hero member
Activity: 784
Merit: 500
April 22, 2013, 04:44:41 PM
#11
The system still isn't fully decentralized, though. If it was, there would need to be a sort of distributed peer tracker(akin to torrent DHT). Still, there's no true way to bootstrap without a seed node unless one were to try scanning the entire IPv4 internet for nodes.
sr. member
Activity: 448
Merit: 254
April 22, 2013, 04:42:09 PM
#10
For accuracy, I just checked the FAQ entry I originally linked, and it also says "each node saves a database of peers that it's aware of, for future use."  So DDoSing those DNS servers wouldn't hurt many users.
legendary
Activity: 3472
Merit: 4801
April 22, 2013, 04:00:42 PM
#9
- snip -
Would it be possible to DDoS all these and cripple everything?  Or am I missing something

- snip -

Only people connecting to the network for the first time would be catastrophically affected.

- snip -

The addresses are saved, in either peers.dat or addr.dat (peers in newer versions).  The bootstrapping/seed process is only used if the file doesn't exist or none of the nodes in it can be connected to.  And once you've connected to a node you get a list of all the nodes it knows about, and you remember them in peers.dat.

- snip -

newbie
Activity: 56
Merit: 0
April 22, 2013, 03:41:34 PM
#8
https://en.bitcoin.it/wiki/FAQ#How_does_the_peer_finding_mechanism_work.3F

Current DNS names in the source code:

seed.bitcoin.sipa.be
dnsseed.bluematt.me
dnsseed.bitcoin.dashjr.org
bitseed.xf2.org

There are also hard-coded seed node IP addresses (in hexadecimal form) in case DNS and IRC fail or the user configures not to use them.

Would it be possible to DDoS all these and cripple everything?  Or am I missing something
sr. member
Activity: 448
Merit: 254
April 22, 2013, 03:39:17 PM
#7
and if it is to be changed (the dns), how and who would make such a change?? i don't understand very well

I think all those DNS names are controlled by core Bitcoin developers sipa, BlueMatt, Luke-Jr, and jgarzik (who seems to own xf2.org).  So they would each have to make the change.  I don't know the procedure, or how often it is updated, which nodes they put on those lists, etc.

The bootstrap process finds nodes in many channels such as irc, dns. They are hardcoded though, if they all are taken down at once, the network dies.

Only people connecting to the network for the first time would be catastrophically affected.  Actually, I just found that IRC seeding has been removed.  It is unlikely that 4 different DNS servers on 3 top-level domains would all be out.  And if they are, there are also dozens of hardcoded seed IP addresses that are contacted, so those would also all have to be down.  I don't know how those seeds were chosen, but I trust it's a pretty solid selection.  Really, if it's that bad, you may as well say there's no Bitcoin network left to connect to anyway.  Also, as long as you can manually find one peer's IP address, you can use that to find everyone else it knows about.

So, once a wallet connects to the nodes specified in the source code it receives a list of all other known nodes. Does the wallet save all of these addresses or does it just download them each time it connects?
Downying seems to say that if all of the hardcoded nodes leave at once no one can connect? In other words the wallet does not save addresses. Is that accurate?

The addresses are saved, in either peers.dat or addr.dat (peers in newer versions).  The bootstrapping/seed process is only used if the file doesn't exist or none of the nodes in it can be connected to.  And once you've connected to a node you get a list of all the nodes it knows about, and you remember them in peers.dat.

If necessary, I believe you can also configure specific addresses that you want to connect to in a ".conf" file of some sort?

Yes, if you run bitcoin-qt --help you can see all the configuration options, which can be specified on the commandline or in the .conf file.  There is -connect (connect only to the specified nodes) and -seednode (use the specified node to get a list of nodes to connect to) that I see being relevant to this, maybe more I missed.
legendary
Activity: 3472
Merit: 4801
April 22, 2013, 10:42:20 AM
#6
If necessary, I believe you can also configure specific addresses that you want to connect to in a ".conf" file of some sort?
newbie
Activity: 19
Merit: 0
April 22, 2013, 09:39:43 AM
#5
https://en.bitcoin.it/wiki/FAQ#How_does_the_peer_finding_mechanism_work.3F

Current DNS names in the source code:

seed.bitcoin.sipa.be
dnsseed.bluematt.me
dnsseed.bitcoin.dashjr.org
bitseed.xf2.org

There are also hard-coded seed node IP addresses (in hexadecimal form) in case DNS and IRC fail or the user configures not to use them.

So, once a wallet connects to the nodes specified in the source code it receives a list of all other known nodes. Does the wallet save all of these addresses or does it just download them each time it connects?
Downying seems to say that if all of the hardcoded nodes leave at once no one can connect? In other words the wallet does not save addresses. Is that accurate?
member
Activity: 68
Merit: 10
April 22, 2013, 02:27:20 AM
#4
The bootstrap process finds nodes in many channels such as irc, dns. They are hardcoded though, if they all are taken down at once, the network dies.
newbie
Activity: 6
Merit: 0
April 22, 2013, 01:01:33 AM
#3
and if it is to be changed (the dns), how and who would make such a change?? i don't understand very well
sr. member
Activity: 448
Merit: 254
April 22, 2013, 12:05:51 AM
#2
https://en.bitcoin.it/wiki/FAQ#How_does_the_peer_finding_mechanism_work.3F

Current DNS names in the source code:

seed.bitcoin.sipa.be
dnsseed.bluematt.me
dnsseed.bitcoin.dashjr.org
bitseed.xf2.org

There are also hard-coded seed node IP addresses (in hexadecimal form) in case DNS and IRC fail or the user configures not to use them.
newbie
Activity: 19
Merit: 0
April 21, 2013, 11:41:07 PM
#1
Hello all,
I have been watching and learning about bitcoin for a short while now. I think I understand the basics of bitcoin. However, I do not understand how my wallet (or anyone's for that matter) connects to the network. Is there a default list of connections that the wallet connects to? Or what is going on here?
For some reason this small part is really bugging me.

-bitcoinrevelacio
Jump to: