US 12,238,230 B2
Blockchain consensus method, apparatus, and device, and storage medium
Yan Huang, Shanghai (CN); Qinglin Hu, Shanghai (CN); Yu Zhou, Shanghai (CN); Weihuai Liu, Shanghai (CN); Jingxiu Hu, Shanghai (CN); Xu Le, Shanghai (CN); Yuzhuang Xu, Shanghai (CN); Hehe Wang, Shanghai (CN); and Zhaoye Xu, Shanghai (CN)
Assigned to CHINA UNIONPAY CO., LTD., Shanghai (CN)
Appl. No. 18/575,811
Filed by CHINA UNIONPAY CO., LTD., Shanghai (CN)
PCT Filed Aug. 4, 2022, PCT No. PCT/CN2022/110336
§ 371(c)(1), (2) Date Dec. 29, 2023,
PCT Pub. No. WO2023/071373, PCT Pub. Date May 4, 2023.
Claims priority of application No. 202111277507.8 (CN), filed on Oct. 30, 2021.
Prior Publication US 2024/0163121 A1, May 16, 2024
Int. Cl. H04L 9/00 (2022.01); H04L 9/06 (2006.01)
CPC H04L 9/50 (2022.05) [H04L 9/06 (2013.01)] 16 Claims
OG exemplary drawing
 
1. A blockchain consensus method, applied to a node in a blockchain system, the method comprising:
determining, from a plurality of sub-blockchains, a target sub-blockchain based on information in a block header of a target block, wherein the target block is a first target block generated by the node based on transaction data or a second target block obtained by synchronizing with other nodes;
adding the target block to the target sub-blockchain;
obtaining, from the plurality of sub-blockchains, a sequence of valid blocks for each of the plurality of sub-blockchains, wherein each sequence of valid blocks includes at least one valid block; and
globally ranking the obtained valid blocks based on a logical clock corresponding to each of the obtained valid blocks, to obtain a global blockchain,
wherein generating the first target block based on the transaction data comprises:
merging other field information in fields of the block header of the first target block excluding an auxiliary information field to obtain merged data, and hashing the merged data to obtain a package hash, wherein the other field information includes at least a global snapshot flag of the plurality of sub-blockchains, a transaction root hash of the transaction data, and a block hash of a longest-clock block pointed to by the first target block, wherein the longest-clock block pointed to by the first target block is a legal block with a largest logical clock detected by the node when generating the first target block;
processing the package hash using a verifiable delay function to obtain a verifiable output result;
determining the target sub-blockchain to which the first target block to be added, a corresponding parent block in the target sub-blockchain, and a corresponding parent block hash and a parent block proof based on the verifiable output result; and
obtaining the first target block based on the other field information, the verifiable output result, the parent block hash, the parent block proof, and the transaction data.