Abstract:
The safety of agricultural products concerns people's health. To ensure food safety and accountability, it is crucial to establish a credible food traceability system. The blockchain technology can greatly improve the integrity, security and credibility of traceability information of traditional agricultural product traceability system, thanks to its properties such as decentralization, non-tamperability and information traceability. This paper proposes an improved blockchain consensus algorithm, based on the Credit-Supervisor Byzantine Fault Tolerance (CSBFT). It mainly includes credit update strategy and supervisor node selection strategy. Various credit update strategies are formulated according to the node types and whether they can actively forward a message, and then the supervisor node selection strategies are made based on the credit of the node. The CSBFT algorithm uses the supervisor to monitor the behavior of the master node to prevent problems such as sending different messages to different nodes; while the consensus mechanism of centralized nodes and distributed nodes can improve the supervisory node generating efficiency because the master node does not need to be generated cyclically and it can choose a more reliable node as a supervisory node according to the supervisory node selection strategy. To prove the effectiveness of CSBFT algorithm, the paper uses the common transfer transaction information as experimental data and the experiments were repeated ten times to compare the consensus delays of PBFT (Practical Byzantine Fault Tolerance), MBFT and CSBFT with the transaction numbers of 5, 10, 20 and 50 respectively. The average of 10 repeated experiments is used as the final statistical value and the result proves that CSBFT has higher robustness, lower consensus delay and higher safety. This paper studied and analyzed the information flow of the whole industrial chain of crops from agricultural product purchase, planting management, processing and production, logistics and transportation to grain sales, to build a blockchain alliance chain based on CSBFT. It analyzed, designed and realized the whole industrial chain information traceability platform based on embedded CSBFT, via object-oriented software engineering method. The platform can automatically save the key up-chain information through pre-designed smart contracts to generate corresponding traceability codes for consumers to query. Compared with the traditional food traceability system, the CSBFT algorithm endows the platform with higher security and less delay in information chaining. Future research on data privacy protection will be conducted. To protect the data privacy, users of various levels in the whole industrial chain hesitate to share their data. Therefore, how to collect and share the information without leaking the private data is the future research direction.