BLOCK GENERATION METHOD, DEVICE AND BLOCKCHAIN NETWORK
A block generation method, a device and a blockchain network are used for improving the safety of a blockchain. The method comprises: signing a block generated by a block generation device according to private key information of the block generation device to obtain a signed block; and issuing the signed block to other node devices through a first node device in the blockchain network.
1 . A block generation method, wherein the method is applied to a block generation device, private key information is built in the block generation device, and the method comprises:
signing a block generated by the block generation device according to the private key information to obtain a signed block; and
issuing the signed block to other node devices through a first node device in a blockchain network.
2 . The method according to claim 1 , wherein the block generation device comprises a hash processor unit, before signing the block generated by the block generation device according to the private key, the method comprises:
performing hash calculation according to a specific hash algorithm built in the hash processor unit to obtain the block.
3 . The method according to claim 2 , wherein, before performing the hash calculation according to the specific hash algorithm built in the first processing unit to obtain the block, the method further comprises:
obtaining transaction data through the first node device, wherein the block includes the transaction data.
4 . The method according to claim 1 , wherein the block generation device comprises a key processor unit, and signing the block generated by the block generation device according to the private key comprises:
signing the block according to the private key information in the key processor unit to obtain the signed block.
5 . The method according to claim 1 , wherein the method further comprises:
obtaining, through the first node device, a signed block issued by a second node device in the blockchain network;
performing signature verification on the signed block issued by the second node device according to public key information;
performing proof-of-work verification on the obtained signed block after the signification verification succeeds; and
determining whether to add the signed block to a blockchain according to a result of the proof-of-work verification.
6 . The method according to claim 1 , wherein before signing the block generated by the block generation device according to the private key information, the method comprises:
determining, through the first node device, a number of blocks between a block last generated by the block generation device and a latest block in the current blockchain; and
determining that the number of the blocks is not less than a preset threshold m, wherein m is a positive integer greater than or equal to 1 and less than n, and n is a number of node devices in the blockchain network.
7 . A block generation method, wherein the method is applied to a block generation device, and the method comprises:
obtaining, through a second node device, a signed block issued by a first node device in a blockchain network;
performing signature verification on the signed block according to public key information;
performing proof-of-work verification on the signed block after the signature verification succeeds; and
determining whether to add the signed block to a blockchain according to a result of the proof-of-work verification.
8 - 11 . (canceled)
12 . A block generation device, wherein the block generation device comprising:
at least one processor unit, a communication interface, a memory and a communication bus; the at least one processor unit, the communication interface, and the memory communicate with each other through the communication bus;
the memory is configured to store program codes;
the at least one processor unit is configured to run the program codes to implement the following operations:
signing a block generated by the block generation device according to private key information built in the block generation device to obtain a signed block; and
issuing the signed block to other node devices through a first node device in the blockchain network.
13 . The block generation device according to claim 12 , wherein the at least one processor unit comprises a main processor unit and a hash processor unit; and
the main processor unit is configured to perform hash calculation according to a specific hash algorithm built in the hash processor unit to obtain the block.
14 . The block generation device according to claim 13 , wherein the at least one processor unit is also used for obtaining transaction data through the first node device, wherein the block includes the transaction data.
15 . The block generation device according to claim 12 , wherein the at least one processor unit comprises a main processor unit and a key processor unit; and
the main processor unit is configured to sign the block according to the private key information in the key processor unit to obtain the signed block.
16 . A block generation device, wherein the block generation device comprising:
at least one processor unit, a communication interface, a memory and a communication bus; the at least one processor unit, the communication interface, and the memory communicate with each other through the communication bus;
the memory is configured to store program codes;
the at least one processor unit is configured to run the program codes to implement the following operations:
obtaining, through a second node device, a signed block issued by a first node device in a blockchain network;
performing signature verification on the signed block according to public key information;
performing proof-of-work verification on the signed block after the signature verification succeeds; and
determining whether to add the signed block to a blockchain according to a result of the proof-of-work verification.
17 - 19 . (canceled)
20 . A non-transitory computer readable storage medium applied to a block generation device, private key information is built in the block generation device, wherein the non-transitory computer readable medium is used for storing a computer program, and the computer program comprises instructions for performing the following method:
signing a block generated by the block generation device according to the private key information to obtain a signed block; and
issuing the signed block to other node devices through a first node device in a blockchain network.
21 . The non-transitory computer readable storage medium according to claim 20 , wherein the block generation device comprises a hash processor unit, before signing the block generated by the block generation device according to the private key, the method comprises:
performing hash calculation according to a specific hash algorithm built in the hash processor unit to obtain the block.
22 . The non-transitory computer readable storage medium according to claim 21 , wherein, before performing the hash calculation according to the specific hash algorithm built in the first processing unit to obtain the block, the method further comprises:
obtaining transaction data through the first node device, wherein the block includes the transaction data.
23 . The non-transitory computer readable storage medium according to claim 20 , wherein the block generation device comprises a key processor unit, and signing the block generated by the block generation device according to the private key comprises:
signing the block according to the private key information in the key processor unit to obtain the signed block.
24 . The non-transitory computer readable storage medium according to claim 20 , wherein the method further comprises:
obtaining, through the first node device, a signed block issued by a second node device in the blockchain network;
performing signature verification on the signed block issued by the second node device according to public key information;
performing proof-of-work verification on the obtained signed block after the signification verification succeeds; and
determining whether to add the signed block to a blockchain according to a result of the proof-of-work verification.
25 . The non-transitory computer readable storage medium according to claim 20 , wherein, before signing the block generated by the block generation device according to the private key information, the method comprises:
determining, through the first node device, a number of blocks between a block last generated by the block generation device and a latest block in the current blockchain; and
determining that the number of the blocks is not less than a preset threshold m, wherein m is a positive integer greater than or equal to 1 and less than n, and n is a number of node devices in the blockchain network.
26 . A non-transitory computer readable storage medium, wherein the non-transitory computer readable medium is used for storing a computer program, and the computer program comprises instructions for performing the following method:
obtaining, through a second node device, a signed block issued by a first node device in a blockchain network;
performing signature verification on the signed block according to public key information;
performing proof-of-work verification on the signed block after the signature verification succeeds; and
determining whether to add the signed block to a blockchain according to a result of the proof-of-work verification.