Blockchain is a distributed ledger that combines multiple data blocks, each containing several transaction records, in chronological order. It is a database shared, replicated and synchronized among network members. The distributed ledger records transactions between network participants, such as the exchange of assets or data.
In multiple data areas, the latter data block contains the verification information of the previous data block, such as hash value, so that multiple data blocks are formed into a chain data structure that is difficult to tamper with. In addition, the same blockchain copy is stored on multiple distributed nodes for mutual verification. The transaction can be conducted directly between the two parties, that is, without the involvement of a third-party trust agency, to ensure the security of the transaction.
At present, each distributed node needs to save a complete copy of the blockchain. Therefore, when the amount of blockchain data is large, the storage space occupied is also large, and the cost is high. In addition, the storage capacity of different distributed nodes may vary. Once some distributed nodes have insufficient storage space, they cannot save a complete copy of the blockchain, thereby reducing the security of the blockchain.
Based on the difficulties of the current distributed ledger, Huawei applied for an invention patent entitled "Storage method and device for blockchain ledger" (application number: 201910045742.9) on January 17, 2019, and the applicant was Huawei Technologies Co., Ltd.
Based on the information currently published in the patent, let us take a look at Huawei's blockchain ledger storage method.
As shown in the figure above, it is a schematic diagram of the structure of a distributed system for storing blockchain ledgers. The distributed system includes 6 nodes, which can be sensors, monitoring devices, forwarding devices, etc. Some nodes have direct communication connections, such as node 1 and node 2, node 3 and node 6. Of course, some nodes do not have direct communication connections, such as node 4 and node 6, node 2 and node 5.
The following will take this distributed system as an example to first introduce the existing blockchain ledger storage method.
As shown in the figure above, it is a flow chart of the storage method of the blockchain ledger. First, node 3 receives and stores a copy of the blockchain ledger. The copy of the blockchain ledger contains a header block and a data block. The header block contains the verification information of the blockchain, and the data block stores multiple transaction records.
Node 3 may update its stored copy of the blockchain ledger based on the new data, where the new data may include new transaction records generated by node 3 in the process of completing the new transaction, or new transaction records received from upstream adjacent nodes.
Finally, node 3 forwards the new data to its downstream adjacent nodes so that its downstream adjacent nodes can update their copies of the blockchain ledger. It should be noted that the upstream adjacent nodes and downstream adjacent nodes are based on the transmission direction of a certain new data. For example, assuming that the new data A is generated by node 2, node 2 needs to send the new data A to node 1, node 3 and node 6, then node 2 is the upstream adjacent node of node 1, node 3 and node 6.
However, the storage capacity of some nodes in this method is limited. As the amount of data in the blockchain ledger increases, some nodes may not have enough storage space to store a complete copy of the blockchain ledger. In addition, there may be a situation where some nodes have insufficient available storage space, while other nodes have a large amount of idle storage space, which will cause the number of actual blockchain ledger copies stored in the Internet of Things to decrease, thereby reducing the security and reliability of blockchain-based transactions in the existing Internet of Things.
As shown in the figure above, it is a schematic diagram of the structure of a distributed system applicable to the storage method of the blockchain ledger invented in the patent, and the distributed communication system includes multiple node clusters. Each node cluster includes a cluster head node and one or more ordinary nodes.
The cluster head node is used to communicate with other node clusters in the distributed communication system, such as receiving a blockchain ledger and storing the header block in the blockchain ledger. The ordinary node is used to store the data blocks in the blockchain ledger.
The header block is used to store the verification message of the blockchain ledger and the storage information of each data block. The data block is used for the verification message and transaction record of the previous data block. The specific storage method is shown in the figure below.
As shown in the figure above, it is a flowchart of the storage method of the blockchain ledger. First, the available storage space size reported by the first copy and the ordinary node is received. The first copy can be the blockchain ledger copy issued by the master control device, or it can be other node clusters adjacent to the first node cluster.
Secondly, according to the available storage space size reported by the ordinary nodes and the data volume of the first copy, the data blocks that each ordinary node needs to store are determined. For example, different numbers of data blocks can be allocated to different ordinary nodes according to the available storage space size of different ordinary nodes.
Assume that the first replica includes a total of 4 data blocks: data block 1-data block 4, ordinary node 1 and ordinary node 3 can store 1 data block respectively, ordinary node 4 can store 2 data blocks, and ordinary node 2 has insufficient available storage space and cannot store data blocks, as shown in the following figure:
The data blocks to be stored can be allocated to each common node in the following manner: common node 1 stores data block 1, common node 2 does not store data blocks, common node 3 stores data block 2, and common node 4 stores data block 3 and data block 4.
Of course, in addition to this, other data block allocation methods may also be used, such as ordinary node 4 storing data block 1 and data block 2, while data block 3 and data block 4 are stored by ordinary node 1 and ordinary node 3 respectively.
Finally, the system needs to store the storage information of the header block and the data block. The storage information is used to indicate the correspondence between each data block and the ordinary node where it is located. For example, in the figure above, the cluster head node is used to store the header block, such as block 0. The header block includes the ledger verification information of the first copy, such as the main hash value of the blockchain ledger.
The above is the storage method of blockchain ledger invented by Huawei. Blockchain ledger technology also has many application scenarios in life. After this technology passes consensus verification and is written into the ledger, it cannot be changed. This can save time and costs for enterprises and organizations, while reducing risks, allowing enterprises to build new revenue streams to interact with customers.
Previous article:iPhone 12 mini may give up 5 features
Next article:IBM accelerates shift to cloud computing, splits IT division to "redefine the company"
Recommended ReadingLatest update time:2024-11-15 13:29
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple and Samsung reportedly failed to develop ultra-thin high-density batteries, iPhone 17 Air and Galaxy S25 Slim phones became thicker
- Micron will appear at the 2024 CIIE, continue to deepen its presence in the Chinese market and lead sustainable development
- Qorvo: Innovative technologies lead the next generation of mobile industry
- BOE exclusively supplies Nubia and Red Magic flagship new products with a new generation of under-screen display technology, leading the industry into the era of true full-screen
- OPPO and Hong Kong Polytechnic University renew cooperation to upgrade innovation research center and expand new boundaries of AI imaging
- Gurman: Vision Pro will upgrade the chip, Apple is also considering launching glasses connected to the iPhone
- OnePlus 13 officially released: the first flagship of the new decade is "Super Pro in every aspect"
- Goodix Technology helps iQOO 13 create a new flagship experience for e-sports performance
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Multi-core DSP products in the SoC era
- Detailed explanation of Altera series FPGA chip IP core
- SinlinxA33 Modify the configuration file to change the output serial port
- 【Home treasure】 esp32s2 lvgl running lcd io configuration
- Balanced Amplifier
- Nuvoton 003 Series Platform MS51 Replacement N76E003 Guide V1.0
- Practical Guide for Motor Application Development - Based on WildFire STM32 Full Series Development Board
- 10G high-speed cable processing
- STM32F429IGH6
- 【GD32L233C-START Review】5. IIC driving OLED