With the improvement of living standards,people have higher and higher requirements for food safety quality,and the endless food counterfeiting problems in recent years have made the demand for food traceability increasingly urgent.The traditional centralized-based food supply chain traceability system is a more mature solution,but there are trust problems caused by data managers who can arbitrarily tamper with data in the database.The food supply chain traceability system based on blockchain technology utilizes the decentralization and data tamper-evident characteristics of blockchain,which can well solve the trust problem of centralized food traceability system and provide credible food traceability information.The current food supply chain traceability systems implemented based on blockchain technology are divided into two types: public chains and federated chains.Since this paper studies the application scenario of food traceability data involving only multiple large related organizations,it is implemented using the Fabric-based federated chain technology.However,Fabric,the more commonly used consensus algorithm for coalition chains,suffers from high communication complexity and rapid decline in system throughput and growth in consensus latency as the number of nodes increases.A Byzantine fault-tolerant grouping hybrid consensus mechanism is proposed,which first randomizes the groups,then uses the chain-raft Byzantine fault-tolerance consensus algorithm within the groups,and finally uses the PBFT(Practical Byzantine Fault Tolerance)consensus algorithm between the groups to complete the consensus.The current food supply chain traceability system only considers food traceability information or food raw material traceability information,and there is a lack of correlation between food and food raw material,and the system is weak in anticounterfeiting.Moreover,most of the existing food supply chain traceability systems are stored in single-chain structure,and the response speed of traceability query will gradually decrease with the increase of traceability data volume.We propose to store food traceability information and food raw material traceability information by using Merkle tree structure,enhance the correlation between food and food raw material to improve the anti-counterfeiting of the system,and realize the isolated storage of food traceability information and food raw material traceability information with the help of Fabric multichannel and multi-chain structure.The blockchain-based food supply chain traceability system proposed in this paper realizes the functions of food information query,food raw material information query,food and food raw material association storage and multi-channel multi-chain storage,and applies the proposed consensus mechanism to reduce the message complexity by 92%compared with PBFT with 16 nodes divided into four groups,and the throughput reaches3.6 times of PBFT,and the traceability time delay can be reduced by 4 times compared with single-chain structure with uniform data distribution in the four-chain structure.The traceability delay can be reduced by 4 times compared with the single-chain structure. |