Here is a short post that tries to explain the theoretical concept of the nodes and the masternodes in blockchain technology. How can we participate and what kind of typical tasks they perform?
A node in a blockchain usually refers to a computer that has downloaded the relevant cryptocurrency (bitcoin, Ethereum, Monero, etc.) software to participate in a specific peer-to-peer network or blockchain.
The infrastructure of the cryptocurrency blockchain is the network architecture between peers (P2P). P2P means that all participating computers in the network are equal to each other. The word P2P is nothing new. The first large-scale use of P2P networks was done by the music file sharing network Napster.
Although the Napster network is not complicated at all (just a file sharing protocol), its basic principle is the same as the current blockchain network. In this sense, the oldest P2P network, similar to the current blockchain work, is the SETI @HOME network. SETI @HOME is a computer network created by SETI to analyze data from radio telescopes around the world, analyze data from radio telescopes, and find intelligent life in the galaxy. Whoever wishes to participate in this network, just download the software from its official website and execute it.
Thus, in a P2P network, each computer participating in the network can receive the name of the node. In the network, all nodes are responsible for providing network services. This is because of the interconnectivity of network nodes, allowing for interoperability.
A blockchain network refers to a set of nodes that perform a given blockchain P2P protocol. The entire network orchestrates and coordinates the operations each user does on the network in a fully integrated, decentralized, and distributed approach. This means that computer networks around the world can continuously transfer/broadcast new transactions to each other. Each computer in this network is a node that has downloaded the complete blockchain. In this way, the network becomes redundant, and the collaborative work makes it extremely scalable in terms of expansion.
Due to the decentralization of the blockchain, anyone is free to participate. Just download the node software and execute it. Typically, this feature is supported by the main wallet for each project. Initially, the network starts from the origin of the blockchain until it is synchronized with the network. At this point, the node is fully operational, allowing not only validation of the transaction, but also the overall snapshot of the blockchain. Usually, nodes can perform the following functions: routing, blockchain database, mining, and wallet services.
These nodes are a single part of the largest data structure of a blockchain. When node owners voluntarily contribute their own computing resources to store and verify transactions, they have the opportunity to charge transaction fees and receive rewards in potential cryptocurrencies.
Handling these transactions may require a lot of computation and processing power, which means that the average power of the computer is not sufficient. In general, professional miners tend to invest in very powerful computing devices such as CPUs (Central Processing Units) or GPUs (Graphics Processing Units) to meet the processing power required for verification transactions, thereby obtaining corresponding s return.
A node can be a communication endpoint or a redistribution point for communication, linking to other nodes. Each node in the network is considered equal, but some nodes play different roles in supporting the network. For example, not all nodes store a complete copy of the blockchain.
A complete node downloads an entire copy of a blockchain and checks for new transactions based on the consensus protocol used by that particular cryptocurrency or utility token. All nodes use the same consensus protocol to maintain compatibility. The nodes in the network are responsible for validating and verifying the transactions and putting them into blocks. For a transaction to be valid and whether it should be added to a block with other transactions, the node can always draw its own conclusions no matter how other nodes act.
The Basic Function Of Nodes
When a digger or user attempts to add a new transaction block to the blockchain through a certain mechanism of the protocol, it transmits the block to all nodes of the network. Depending on the legitimacy of the block (signature and validity of the transaction), the node can accept or reject the block. When a node accepts a new transaction block, it saves it and stores it on other blocks it already stores. In summary, the role of the node is:
They can check if a transaction block is valid and accept or reject it. Store and store transaction blocks (storage blockchain transaction history). This transaction history is transferred and extended to other nodes that may need to be synchronized with the blockchain (they must be updated in the transaction history).
Category of nodes
In a blockchain network, traditionally there are three types of nodes that provide different functions in the network. These node types are:
Broadcast nodes: They only issue transactions and receive blockchain information from third parties. They follow the most powerful mining power, known as light wallets, and are widely used in mobile devices or simply by people who don’t want to download the entire blockchain.
Complete node: Install complete node software, such as Bitcoin Core, in addition to having the most secure wallet, it will also download a copy of the blockchain and become a node in the Bitcoin network. Therefore, you will issue a transaction, propagate the rest of the network, and verify that the consistent rules are met.
Mining nodes: In addition to operating their favorite software miners (BTCMiner, CGMiner), the miner must have a copy of the blockchain. In addition to mining bitcoin, these nodes help create new blocks and publish and distribute transactions.
How Safe Is The Node?
Nodes can be online or offline. Online nodes receive, save, and transfer all last blocks of transactions from other nodes, while nodes that are not connected do not. When an offline node comes back online, it must first catch up with the rest of the blockchain by downloading all blocks added to the blockchain after disconnecting from that node. This process is often referred to as blockchain synchronization.
In theory, a complete blockchain can be executed on a single node, but since it is stored in a single device, it is very susceptible to power outages, hackers, or system failures. The more complete nodes that run in a blockchain, the more resilient they are in the face of such disasters. When the blockchain data is distributed across so many devices, it is very difficult for a corrupted entity to delete all of this data at once. Due to the global crisis, a large number of nodes suddenly drop and become inaccessible. In theory, a single node can keep the entire blockchain running. Even if all nodes are disconnected, only one node with a complete blockchain history can be brought back online and all data can be accessed again.
These nodes are also vulnerable to computer attacks, which may change their functionality. For example, a fraudster can violate the security of the software and, without changing the blockchain data, it can redirect the node’s profits to a different address than its owner. Stealing address attacks is the most common type of attack for this type of software, which is why developers recommend using an updated version of their blockchain software.
These security flaws are easy to fix, and you can use some computer security knowledge or use the software tools that create security mechanisms to isolate the blockchain software from the rest of the computer system. These measures include:
Use official or developer software that have a long-term and proven record. Protect our active private key, mnemonic key, and any other privilege information in the blockchain. Use computers or electronic devices only for our mining activities. Use sandbox software to isolate software applications from the rest of the system. Use the MAC (forced access control) system privilege, which allows us to run our blockchain software with minimal access to the operating system and other system apis (this isolation is greater than the sandbox).
What Is The Masternodes?
Masternode is a unique feature of some current blockchains. The masternode is usually more equipped than the normal node. In addition to verifying, saving, and transmitting transactions, sometimes the masternode promotes other events in the blockchain based on its nature, such as voting events, execution of protocol operations, and compliance with blockchain laws. The masternode is usually always online and provides much more memory than a normal node. Because the home of the masternode usually requires more resources (electricity, uptime, maintenance, storage space, memory), the residence usually provides payment in the form of interest.
However, not everyone can run the masternode. The ability to control the masternode can be abused, so the host is required to store the least (usually a significant) amount of cryptocurrency as collateral. This is treated as a margin when the masternode violates the rules of the blockchain. The interest rate received by the masternode is calculated based on your margin. The amount of money retained depends on the revenue of the owner of the masternode, which is measured by the percentage of all transactions and operations processed by the set of masternodes involved. Projects such as DASH and Ethereum use and create master nodes in their structures.