
Blockchain technology, what is the core technology of blockchain operation?
Sept 22,2022
166What are the core technologies that make blockchain work? In recent years, the application of blockchain is more and more widely. Blockchain is a distributed and decentralized network database system, which will make the storage, update, maintenance and operation of data become different. So what are the core technologies of blockchain operation? Let's learn about the core technology of blockchain.
The core technology of blockchain operation
1. Blockchain link
As the name suggests, a blockchain is a chain of blocks. Each block is divided into two parts: block header and block body (including transaction data). The block header includes the PrevHash value (also known as the hash value) of the previous block used to implement the block link and a random number (nonce) used to calculate the mining difficulty. The hash value of the previous block is actually the hash value of the header of the previous block, and the calculating random number rule determines which miner gets the right to record the block.
2. Consensus mechanism
Blockchain was born with Bitcoin and is the basic technology architecture of Bitcoin. Blockchain can be thought of as a decentralized Internet-based bookkeeping system. A decentralized digital currency system like Bitcoin, which requires the consistency of accounting among honest nodes without a central node, requires a blockchain to accomplish this. Therefore, the core of blockchain technology is a consensus mechanism for individuals without mutual trust to reach consensus on the legality of transactions in the absence of central control. At present, there are four main types of blockchain consensus mechanisms: PoW, PoS, DPoS, and distributed consistency algorithm.
3. Unlock the script
Scripting is an important technology to realize automatic verification and automatic execution of contracts on blockchain. The output of each transaction does not strictly refer to an address, but to a script. A script is like a set of rules that govern how the receiver can spend the assets locked on the output.
Verification of the legitimacy of transactions also relies on scripts. It currently relies on two types of scripts: lock scripts and unlock scripts. A locking script is a condition placed on an output trade, implemented through a scripting language, and located at the output of the trade. The unlock script corresponds to the lock script, and only if the conditions required by the lock script are met can the asset corresponding to this script be spent, which is located in the input of the transaction. There are many flexible conditions that can be expressed through scripting languages. The interpretation script is done through something like a "virtual machine" in our programming world, which runs distributed at every node in the blockchain network.
4. Trading rules
The transaction of blockchain is the basic unit that constitutes the block, and it is also the actual valid content that the blockchain is responsible for recording. A blockchain transaction can be a money transfer or something like the deployment of a smart contract.
In the case of Bitcoin, a transaction is a payment transfer. The trading rules are as follows:
* The input and output of the transaction cannot be empty.
* For each input to a trade, reject the trade if its corresponding UTXO output can be found in the current trade pool. Since the current transaction pool is a transaction that is not recorded in the blockchain, each input to the transaction should come from an acknowledged UTXO. If it is found in the current trading pool, it is a double flower trade.
* For each input in a transaction, the corresponding output must be a UTXO.
* The unlocking script of each input must work with the locking script of the corresponding output to verify the compliance of the transaction.
5. Trade priority
The priority of blockchain transactions is determined by the rules of the blockchain protocol. In the case of Bitcoin, the priority in which transactions are included in the block is determined by the time the transaction is broadcast to the network and the size of the transaction. As the transaction is broadcast to the network for more time, the chain age of the transaction increases, the priority of the transaction is increased, and the transaction is eventually included in the block. For Ethereum, the priority of a transaction is also related to the transaction fee that the publisher of the transaction is willing to pay. The higher the transaction fee, the higher the priority for the transaction to be included in the block.
6. Merkle
The original application of Merkle's proof is the Bitcoin system, which was described and created by Satoshi Nakamoto in 2009. The Bitcoin blockchain uses Merkle proof in order to store transactions in each block. This makes it impossible to tamper with transactions and makes it easy to verify that transactions are contained in a particular block.
7.RLP
Recursive Length Prefix (RLP) is a major encoding for object serialization in Ethereum. The purpose of RLP is to encode any nested sequence of binary data.
Conclusion
Through the above content, it can be seen that there are seven core technologies of blockchain operation, which are blockchain link, consensus mechanism, unlock script, transaction rules, transaction priority, Merkle proof and RLP. Blockchain is a chain composed of blocks; Scripting is an important technology to realize automatic verification and automatic execution of contracts on blockchain. The transaction of blockchain is the basic unit that constitutes the block, and it is also the actual effective content that blockchain is responsible for recording. The priority of blockchain transactions is determined by the rules of the blockchain protocol.