Author

Topic: Network - Calling Blocks (Read 127 times)

newbie
Activity: 3
Merit: 0
April 12, 2018, 06:33:26 PM
#6
Thank you  Smiley
legendary
Activity: 3472
Merit: 4801
April 12, 2018, 06:27:30 PM
#5
So it's a unicast?
In that case, shouldn't there be a DNS type of thing which hold the address for the nodes so that each individual node can contact other nodes and not broadcast it?

Correct.

Each node software creator is allowed to use whatever method they like to find and keep track of the IP addresses and port numbers of other nodes

Bitcoin Core keeps a list of all the other nodes that it has connected or is aware of from the past.

When a Bitcoin Core node first connects to another node, it immediately uses a "getaddr" message to ask that node for a list of all the IP addresses and ports that node knows about, and it adds them to ts own list.

During the very first time that a node powers up, there is a node discovery process that it uses to find out about some Bitcoin Nodes.  You can read about that process here:
https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery
newbie
Activity: 3
Merit: 0
April 12, 2018, 06:00:21 PM
#4
So it's a unicast?
In that case, shouldn't there be a DNS type of thing which holds the address for the nodes so that each individual node can contact other nodes and not broadcast it?
legendary
Activity: 3472
Merit: 4801
April 12, 2018, 10:11:45 AM
#3
The term "broadcast" is used loosely around here to describe the process of a node sharing information with other nodes.

Technically, a bitcoin node never "broadcasts" anything to the entire network (nor even to a set of multiple nodes).

A Bitcoin node establishes a direct connection to another node.
The bitcoin node might only establish one such connection, or it could establish similar direct connections to many different nodes.

When a "getblocks" message is sent, it is sent over a direct connection.  The node could choose to only send that on one of the connections, meaning that only 1 connected peers would receive that message, or it could choose to send the message across multiple connections (reaching 1 additional node for each additional connection that it sends the message across.

It is up to the node software to decide how many of the connected nodes (and which of the connected nodes) to send the getblocks messages to.  If it is getting blocks from a single connection faster than it can process them, then it may not request from additional nodes.  If a node is receiving some bad blocks on a connection, or is receiving blocks slower than it can process them then it may send additional getblocks messages across other connections to increase the speed and quantity of good blocks (and may even disconnect the slow connection or the connection to the peer with the bad blocks.
member
Activity: 61
Merit: 15
April 12, 2018, 02:12:17 AM
#2
When a node sends GetBlocks, it includes hashes of its local blocks, so that the peers can find out from which point the sending node is behind, also it does not reply with block data, it replies with hashes of the blocks that the node is missing. When the node receives the hashes, it can request block data from peers with GetData messages.
newbie
Activity: 3
Merit: 0
April 11, 2018, 10:41:17 PM
#1
Hello,

I've been thinking about this for a while and can't seem to understand part of the network. Lets assume that I'm a node that has been offline for 5 months and I want to retrieve the new blocks, when I broadcast the getblocks message different nodes see it, so does that mean that they all respond or do some of them respond and the others ignore it because of the other responses? and if they all respond back, would my node then choose which one/ones it wants to get the data from, or would it get the data from all of them? If it gets the data from all of them then wouldn't that slow the system down a lot and create a lot more traffic on the network?
Generally, what I don't understand is if a node wants older blocks or the whole blockchain for that matter, what are the communications, it's just a bad system if all of the nodes respond with the whole blockchain and if it's selecting a node then how would the selection work?

Thank you in advance
Jump to: