Determination method, device, server and storage medium of block chain main chain

A determination method, blockchain technology, applied in the blockchain field, can solve problems such as wrong chains, achieve the effects of improving rationality, reducing the success rate of malicious attacks, and increasing the cost of doing evil

Active Publication Date: 2020-05-12
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the method of determining the main chain based on the longest chain may lead to the fact that although the forked chain is the longest chain, it is actually a wrong chain

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Determination method, device, server and storage medium of block chain main chain
  • Determination method, device, server and storage medium of block chain main chain
  • Determination method, device, server and storage medium of block chain main chain

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] figure 1 It is a flowchart of a method for determining the main chain of a block chain provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where a fork chain is generated in the block chain to determine the main chain. This method can be determined by the main chain of the block chain. The chain is determined by the device, which can be configured in the node that has the right to store the block chain in the block chain system. The method specifically includes the following:

[0028] S110. If it is detected that there are at least two forked chains in the blockchain, determine the weight of each block in each forked chain.

[0029] In a specific embodiment of the present invention, the block data in each block in the blockchain not only includes the transaction data recorded in the block body, but also includes block header information, such as the hash value of the previous block header, the timestamp, or Block identific...

Embodiment 2

[0044] On the basis of the first embodiment above, this embodiment provides a preferred implementation of the method for determining the main chain of the blockchain, which can set corresponding weights according to the type of attack. image 3 A flow chart of a method for determining the main chain of a block chain provided by Embodiment 2 of the present invention, such as image 3 As shown, the method includes the following specific steps:

[0045] S310. If it is detected that there are at least two forked chains in the blockchain, determine the target attack type according to the block information contained in each forked chain.

[0046] In the specific embodiment of the present invention, since the purpose of the malicious end's attack is to make its own illegal transaction data effective in order to profit from it, most of the common attack types belong to the attack method based on the longest chain main chain determination method, for example Double spend attack. In o...

Embodiment 3

[0062] Figure 4 A schematic structural diagram of a device for determining the main chain of a block chain provided by Embodiment 3 of the present invention. This embodiment is applicable to the case where a fork chain is generated in the block chain and the main chain is determined. The device can realize any The method for determining the blockchain main chain described in the embodiment. Specifically, the device includes:

[0063] The block weight determination module 410 is used to determine the weight of each block in each forked chain if it is detected that there are at least two forked chains in the blockchain;

[0064] The forked chain weight determination module 420 is used to determine the weight of each forked chain according to the weights of the blocks contained in each forked chain;

[0065] The main chain determination module 430 is configured to determine the main chain from the forked chains according to the weight of each forked chain, and roll back the fo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the present invention discloses a method, device, server, and storage medium for determining the main chain of a block chain. The method includes: if at least two forked chains exist in the block chain, determine The weight of the block; according to the weight of the blocks contained in each forked chain, determine the weight of each forked chain; determine the main chain from the forked chain according to the weight of each forked chain, and transfer the The forked chain is rolled back. In the embodiment of the present invention, the main chain is determined from the forked chain based on the weight of the forked chain, which avoids the malicious discarding of the tail block of the previous block generating node during the switching process of the block generating node to a certain extent. The problem is to increase the cost of doing evil for block generation nodes and reduce the success rate of malicious attacks.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of block chains, and in particular to methods, devices, servers and storage media for determining the main chain of block chains. Background technique [0002] With the continuous development of Internet technology, a decentralized and transparent blockchain technology has emerged. Blockchain technology uses data blocks to break the current dependence of the Internet on the central server. All data generated in the network will be recorded by nodes with current transaction processing rights, and through data broadcasting and verification by other nodes, to Blocks are formed and linked at the end of the blockchain. Almost every node in the network can observe the data in each block in the entire network, and realize the supervision of all nodes on the network data, thus ensuring the security and reliability of the data in the network. [0003] At present, each node in the network c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06Q20/38G06Q40/04
CPCG06Q20/382G06Q40/04G06Q30/0185H04L63/1441H04L9/3239G06F16/27H04L9/50
Inventor 肖伟
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products