What is a Bitcoin Node? – Step by Step Explanation


(electronic sounds) – The Bitcoin Network consists
of a network of nodes, which are just computers or servers running the bitcoin software. The code ensures the nodes
can find and establish connection with other nodes and, hence, form a network that is
used by the various nodes to transfer information like transactions, blocks and other data. Through this web of interconnected nodes, bitcoin can send digital cash securely through the network. The underlying bitcoin code implements the bitcoin protocol. So how does a new node
join the Bitcoin Network? First, it must discover at least one peer to connect to and then it can get a list of other peers from that initial peer. There are a few methods
that a node can use to connect to its first peer. The Bitcoin Client
contains a hard-coded list of well-know DNS servers,
which can return a list of IP addresses of bitcoin nodes. Alternatively, the Bitcoin
Client can be given a static IP address of
a peer, if one is known. You can pass this IP
address as the parameter when starting the Bitcoin Client software through the command node. It’s important to note that
bitcoin’s network topology is not geographically defined, so the physical location of the nodes, in relation to one another, is irrelevant. This means a node can find
and connect to any other node, regardless of where it is in the world. Once a node has the IP address of a peer, it then goes through an initial handshake to establish a connection
with a remote note. First, the local node will
send a version message to the peer, which contains
some basic information about itself. This will always be the first message sent by any peer to another peer. The remote peer receiving
the message will examine if the sender’s version is
compatible with its own version. If it is, it will acknowledge
the version message and establish a connection by sending a version acknowledgement message, which consists only of a message header with the command string V-E-R-A-C-K. Once a node establishes
connection with one or more peers, it will exchange some
information with these peers. For example, nodes can
exchange IP addresses of their connected peers,
so each node can maintain a list of peers that it can
use to reestablish connection in the future, since
nodes can leave and join the network at any time. A node can ask its peers what the lengths of their local cog of the blockchain is. It can then determine if its
own cog of the blockchain is missing any blocks and if so, can ask its peers to
send the missing blocks. Of course, it can also
send blocks to other nodes, who do not have as much data as itself. Let’s take a closer look
at the various nodes in the network. Although all the nodes
participate in the network, they have different roles,
depending on the functionalities they want to support. There are four major functions: routing, storage, mining
and wallet services. That bitcoin core client
implementation in C++ has all four of these functionalities. Routing is the bare minimum functionality a node must support in
order to particpate in the Bitcoin Network. It contains the functionality
to discover and connect to other peers in the network and it also validates and propigates
transactions and blocks through the network. It serves the purpose of
keeping the network connection alive and passing information
through the network. A node is called a full
blockchain node if its stores a local copy of the entire
blockchain database. A full node can autonomously
and authoritatively verify any transactions without
any external references. With a full node, you
get complete independence and freedom from central
authority at the cost of hardware storage space. A mining node serves the
special purpose of creating a new block to add to the blockchain. Mining nodes run special mining software in order to solve a cryptographic puzzle to win mining rewards. They serve the purpose of
adding new transactions into the blockchain. Note that a mining node doesn’t
necessarily have to have a local copy of the entire blockchain. In that case, these nodes can connect to the bitcoin extended
network to join mining pools. They depend on a pool server
to maintain a full node and communicate necessary
information to them. Some nodes can also have a wallet service without a full copy of the blockchain and they’re called simplified
payment verification, or SPV, nodes. They are good for devices with
space and power constraints, such as mobile phones. The trade-off is relying on
other trustworthy full nodes to provide the necessary
information and, hence, less secure, compared to full
node, if the proper measures are not taken to ensure their security. If you want to learn more, I just launched a new Bitcoin 101 course
over at blockgeeks.com. We start simple with how bitcoin works, and before you know it, we’re teaching you how to build your own bitcoin wallet. Be sure to head over
there and check it out and thanks for watching.

4 thoughts on “What is a Bitcoin Node? – Step by Step Explanation”

Leave a Reply

Your email address will not be published. Required fields are marked *