Block generation method and computer storage medium

A block and new block technology, applied in the computer field, can solve problems such as master node failure, failure to generate new blocks, master node election, etc., and achieve the effect of avoiding forks

Active Publication Date: 2019-04-05
BEIJING XINTANG SICHUANG EDUCATIONAL TECH CO LTD
View PDF6 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in the way that the existing consortium blockchain generates new blocks, in some cases, such as when the master node fails or the master node election occurs, new blocks cannot be generated
As a result, it further leads to the inability to guarantee data consistency within the consortium blockchain

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
  • Block generation method and computer storage medium
  • Block generation method and computer storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0015] refer to figure 1 , shows a flowchart of steps of a method for generating a block according to Embodiment 1 of the present invention.

[0016] The block generation method of this embodiment is applied to the alliance blockchain. Unlike the traditional alliance blockchain, the alliance blockchain in this embodiment does not have a master node. When generating a new block, in order to achieve data consistency, To maintain the order of the alliance blockchain, the new block number verification method is adopted.

[0017] Specifically, the block generation method of this embodiment includes the following steps:

[0018] Step S102: Receive a new block generation request initiated by a node in the consortium blockchain.

[0019] Wherein, the new block generation request carries the number of the requested new block and the information of the corresponding block content.

[0020] Any node in the consortium blockchain can issue a new block generation request to request the g...

Embodiment 2

[0036] refer to figure 2 , shows a flow chart of steps of a method for generating a block according to Embodiment 2 of the present invention.

[0037] This embodiment illustrates the block generation method provided by the embodiment of the present invention in the form of a specific example. Similar to Embodiment 1, the block generation method of this embodiment is also applied to the alliance blockchain. In the alliance blockchain The PBFT algorithm is used to implement the consensus mechanism, and the consortium blockchain does not have a master node.

[0038] Similar to the traditional PBFT, the PBFT algorithm is also used in this embodiment to logically divide the generation of new blocks into five stages, namely: request stage, pre-prepare stage, prepare stage, commit stage, and execute and reply stage.

[0039] Based on the above scenario, the block generation method of this embodiment includes the following steps:

[0040] Step S202: Receive a new block generation r...

Embodiment 3

[0077] The embodiment of the present invention also provides a computer-readable medium, the computer storage medium stores a readable program, and the readable program is applied to the consortium block chain, the consortium block chain does not have a master node, and the The readable program includes: an instruction for receiving a new block generation request initiated by a node in the alliance blockchain, wherein the new block generation request carries the number of the requested new block and the corresponding block content information; used to verify the number of the new block, verify the information of the block content corresponding to the number of the new block that has been verified successfully, and pre-generate the instruction of the new block after the verification is successful ; Used to check the number of the new block again, and send a confirmation message instruction to all nodes in the alliance block chain after the verification is successful; used to jud...

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 invention provides a block generation method and a computer storage medium. The block generation method is applied to an alliance blockchain without a main node. The method comprises that a new block generation request generated by a node in the alliance blockchain is received, and the new block generation request carries the number of a requested new block and information of the correspondingblock content; the number of the new block is verified, and the block content information corresponding to the number of the new block which passes verification is verified, and the new block is pre-generated if verification succeeds; the number of the new block is verified again, and a confirmation message is sent to all nodes in the alliance blockchain if verification succeeds; and whether allthe nodes reach a common recognition of the confirmation message, and if YES, a new block for initiating the node of new block generation request is generated according to the pre-generated new block.

Description

technical field [0001] The embodiment of the present invention relates to the field of computer technology, and in particular to a method for generating a block and a computer storage medium. Background technique [0002] Blockchain is a new application model that utilizes computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchains are divided into three categories: public blockchains, alliance blockchains (also known as joint blockchains, industry blockchains), and private blockchains. [0003] Among them, in the current consortium blockchain, in order to quickly and correctly agree on the value of a certain data within the blockchain, a consensus mechanism will be used, such as PBFT (Practical Byzantine Fault Tolerance, Practical Byzantine Fault Tolerance) algorithm as a consensus mechanism. Under this consensus mechanism, all nodes of the alliance blockchain need to elect a master node, ...

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 Applications(China)
IPC IPC(8): H04L12/24
CPCH04L41/0663
Inventor 牛冬
Owner BEIJING XINTANG SICHUANG EDUCATIONAL TECH 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