CPC G06F 9/463 (2013.01) [G06F 9/466 (2013.01); G06F 9/546 (2013.01); H04L 9/0643 (2013.01); H04L 9/50 (2022.05)] | 20 Claims |
1. A method for block processing in a blockchain, comprising:
determining, by a first node in the blockchain, whether a transaction queue meets a preset block generation condition;
in response to the transaction queue meeting the block generation condition, packaging, by the first node, first transaction information in the transaction queue of the first node into a candidate block, and broadcasting the candidate block through the blockchain;
performing, by the first node, verification on the first transaction information in the candidate block to generate a first verification result, and executing the first transaction information in the candidate block to generate a first transaction execution result;
broadcasting, by the first node, a first node processing result comprising the first verification result and the first transaction execution result through the blockchain;
receiving, by the first node, a second node processing result broadcast by a second node in the blockchain through the blockchain, the second node processing result comprising: a second verification result generated by the second node by performing verification on the first transaction information in the candidate block, and a second transaction execution result generated by executing the first transaction information in the candidate block by the second node; and
performing, by the first node, consensus on the candidate block according to the first node processing result and the second node processing result, saving, by the first node, the candidate block in response to a consensus on the candidate block being reached successfully, and saving, by the first node, the first transaction execution result in response to the first transaction information being executed successfully.
|