Author

Topic: How do nodes connect to each other? (Read 160 times)

legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
October 20, 2019, 10:51:51 AM
#7
Why using both v4 and v6?

it is a networking thing, not everyone has adopted IPV6 yet (in fact according to google only 26% of the world is using it right now) but it is recommended to move to V6 because of V4 exhaustion, so if you have it you must advertise that but to let those who don't have it you must also advertise V4.
i believe what bitcoin does is that it mapps all IP addresses to V6 so it can show you both at the same time.
newbie
Activity: 6
Merit: 0
October 20, 2019, 10:28:42 AM
#6
Just weirded me out that Client A has an IPv4 and IPV6 and so does Client B. In client A i can see two IPs one v4 and v6 and both belong to client B and the same at client B I can see clients A v4 and v6 IPs. Why using both v4 and v6?
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
October 20, 2019, 10:14:55 AM
#5
I have two clients on the same wifi network and they connect to each other via IPv4 and IPv6 how the hell is that possible?

if they are actually connected over the internet (not through any other way) then it is not surprising really. every client has an IP address that it broadcasts to others as it connects to any other node through a version message. then others send its IP to other nodes and that way it propagates. so your other client eventually finds out about that IP, most likely right away if both are connected to same node(s) and attempts connecting to that IP.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
October 20, 2019, 10:12:09 AM
#4
I have two clients on the same wifi network and they connect to each other via IPv4 and IPv6 how the hell is that possible?

If they both have the longest chain or one has a chain longer than the other then they are the fastest for a connection. Every so often other nodes they are connected to might get pinged too.

Generally if you have a fast switch/modem the lung speed should be less than 1ms and the rate data can be transferred at between them should obviously be higher.

I'm not sure if there's something bitcoin core uses that scans the home network for anything that it can connect to (it'd normally just have to ping 192.168.0.255 for a response from anything that can accept a connection and understand the packet sent to it).
newbie
Activity: 6
Merit: 0
October 20, 2019, 09:58:15 AM
#3
I have two clients on the same wifi network and they connect to each other via IPv4 and IPv6 how the hell is that possible?
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
October 20, 2019, 08:29:59 AM
#2
Bitcoin node software comes with a predetermined list of nodes that should be avaliable when the software is run.

After the initial run, the software asks those nodes for a list of recommended nodes (which has to be less than 1000) it adds these modes to peers.dat and picks the fastest few to connect to (normally 8 or so) it wants the one with the longest chain too so that it knows its up to date. So if a node has a lower speed but a longer chain it may download the next block from it and connect to it rather than the fastest node in order to stay up to date...

When the node is turned on again, it scans its peers.dat and checks the connections that are still active from it.
newbie
Activity: 6
Merit: 0
October 20, 2019, 08:23:20 AM
#1
Clients connect to SeedDNS and connect to nodes but how do nodes connect to each other?
Jump to: