CN112804322B - Block generation method, computer device and storage medium - Google Patents

Block generation method, computer device and storage medium Download PDF

Info

Publication number
CN112804322B
CN112804322B CN202110028680.8A CN202110028680A CN112804322B CN 112804322 B CN112804322 B CN 112804322B CN 202110028680 A CN202110028680 A CN 202110028680A CN 112804322 B CN112804322 B CN 112804322B
Authority
CN
China
Prior art keywords
block
parallel chain
transaction
chain
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110028680.8A
Other languages
Chinese (zh)
Other versions
CN112804322A (en
Inventor
马登极
姜鹏
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110028680.8A priority Critical patent/CN112804322B/en
Publication of CN112804322A publication Critical patent/CN112804322A/en
Application granted granted Critical
Publication of CN112804322B publication Critical patent/CN112804322B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a block generation method, computer equipment and a storage medium, wherein the method comprises the following steps: synchronizing the block head of the main chain block when the block interval judgment rule is not satisfied, and storing each parallel chain transaction when the main chain block comprises the parallel chain transaction; when the block interval judgment rule is satisfied: if the stored parallel chain transaction exists and the main chain block has the parallel chain transaction, generating the parallel chain block according to the stored parallel chain transaction and each parallel chain transaction of the main chain block; if the stored parallel chain transaction exists and the main chain block does not have the parallel chain transaction, generating a parallel chain block according to the stored parallel chain transaction; if no stored parallel chain transaction exists and the main chain block has a parallel chain transaction, generating a parallel chain block according to each parallel chain transaction of the main chain block, and if no stored parallel chain transaction exists and the main chain block has no parallel chain transaction, generating an empty block. The parallel chain block discharging method and the parallel chain block discharging device enable the parallel chain block discharging to be constant, and stability and practicability of the parallel chain are improved.

Description

Block generation method, computer device and storage medium
Technical Field
The present application relates to the field of block chain technology, and in particular, to a block generation method, a computer device, and a storage medium.
Background
In the prior art, the more constant the block-out time, the more stable the blockchain system. Assuming that the block-out interval of the parallel chain parachain1 (hereinafter referred to as p1) is 5 blocks, if there is no parallel chain transaction of p1 in the continuous 5 main chain blocks, the parachain1 generates a parallel chain empty block; assuming that no transaction of p1 exists in blocks (1_ main) to (20_ main) on the main chain, the p1 generates four empty blocks (1_ p1) to (4_ p1) with a constant generation time, but if the block (23_ main) includes a transaction of p1, the p1 generates a block (5_ p1) from the block (23_ main); the generation time of block (5_ p1) is not constant as compared with the generation times of block (1_ p1) to block (4_ p 1); and because the parallel chain is simple in construction mode and low in cost, many operators prefer to construct the parallel chain, such as game parallel chains; the parallel chain block output is more regular, the block output time is more controllable, and the block output time can be calculated to be more consistent with the actual business scene of the parallel chain.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a block generation method, a computer device, and a storage medium with constant block output.
In a first aspect, the present invention provides a block generation method suitable for parallel chain nodes, where the method includes:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain meet the first block interval judgment rule of the current parallel chain:
if not, synchronizing the first block head of the first main chain block; and the number of the first and second groups,
determining whether the first backbone block includes a first parallel chain transaction for the current parallel chain:
if yes, storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
if yes, judging whether unpacked parallel chain transaction exists in the queue to be packed:
if yes, determining whether the first main chain block comprises a first parallel chain transaction of the current parallel chain:
if so, generating a first parallel chain block with a second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packed;
if not, generating a second parallel chain block with a second block height according to each parallel chain transaction in the queue to be packaged;
if not, judging whether the first main chain block comprises the first parallel chain transaction of the current parallel chain:
if yes, generating a third parallel chain block with the second block height according to each first parallel chain transaction;
and if not, generating a first empty block with the second block height.
In a second aspect, the present invention provides a block generation method suitable for a main chain node, where the method includes:
generating a first backbone block for parallel link nodes of each parallel link:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the parallel chain meet the first block interval judgment rule of the parallel chain:
if not, synchronizing the first block head of the first main chain block; and the number of the first and second groups,
judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain:
if yes, storing each first parallel chain transaction to a queue to be packed according to the transaction arrangement sequence in the first main chain block;
if yes, judging whether unpacked parallel chain transaction exists in the queue to be packed:
if yes, judging whether the first main chain block comprises the first parallel chain transaction of the corresponding parallel chain:
if so, generating a first parallel chain block with a second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packed;
if not, generating a second parallel chain block with a second block height according to each parallel chain transaction in the queue to be packed;
if not, judging whether the first main chain block comprises the first parallel chain transaction of the corresponding parallel chain:
if yes, generating a third parallel chain block with the second block height according to each first parallel chain transaction;
and if not, generating a first empty block with the second block height.
In a third aspect, the present invention also provides a computer device comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform the block generation method provided according to embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the block generation method provided according to the embodiments of the present invention.
In the block generation method, the computer device and the storage medium provided by the embodiments of the present invention, when the interval determination rule is not satisfied, the block header of the main chain block is synchronized, and when the main chain block includes parallel chain transactions, each parallel chain transaction is stored; when the block interval judgment rule is satisfied: if the stored parallel chain transaction exists and the main chain block has the parallel chain transaction, generating the parallel chain block according to the stored parallel chain transaction and each parallel chain transaction of the main chain block; if the stored parallel chain transaction exists and the main chain block does not have the parallel chain transaction, generating a parallel chain block according to the stored parallel chain transaction; if no stored parallel chain transaction exists and the main chain block has a parallel chain transaction, generating a parallel chain block according to each parallel chain transaction of the main chain block, and if no stored parallel chain transaction exists and the main chain block does not have a parallel chain transaction, generating an empty block method, so that parallel chain blocks are constant, and the stability and the practicability of the parallel chain are improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a block generation method according to an embodiment of the present invention.
FIG. 2 is a flow diagram of a preferred embodiment of the method shown in FIG. 1.
FIG. 3 is a flow diagram of another preferred embodiment of the method shown in FIG. 1.
Fig. 4 is a flowchart of another block generation method according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a block generation method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a block generation method suitable for parallel chain nodes, where the method includes:
s121: judging whether the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain meet the first block interval judgment rule of the current parallel chain:
otherwise, step S1221 is executed: synchronizing a first block header of a first backbone block; and the number of the first and second groups,
s12221: determining whether the first backbone block includes a first parallel chain transaction for the current parallel chain:
if yes, go to step S12222: storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
if yes, go to step S1231: judging whether unpacked parallel chain transaction exists in the queue to be packed:
if yes, go to step S12321: determining whether the first backbone block includes a first parallel chain transaction for the current parallel chain:
if yes, go to step S12322: generating a first parallel chain block with a second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packaged;
otherwise, step S12323 is executed: generating a second parallel chain block with a second block height according to each parallel chain transaction in the queue to be packaged;
otherwise, step S12331 is executed: determining whether the first backbone block includes a first parallel chain transaction for the current parallel chain:
if yes, go to step S12332: generating a third parallel chain block of the second block height according to each first parallel chain transaction;
otherwise, step S12333 is executed: a first empty block of a second block height is generated.
Specifically, the determining whether the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain satisfy the first block interval determination rule of the current parallel chain includes "determining whether a remainder of the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain is 0"; assuming that the current parallel chain is parachain1, the block spacing of parachain1 is 5; the parachain1 is provided with parallel chain nodes n 1-n 7, wherein n 1-n 4 are consensus nodes, and n 5-n 7 are non-consensus nodes;
assuming that the first backbone block to be synchronized is block (99), block (99) has no parallel chain transactions of parachain 1;
n 1-n 7 execute step S121 to determine whether the remainder of 99 and 5 is 0;
if not, n 1-n 7 execute step S1221 to synchronize the blockheader (99); and the number of the first and second groups,
n 1-n 7 execute step S12221 to determine whether block (99) includes parallel chain transactions of parachain 1:
block (99) ends because it has no parallel chain transaction of parachain 1.
Assuming that the first main chain block to be synchronized is block (99), block (99) has parallel chain transactions tx1, tx2 of parachain1, and the transaction arrangement order is tx1, tx 2;
n 1-n 7 execute step S121 to determine whether the remainder of 99 and 5 is 0;
if not, n 1-n 7 execute step S1221 to synchronize the blockheader (99); and the number of the first and second groups,
n 1-n 7 execute step S12221 to determine whether block (99) includes parallel chain transactions of parachain 1:
since block (99) has parallel chain transactions tx1 and tx2 of parachain1, and the transaction arrangement order is tx1 and tx2, n1 to n7 execute step S12222, and tx1 and tx2 are stored to the queue to be packed according to the order of tx1 and tx 2.
Assuming that the first main chain block to be synchronized is block (100), block (100) has no parallel chain transactions of parachain1, and there are no unpacked parallel chain transactions in the queue to be packed; the second block height is 20;
n 1-n 7 execute step S121 to determine whether the remainder of 100 and 5 is 0;
if not, n 1-n 7 execute step S1231 to determine whether there is an unpacked parallel chain transaction in the queue to be packed;
because the unpacked parallel chain transaction does not exist in the queue to be packed, n 1-n 7 execute step S12331 to judge whether block (100) comprises the parallel chain transaction of parachain 1;
since the block (100) has no parallel chain transaction of parachain1, n 1-n 7 execute step S12333 to generate a block (20_ parachain1), and the block (20_ parachain1) is an empty block.
Assuming that the first main chain block to be synchronized is block (100), block (100) has parallel chain transactions tx3, tx4 of parachain1, and there are no unpacked parallel chain transactions in the queue to be packed; the second block height is 20;
n 1-n 7 execute step S121 to determine whether the remainder of 100 and 5 is 0;
if not, n 1-n 7 execute step S1231 to determine whether there is an unpacked parallel chain transaction in the queue to be packed;
since the queue to be packed has no unpacked parallel chain transaction, n 1-n 7 execute step S12331, and determine whether the block (100) includes a parallel chain transaction of parachain 1;
since the block (100) has parallel chain transactions tx3, tx4 of parachain1, n1 to n7 execute step S12332 to generate the block (20_ parachain1) from tx3, tx 4.
Assuming that the first main chain block to be synchronized is block (100), block (100) has no parallel chain transaction of parachain1, and there are unpacked parallel chain transactions tx5, tx6 in the queue to be packed, the second block height is 20;
n 1-n 7 execute step S121 to determine whether the remainder of 100 and 5 is 0;
if not, n 1-n 7 execute step S1231 to determine whether there is an unpacked parallel chain transaction in the queue to be packed;
because unpacked parallel chain transactions tx5 and tx6 exist in the queue to be packed, the steps of S12321 are executed by n1 to n7, and whether the block (100) comprises the parallel chain transaction of parachain1 is judged;
since the block (100) has no parallel chain transaction of parachain1, n1 to n7 execute step S12323 to generate a block (20_ parachain1) from tx5 and tx 6.
Assuming that the first main chain block to be synchronized is block (100), the block (100) has parallel chain transactions tx7 and tx8 of parachain1, and the transaction arrangement order is tx7 and tx 8; the unpacked parallel chain transactions tx9 and tx10 exist in the queue to be packed, and the height of the second block is 20;
n 1-n 7 execute step S121, determine whether the remainder of 100 and 5 is 0;
if not, executing the step S1231 by the n 1-n 7 to judge whether the unpacked parallel chain transaction exists in the queue to be packed or not;
because unpacked parallel chain transactions tx9 and tx10 exist in the queue to be packed, the steps of S12321 are executed by n1 to n7, and whether the block (100) comprises the parallel chain transaction of parachain1 is judged;
since the block (100) has parallel chain transactions tx7 and tx8 of parachain1, and the sequence of the transactions is tx7 and tx8, n1 to n7 execute step S12322 to generate the block (20_ parachain1) according to tx9, tx10, tx7 and tx 8.
In further embodiments, the first block interval determination rule of the first parallel chain may be further configured according to actual requirements, for example, configured to "determine whether a remainder of the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain is 1", so as to achieve the same technical effect.
In more embodiments, if there are several parallel chains in the block chain network, all the parallel chains may be configured with the same block interval determination rule or different block interval rules according to actual requirements, thereby achieving the same technical effect.
The embodiment enables the parallel chain block to be constant, and increases the stability and the practicability of the parallel chain.
It will be understood by those skilled in the art that the present application is applicable to several scenarios where parallel chains require constant blocks, for example: 1. a scene of a periodic push service; 2. red packets are generated periodically and scenes of points are generated periodically.
Assume the following first scenario:
the initial block interval when the operator deploys parachain1 is 5; when the method shown in the figure 1 is executed on blocks (96) to (99) by parallel chain nodes n1 to n7, tx20 to tx30 exist in a queue to be packed; since the transactions that can be accommodated by a block are limited, assuming that n 1-n 7 correspond to block (100) generating block (20_ parachain1), block (20_ parachain1) can only accommodate part of the transactions tx 20-tx 30, and the number of parallel chain transactions of the subsequent parachain1 is increased; and because the storage space of the parallel chain node is limited, the parallel chain node can not store a parallel chain transaction infinitely, namely, if the parallel chain transaction cannot be executed, the parallel chain transaction is deleted after a plurality of time lengths; this results in the parallel chain transactions of parachain1 being executed the later they can be, the later there are some parallel chain transactions that could otherwise be executed correctly that fail to execute due to timeouts.
The first scenario described above can be solved by the method shown in fig. 2.
FIG. 2 is a flow diagram of a preferred embodiment of the method of FIG. 1. As shown in fig. 2, in a preferred embodiment, S12322 includes:
s123221: storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
s123222: when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
s123223: when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a second block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the second block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising a second block height;
s123224: synchronizing each block interval adjustment transaction including the first block interval adjustment transaction of the second block height from the main chain to obtain a third block interval passing through consensus, and replacing the first block interval with the third block interval after obtaining the third block interval;
s12323 includes: generating a second parallel chain block of a second block height from each parallel chain transaction in the queue to be packed comprises:
s123231: when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
s123232: when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a fourth block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the fourth block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising a second block height;
s123233: and synchronizing each block interval adjustment transaction including the first block interval adjustment transaction of the second block height from the main chain to obtain a fifth block interval passing the consensus, and updating the first block interval to the fifth block interval after obtaining the fifth block interval.
Specifically, take the first value of 0.8M as an example; assuming that the current parallel chain is parachain1, the block spacing of parachain1 is 5; the parachain1 is provided with parallel chain nodes n 1-n 7, wherein n 1-n 4 are consensus nodes, and n 5-n 7 are non-consensus nodes; the first main chain block is a block (100), and parallel chain transactions tx11 and tx12 of parachain1 exist in the block (100); the to-be-packed queue has tx 20-tx 30; the storage space required by tx 20-tx 27 is not more than 0.8M, the storage space required by tx 20-tx 28 is more than 0.8M, the height of the second block is 20, the interval of the second block is 4, and the transaction type of the block interval adjustment transaction is modify;
n 1-n 7 execute step S123221, and store tx11 and tx12 in the queue to be packed in the order of tx11 and tx 12;
n1 to n7 execute step S123222 to generate block (20_ parachain1) from tx20 to tx 27;
n1 to n4 execute step S123223 to generate block interval adjustment transactions tx (modify,4,20) _ n1 to tx (modify,4,20) _ n4 and send them to the main chain;
main chain storage certificates tx (modification, 4,20) _ n 1-tx (modification, 4,20) _ n 4;
n 1-n 4 executes step S123224 to synchronize tx (modify,4,20) _ n 1-tx (modify,4,20) _ n4 from the main chain to obtain a block interval by consensus, the block interval of parachain is replaced from 5 to 4 by consensus with a block interval of 4.
The principles of S123231 to S123233 included in S12323 are similar to those of S123221 to S123224, and are not described herein again.
In further embodiments, the first value may also be configured according to actual requirements, for example, configured to be 0.9M, and the same technical effect may be achieved.
The above embodiments allow the block spacing on the parallel chain to be dynamically adjusted so that all parallel chain transactions are performed as quickly as possible.
FIG. 3 is a flow diagram of another preferred embodiment of the method shown in FIG. 1. As shown in fig. 3, in a preferred embodiment, S12322 includes:
s123226: storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
s123227: when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
s123228: when the current node is a parallel chain consensus node, generating a first consensus transaction according to the first parallel chain block and sending the first consensus transaction to the main chain; the first consensus transaction further comprises a block interval adjustment identifier and a second block interval, wherein the second block interval is smaller than the first block interval;
s123229: acquiring the consensus transaction including the height of each second block of the first consensus transaction from the main chain to acquire a third block interval passing the consensus, and replacing the first block interval with the third block interval after acquiring the third block interval;
s12323 includes:
s123236: when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
s123237: when the current node is a parallel chain consensus node, generating a second consensus transaction according to the second parallel chain block and sending the second consensus transaction to the main chain; the second consensus transaction further comprises a block interval adjustment identifier and a fourth block interval, wherein the fourth block interval is smaller than the first block interval;
s123238: acquiring the consensus transactions including the second consensus transaction at the second block heights from the main chain to obtain a fifth block interval passing the consensus, and replacing the first block interval with the fifth block interval after obtaining the fifth block interval.
Specifically, assuming that the current parallel chain is parachain1, the block spacing of parachain1 is 5; the parachain1 is provided with parallel chain nodes n 1-n 7, wherein n 1-n 4 are consensus nodes, and n 5-n 7 are non-consensus nodes; the first main chain block is a block (100), and parallel chain transactions tx11 and tx12 of parachain1 exist in the block (100); the to-be-packed queue has tx 20-tx 30; the first value is 0.8M, the storage space required by tx 20-tx 27 is not more than 0.8M, the storage space required by tx 20-tx 28 is more than 0.8M, the height of the second block is 20, the interval of the second block is 4, and the block interval adjustment identifier is modify;
n 1-n 7 execute step S123226, and store tx11 and tx12 in the queue to be packed in the order of tx11 and tx 12;
n1 to n7 execute step S123227 to generate block (20_ parachain1) from tx20 to tx 27;
n 1-n 4 execute step S123228, generate the consensus transaction tx (modification, 4) _ block (20_ parachain1) _ n 1-tx (modification, 4) _ block (20_ parachain1) _ n4 of block (20_ parachain1) and send it to the main chain;
main chain storage tx (modification, 4) _ block (20_ parachain1) _ n 1-tx (modification, 4) _ block (20_ parachain1) _ n 4;
n1 to n4 execute step S123224 of synchronizing tx (modification, 4) _ block (20_ parachain1) _ n1 to tx (modification, 4) _ block (20_ parachain1) _ n4 from the main chain to obtain a block interval passing through the consensus, and replacing the block interval of the parachain from 5 to 4 by the consensus with the block interval of 4.
The principles of S123236 to S123238 included in S12323 are similar to those of S123221 to S123224, and are not described herein again.
The above embodiment can also solve the problem of the above scenario one; the above embodiment is different from the embodiment shown in fig. 2 in that the above embodiment does not need to additionally generate a block interval adjustment transaction, but the block interval adjustment flag and a new block interval are put into a consensus transaction for transmission; the above embodiment further reduces the cost of commission as compared to the embodiment shown in fig. 2.
The block interval on the parallel chain can be dynamically adjusted, so that all parallel chain transactions can be executed as soon as possible, and the expenditure of handling fees is further reduced.
Preferably, the second block interval is determined by the first storage space and the first value; the first storage space is the storage space required by the rest parallel chain transactions in the queue to be packaged and each first parallel chain transaction;
the fourth block interval is determined by the second storage space and the first value; and the second storage space is the storage space required by the rest parallel chain transaction in the queue to be packaged.
In further embodiments, the method for determining the first value may also be configured according to actual requirements, for example, configured to be a fixed value of 0.8M, and the same technical effect may be achieved.
Fig. 4 is a flowchart of another block generation method according to an embodiment of the present invention. As shown in fig. 4, in the present embodiment, the present invention provides a block generation method suitable for a main chain node, where the method includes:
s22: generating a first backbone block for parallel link nodes of each parallel link:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the parallel chain meet the first block interval judgment rule of the parallel chain:
if not, synchronizing the first block head of the first main chain block; and the number of the first and second groups,
judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain:
if yes, storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
if yes, judging whether unpacked parallel chain transaction exists in the queue to be packed:
if yes, judging whether the first main chain block comprises the first parallel chain transaction of the corresponding parallel chain:
if so, generating a first parallel chain block with a second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packed;
if not, generating a second parallel chain block with a second block height according to each parallel chain transaction in the queue to be packed;
if not, judging whether the first main chain block comprises the first parallel chain transaction of the corresponding parallel chain:
if yes, generating a third parallel chain block with the second block height according to each first parallel chain transaction;
and if not, generating a first empty block with the second block height.
The block generation principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the generating the first parallel chain block with the second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packed includes:
storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a second block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the second block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising a second block height;
synchronizing each block interval adjustment transaction including the first block interval adjustment transaction of the second block height from the main chain to obtain a third block interval passing through consensus, and replacing the first block interval with the third block interval after obtaining the third block interval;
generating a second parallel chain block of a second block height from each parallel chain transaction in the queue to be packed comprises:
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a fourth block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the fourth block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising a second block height;
and synchronizing each block interval adjustment transaction including the first block interval adjustment transaction of the second block height from the main chain to obtain a fifth block interval passing the consensus, and updating the first block interval to the fifth block interval after obtaining the fifth block interval.
The block generation principle of the above embodiment can refer to the method shown in fig. 2, and is not described herein again.
Preferably, the generating the first parallel chain block with the second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packed includes:
storing each first parallel chain transaction to a queue to be packed according to the transaction arrangement sequence in the first main chain block;
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first consensus transaction according to the first parallel chain block and sending the first consensus transaction to the main chain; the first consensus transaction further comprises a block interval adjusting identifier and a second block interval, wherein the second block interval is smaller than the first block interval;
acquiring the consensus transaction including the height of each second block of the first consensus transaction from the main chain to acquire a third block interval passing the consensus, and replacing the first block interval with the third block interval after acquiring the third block interval;
generating a second parallel chain block of a second block height from each parallel chain transaction in the queue to be packed comprises:
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a second consensus transaction according to the second parallel chain block and sending the second consensus transaction to the main chain; the second consensus transaction further comprises a block interval adjustment identifier and a fourth block interval, wherein the fourth block interval is smaller than the first block interval;
acquiring the consensus transactions including the second consensus transaction at the second block heights from the main chain to obtain a fifth block interval passing the consensus, and replacing the first block interval with the fifth block interval after obtaining the fifth block interval.
The block generation principle of the above embodiment can refer to the method shown in fig. 3, and is not described herein again.
Preferably, the second block interval is determined by the first storage space and the first value; the first storage space is the storage space required by the rest parallel chain transactions in the queue to be packaged and each first parallel chain transaction;
the fourth block interval is determined by the second storage space and the first value; and the second storage space is the storage space required by the rest parallel chain transaction in the queue to be packaged.
The block generation principle of the above embodiment can refer to a method of a preferred embodiment shown in fig. 1, and is not described herein again.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 5, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the computer apparatus are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A block generation method, applied to parallel chain nodes, the method comprising:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain meet the first block interval judgment rule of the current parallel chain:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain meet the first block interval judgment rule of the current parallel chain: if not, synchronizing the first block head of the first main chain block; and the number of the first and second groups,
determining whether the first backbone block includes a first parallel chain transaction for a current parallel chain:
the determining whether the first backbone block includes a first parallel chain transaction for a current parallel chain: if so, storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the current parallel chain meet the first block interval judgment rule of the current parallel chain: if so, judging whether the queue to be packaged has unpacked parallel chain transactions:
and judging whether the queue to be packaged has unpacked parallel chain transaction: if so, determining whether the first backbone block comprises a first parallel chain transaction of the current parallel chain:
the determining whether the first backbone block includes a first parallel chain transaction for a current parallel chain: if so, generating a first parallel chain block with a second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packaged;
the determining whether the first backbone block includes a first parallel chain transaction for a current parallel chain: if not, generating a second parallel chain block with the second block height according to each parallel chain transaction in the queue to be packaged;
and judging whether the queue to be packaged has unpacked parallel chain transaction: if not, determining whether the first main chain block comprises a first parallel chain transaction of the current parallel chain:
the determining whether the first backbone block includes a first parallel chain transaction for a current parallel chain: if so, generating a third parallel chain block with the height of the second block according to each first parallel chain transaction;
the determining whether the first backbone block includes a first parallel chain transaction for a current parallel chain: and if not, generating a first empty block with the second block height.
2. The method of claim 1, wherein generating first parallel chain blocks of a second block height from each parallel chain transaction in the queue to be packed and each first parallel chain transaction comprises:
storing each first parallel chain transaction to a queue to be packed according to the transaction arrangement sequence in the first main chain block;
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value, and the storage space required by a plurality of previous plus parallel chain transactions in the queue to be packaged is more than the first numerical value, generating the first parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a second block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the second block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising a second block height;
synchronizing, from a master chain, respective block spacing adjustment transactions including the first block spacing adjustment transaction for the second block height to obtain a consensus third block spacing, after obtaining the third block spacing, replacing the first block spacing with the third block spacing;
generating a second parallel chain block of the second block height according to each parallel chain transaction in the queue to be packed comprises:
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a fourth block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the fourth block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising the second block height;
synchronizing, from a master chain, each block interval adjustment transaction including the first block interval adjustment transaction of the second block height to obtain a consensus fifth block interval, after obtaining the fifth block interval, updating the first block interval to the fifth block interval.
3. The method of claim 1, wherein the method is applied to a consensus node of a parallel chain, and wherein generating a first parallel chain block of a second block height according to each parallel chain transaction, each first parallel chain transaction in the queue to be packed, comprises:
storing each first parallel chain transaction to a queue to be packed according to the transaction arrangement sequence in the first main chain block;
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first consensus transaction according to the first parallel chain block and sending the first consensus transaction to a main chain; wherein the first consensus transaction further comprises a block interval adjustment indicator and a second block interval, the second block interval being smaller than the first block interval;
acquiring a consensus transaction including the second block heights of the first consensus transaction from a main chain to obtain a third block interval passing consensus, and replacing the first block interval with the third block interval after the third block interval is obtained;
generating a second parallel chain block of the second block height according to each parallel chain transaction in the queue to be packed comprises:
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a second consensus transaction according to the second parallel chain block and sending the second consensus transaction to the main chain; wherein the second consensus transaction further comprises a block spacing adjustment flag and a fourth block spacing, the fourth block spacing being less than the first block spacing;
acquiring a consensus transaction including the second block heights of the second consensus transactions from a main chain to obtain a fifth block interval passing consensus, and replacing the first block interval with the fifth block interval after obtaining the fifth block interval.
4. A method according to claim 2 or 3, wherein the second block spacing is determined by a first memory space and the first value; the first storage space is the storage space required by the rest parallel chain transactions in the queue to be packaged and each first parallel chain transaction;
the fourth block interval is determined by a second storage space and the first value; and the second storage space is the storage space required by the rest parallel chain transaction in the queue to be packaged.
5. A block generation method, wherein the method is applied to a main chain node, and the method comprises:
generating a first backbone block for parallel link nodes of each parallel link:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the parallel chain meet the first block interval judgment rule of the parallel chain:
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the parallel chain meet the first block interval judgment rule of the parallel chain: if not, synchronizing the first block head of the first main chain block; and the number of the first and second groups,
judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain:
and judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain: if so, storing each first parallel chain transaction to a queue to be packaged according to the transaction arrangement sequence in the first main chain block;
judging whether the first block height of the first main chain block to be synchronized and the first block interval of the parallel chain meet the first block interval judgment rule of the parallel chain: if so, judging whether the queue to be packaged has unpacked parallel chain transactions:
and judging whether the queue to be packaged has unpacked parallel chain transaction: if yes, judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain:
and judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain: if so, generating a first parallel chain block with a second block height according to each parallel chain transaction and each first parallel chain transaction in the queue to be packaged;
and judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain: if not, generating a second parallel chain block with the second block height according to each parallel chain transaction in the queue to be packaged;
and judging whether the queue to be packaged has unpacked parallel chain transaction: if not, judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain:
and judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain: if so, generating a third parallel chain block with the height of the second block according to each first parallel chain transaction;
and judging whether the first main chain block comprises a first parallel chain transaction of the corresponding parallel chain: and if not, generating a first empty block with the second block height.
6. The method of claim 5, wherein generating first parallel chain blocks of a second block height from each parallel chain transaction, each first parallel chain transaction in the queue to be packed, comprises:
storing each first parallel chain transaction to a queue to be packed according to the transaction arrangement sequence in the first main chain block;
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a second block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the second block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising a second block height;
synchronizing, from a master chain, respective block spacing adjustment transactions including the first block spacing adjustment transaction for the second block height to obtain a consensus third block spacing, after obtaining the third block spacing, replacing the first block spacing with the third block spacing;
generating a second parallel chain block of the second block height according to each parallel chain transaction in the queue to be packed comprises:
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value, and the storage space required by a plurality of previous plus parallel chain transactions in the queue to be packaged is more than the first numerical value, generating the second parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first block interval adjustment transaction comprising a fourth block interval and sending the first block interval adjustment transaction to the main chain for evidence storage; wherein the fourth block spacing is less than the first block spacing, the first block spacing adjustment transaction comprising the second block height;
synchronizing each tile interval adjustment transaction including the first tile interval adjustment transaction of the second tile height from a main chain to obtain a consensus fifth tile interval, and updating the first tile interval to the fifth tile interval after obtaining the fifth tile interval.
7. The method of claim 5, wherein generating first parallel chain blocks of a second block height from each parallel chain transaction, each first parallel chain transaction in the queue to be packed, comprises:
storing each first parallel chain transaction to a queue to be packed according to the transaction arrangement sequence in the first main chain block;
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a first parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a first consensus transaction according to the first parallel chain block and sending the first consensus transaction to a main chain; wherein the first consensus transaction further comprises a block interval adjustment indicator and a second block interval, the second block interval being smaller than the first block interval;
acquiring a consensus transaction including the second block heights of the first consensus transaction from a main chain to obtain a third block interval passing consensus, and replacing the first block interval with the third block interval after the third block interval is obtained;
generating a second parallel chain block of the second block height according to each parallel chain transaction in the queue to be packed comprises:
when the storage space required by a plurality of previous parallel chain transactions in the queue to be packaged is not more than a first numerical value and the storage space required by a plurality of previous plus one parallel chain transactions in the queue to be packaged is more than the first numerical value, generating a second parallel chain block according to the plurality of previous parallel chain transactions;
when the current node is a parallel chain consensus node, generating a second consensus transaction according to the second parallel chain block and sending the second consensus transaction to the main chain; wherein the second consensus transaction further comprises a block spacing adjustment flag and a fourth block spacing, the fourth block spacing being less than the first block spacing;
acquiring a consensus transaction including the second block heights of the second consensus transactions from a main chain to obtain a fifth block interval passing consensus, and replacing the first block interval with the fifth block interval after obtaining the fifth block interval.
8. The method according to claim 6 or 7, wherein the second block spacing is determined by a first storage space and the first value; the first storage space is the storage space required by the rest parallel chain transactions in the queue to be packaged and each first parallel chain transaction;
the fourth block interval is determined by a second storage space and the first value; and the second storage space is the storage space required by the rest parallel chain transaction in the queue to be packaged.
9. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-8.
10. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-8.
CN202110028680.8A 2021-01-11 2021-01-11 Block generation method, computer device and storage medium Active CN112804322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110028680.8A CN112804322B (en) 2021-01-11 2021-01-11 Block generation method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110028680.8A CN112804322B (en) 2021-01-11 2021-01-11 Block generation method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN112804322A CN112804322A (en) 2021-05-14
CN112804322B true CN112804322B (en) 2022-06-28

Family

ID=75809655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110028680.8A Active CN112804322B (en) 2021-01-11 2021-01-11 Block generation method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN112804322B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741039A (en) * 2019-01-07 2019-05-10 深圳市红砖坊技术有限公司 Bookkeeping methods, terminal device, digs mine node and mine pond at mine pool server
CN110392121A (en) * 2019-09-02 2019-10-29 杭州复杂美科技有限公司 Parallel chain block generation method, equipment and storage medium
CN110516150A (en) * 2019-08-26 2019-11-29 杭州复杂美科技有限公司 Parallel chain transaction method for pushing, equipment and storage medium
CN110535933A (en) * 2019-08-26 2019-12-03 杭州复杂美科技有限公司 Parallel chain common recognition method, equipment and storage medium
CN110690974A (en) * 2019-12-10 2020-01-14 腾讯科技(深圳)有限公司 Block chain based data verification method, device, equipment and readable storage medium
WO2020043048A1 (en) * 2018-08-30 2020-03-05 杭州复杂美科技有限公司 Parallel chain data synchronization method, device, and storage medium
CN111008249A (en) * 2019-12-04 2020-04-14 杭州复杂美科技有限公司 Parallel chain block synchronization method, device and storage medium
CN111524010A (en) * 2020-05-06 2020-08-11 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796685A (en) * 2016-12-30 2017-05-31 深圳前海达闼云端智能科技有限公司 Block chain authority control method and device and node equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020043048A1 (en) * 2018-08-30 2020-03-05 杭州复杂美科技有限公司 Parallel chain data synchronization method, device, and storage medium
CN109741039A (en) * 2019-01-07 2019-05-10 深圳市红砖坊技术有限公司 Bookkeeping methods, terminal device, digs mine node and mine pond at mine pool server
CN110516150A (en) * 2019-08-26 2019-11-29 杭州复杂美科技有限公司 Parallel chain transaction method for pushing, equipment and storage medium
CN110535933A (en) * 2019-08-26 2019-12-03 杭州复杂美科技有限公司 Parallel chain common recognition method, equipment and storage medium
CN110392121A (en) * 2019-09-02 2019-10-29 杭州复杂美科技有限公司 Parallel chain block generation method, equipment and storage medium
CN111008249A (en) * 2019-12-04 2020-04-14 杭州复杂美科技有限公司 Parallel chain block synchronization method, device and storage medium
CN110690974A (en) * 2019-12-10 2020-01-14 腾讯科技(深圳)有限公司 Block chain based data verification method, device, equipment and readable storage medium
CN111524010A (en) * 2020-05-06 2020-08-11 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium

Also Published As

Publication number Publication date
CN112804322A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN110083745B (en) Data query method, device and storage medium
CN110392121B (en) Parallel chain block generation method, device and storage medium
CN111861471B (en) Parallel chain consensus method, parallel chain block rollback method, apparatus and storage medium
US10402235B2 (en) Fine-grain synchronization in data-parallel jobs for distributed machine learning
CN111798316A (en) Parallel chain consensus method, device and storage medium
CN111008249B (en) Parallel chain block synchronization method, device and storage medium
CN111242780A (en) Method, device and storage medium for sending consensus transaction
CN109413125A (en) The method and apparatus of dynamic regulation distributed system resource
CN110837505A (en) State data storage method, state data synchronization device and storage medium
CN111324449A (en) Transaction storage and broadcasting method, device and storage medium of memory pool
CN110490734B (en) Transaction group construction and broadcasting method and system, equipment and storage medium
CN111858771A (en) Distributed data storage method, device and storage medium
CN112804322B (en) Block generation method, computer device and storage medium
CN111405037A (en) Block synchronization method, device and storage medium
US20180262402A1 (en) Communication efficient sparse-reduce in distributed machine learning
CN110298756B (en) Parallel chain self-consensus method, device and storage medium
CN112839091B (en) Block generation method, computer device and storage medium
CN112600905A (en) Transaction broadcasting and block generating method, apparatus and storage medium
CN111415259A (en) Transaction queuing method, device and storage medium
CN111523896A (en) Anti-attack method, device and storage medium
CN112733202B (en) Parallel chain supervision consensus method, computer device and storage medium
CN114493875A (en) Transaction execution method, computer device, and storage medium
CN112822113B (en) Method and device for acquiring routing address, electronic equipment and readable storage medium
CN111432027B (en) Parallel chain block synchronization method, device and storage medium
CN111639939A (en) Block restoring method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant