Transaction data processing method of blockchain system based on Ethereum
Glossary
Term definitionBlockchainA decentralized distributed ledger for recording transaction data. EthereumAn open source blockchain platform that supports smart contracts and decentralized applications. Smart contractA piece of code stored on the blockchain that defines and executes the terms of a contract. Consensus mechanismA mechanism that allows nodes in a distributed system to reach a consensus on data. PBFT (Practical Byzantine Fault Tolerance)A consensus mechanism that can tolerate the failure of a certain number of nodes in the system. Primary nodeA node in a blockchain system responsible for generating new blocks. Backup nodeA node in a blockchain system that verifies and stores blocks. BlockThe basic unit in a blockchain that contains transaction data and other information. Block headerA part of a block that contains metadata about the block. Hash valueAn algorithm that maps data of arbitrary length to data of fixed length. Merkle treeA data structure used to efficiently verify data in a blockchain. ViewA logical grouping of nodes in a blockchain system. View switchingThe process by which a blockchain system switches to a new view when a primary node fails. Short answer question
Please explain what are the main features of a consortium chain system based on Ethereum?
Consortium chain systems are usually jointly participated by multiple institutions or organizations, and participants are authenticated and authorized. Unlike public chains, consortium chains have a limited number of participants and nodes, faster transactions, and higher security, but they also sacrifice a certain degree of decentralization.
What role do smart contracts play in Ethereum-based blockchain systems?
Smart contracts are executable codes stored on the blockchain that are used to automatically execute contract terms. In Ethereum-based blockchain systems, master nodes can process transaction requests by calling smart contracts and generate blocks containing transaction data.
Please describe how blocks reach consensus in Ethereum-based consortium chain systems.
In consortium chain systems, the consensus of blocks usually adopts the PBFT mechanism. After the master node generates a new block, it needs to broadcast it to all backup nodes. The backup node verifies the legitimacy of the block and conducts a three-stage negotiation process (pre-preparation, preparation, and confirmation). If more than two-thirds of the nodes agree, the block reaches a consensus and is added to the blockchain.
Compared with the traditional PBFT mechanism, what improvements does the blockchain system proposed in this patent have in reaching consensus?
The blockchain system proposed in this patent has two major improvements in reaching consensus: first, in the second and third phases of negotiation, only the block hash value is transmitted instead of the complete block information, thereby reducing network resource consumption and communication overhead; second, by using the timestamp of the optimal block for certificate cleanup, additional communication between nodes is avoided, further saving network resources.
In the blockchain system proposed in this patent, how to determine whether the master node is abnormal?
You can determine whether the master node is abnormal by comparing the timestamp of the optimal block with the current time and observing the changes in the transaction list. If the current time exceeds a certain threshold of the optimal block timestamp, or the transaction list has not changed for a long time, it can be considered that the master node may be abnormal.
When the master node is abnormal, how does the blockchain system proposed in this patent switch views?
When the master node is abnormal, the backup node will elect a new master node based on factors such as its own joining time, performance indicators, and response times. The new master node and other backup nodes will form a new view and continue the operation of the blockchain system.
How do nodes in the blockchain system verify the transaction data of newly generated blocks?
The node will use the transaction data in the newly generated block to generate a Merkle tree and calculate its root hash value. At the same time, the node will also obtain the transaction tree of the block header and calculate its hash value. If the two are the same, the verification is passed.
How do nodes in the blockchain system ensure the consistency of blockchain data?
Each node maintains a complete copy of the blockchain. When a block reaches a consensus and is added to the blockchain, all nodes will update their own copies.
How does the blockchain system proposed in this patent deal with the problem of block synchronization between nodes?
When a node finds that its copy of the blockchain is inconsistent with other nodes, it can request the hash value of the missing block from other nodes. If the received hash values are the same and the number exceeds the threshold, the node can obtain the complete block information based on the hash value and add it to its own copy of the blockchain.
What are the main advantages of the blockchain system proposed in this patent compared with the traditional alliance chain system?
Based on the traditional alliance chain system, the blockchain system proposed in this patent reduces network resource consumption and communication overhead and improves transaction processing efficiency by optimizing the PBFT mechanism.