Patent ID: 11874820
Assignee: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Field: Digital communication (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 0:
1. A consensus method for a blockchain based on a Byzantine fault tolerance algorithm, comprising:
determining, by a first consensus node of a consortium blockchain, a first last block hash comprising one or more hash values of one or more blocks previous and closest to a latest block in a distributed ledger maintained by the first consensus node;
generating, by the first consensus node of the consortium blockchain, a first proposal digest based on the first last block hash and a first transaction hash of a transaction set needing to be proposed by the first consensus node;
initiating, by the first consensus node of the consortium blockchain, a consensus proposal comprising the transaction set needing to be proposed and the first proposal digest;
transmitting, by the first consensus node of the consortium blockchain, the consensus proposal to a second consensus node of the consortium blockchain;
in response to the second consensus node of the consortium blockchain receiving the consensus proposal;
determining, by the second consensus node of the consortium blockchain, a second last block hash comprising one or more hash values of one or more blocks previous and closest to a latest block in a distributed ledger maintained by the second consensus node;
generating, by the second consensus node of the consortium blockchain, a second proposal digest based on the second last block hash by:
determining, in the consensus proposal from the first consensus node, the transaction set needing to be proposed; and
generating the second proposal digest based on a second transaction hash of the transaction set determined in the consensus proposal and the second last block hash;

determining, by the second consensus node, whether one of the first consensus node or the second consensus node is forked, by detecting whether there is a mismatch between the first proposal digest and the second proposal digest; and
participating in, by the second consensus node, a consensus on the consensus proposal if it is determined that the first consensus node and the second consensus node are not forked by detecting that the first proposal digest matches the second proposal digest, and not participating in, by the second consensus node, the consensus on the consensus proposal if it is determined that one of the first consensus node or the second consensus node is forked by detecting that the first proposal digest does not match the second proposal digest.