In recent years, agricultural product safety accidents have raised public concern, jeopardizing people’s dietary safety and health. In order to keep track of specific information through the entire supply chain, including the production, logistics, processing, and sales processes, as well as to quickly find and prevent agricultural product safety problems, it is important to build a trusted traceability system. Traditional centralized traceability systems exist with the issues of insecure data storage, low traceability reliability, and single-point attack vulnerability. Blockchain technology has the characteristics of being data tamper-proof, distributed, decentralized, and traceable, which makes it a promising technology for agricultural product traceability.
Agricultural products are highly prized for their freshness, health, and nutritional value. Simultaneously, chlorophyll is abundant in agricultural products, which promotes metabolism and alleviates fatigue. However, because agricultural products’ preservation and storage requirements, as well as their transportation requirements, are more stringent, agricultural safety accidents frequently occur 
Agricultural product safety incidents put people’s dietary safety and health at risk, which causes a major crisis in consumer trust in the agricultural industry. As a result, countries around the world have started to value agricultural product supply chain traceability and have passed laws and regulations to improve agricultural product traceability management. China’s 2009 Food Safety Law requires that food producers use information technology to keep track of production and operation data and set up a food safety traceability system 
. The European Union’s General Food Law, enacted in 2002, requires the food industry to establish a comprehensive traceability system that enables timely and accurate recall targets and information delivery to consumers 
Traceability has developed into a critical component of the agricultural supply chain. The traceability of agricultural products refers to the process of tracing all links in the agricultural product’s supply chain 
. The agricultural product traceability system records the key details of the entire process of agricultural products from production to the table. Through the agricultural product traceability system, consumers can obtain information about the source of agricultural products they consume, and regulators can quickly identify problematic agricultural product links, identify responsible parties, recall problematic products in a timely manner, and minimize losses to the greatest extent possible 
. However, the supply chain for agricultural products is complex, making agricultural safety supervision and traceability particularly challenging in practice. The majority of existing traceability systems use a centralized architecture that is managed and maintained by a third party, such as a business or government agency 
Trusted traceability means the security, integrity, availability, accountability, and nonrepudiation of traceability information can be ensured, and the serious trust problem caused by centralized, monopolistic, asymmetric, and opaque agricultural product supply chains can be solved. How to achieve trusted traceability for agricultural products has attracted increasing attention from academics and practitioners 
. A potential solution to achieve the above goal is blockchain technology, which can ensure data integrity and prevent tampering and any single-point failure 
. Blockchain technology has gained widespread attention as a result of the emergence and popularity of cryptocurrencies such as Bitcoin 
. Blockchain is a decentralized, tamper-resistant, and traceable distributed database that utilizes a cryptographic algorithm to create a chain structure composed of chronologically ordered blocks of data 
. Through distributed data storage, encryption algorithms, peer-to-peer transmission, and other technical support, blockchain technology can ensure the secure storage of traceability data and the nonrepudiation of information sources, enabling agricultural products to have trusted traceability 
Blockchain can provide a secure access environment for the large amount of data generated by sensors used within the agricultural supply chain 
. However, blockchain technology faces new technical challenges, including transaction processing capacity and data explosion 
. As a result, processing and storing agricultural product traceability information directly on the blockchain is challenging. In addition, because all data on the blockchain are public and transparent, this could lead to private and sensitive enterprise information leaking.
2. Agricultural Product and Blockchain
Blockchain is a decentralized ledger that stores transaction information in blocks and connects all blocks via a chain 
. Blockchain technology originated with a 2008 paper titled “Bitcoin: a peer-to-peer electronic cash system” published by an academic named Nakamoto 
. A blockchain network does not require a trusted central server and can be run decentralized 
. It is available to anybody, and all nodes in the distributed peer-to-peer network share the same data, verifying transactions according to a consensus mechanism 
. Therefore, blockchain has the characteristics of immutability, transparency, and trustworthiness 
. Additionally, blockchains can be classified as public blockchains, private blockchains, or consortium blockchains depending on some principles, such as the authentication and access control techniques 
2.2. Smart Contract
The concept of smart contracts, introduced by Nick Szabo in 1997 
, has gained popularity with the rapid development of blockchain technology 
. A smart contract is a self-executable, self-enforceable, self-verifiable, and self-constraining piece of source code stored on the blockchain 
. Ethereum was the first blockchain platform that introduced smart contracts 
. Ethereum supports the Turing-complete scripting language, which allows writing smart contracts with complex logic. Ethereum’s core is the Ethereum virtual machine (EVM), which can execute complex code on the blockchain.
The Interplanetary File System (IPFS) is a peer-to-peer distributed file system where data are stored in the form of chunks 
. Any node in an IPFS network is independent and does not need to trust the others, so there is no single point of failure as in traditional HTTP (Hyper Text Transfer Protocol) transmission 
. When a user stores a file in IPFS, IPFS generates a 32-bit hash as a result of data storage. The peer-to-peer transmission of IPFS can significantly reduce network bandwidth consumption, and distributed files can significantly reduce the risk of DDoS (Distributed denial of service) attacks 
2.4. Related Research
Traceability refers to the ability to obtain any or all information throughout its entire life cycle using recorded identifications 
. Traceability enables users to track agricultural products throughout their lifecycle, from raw ingredients to manufacturing, processing, shipping, and consumption 
. For agricultural products, if a safety or quality incident occurs, the supply chain link causing the problem can be swiftly identified, blame can be assigned, and targeted punitive measures can be executed. As a result, building a traceability system for agricultural products is an effective way to make sure that agricultural products are safe and to build trust between agricultural producers and their customers.
Blockchain technology has the characteristics of being data tamper-proof, distributed, decentralized, and traceable, which provides a possible solution to the traditional agricultural product traceability system 
. In recent years, more and more scholars have conducted exploratory research on the application of blockchain technology in traceability scenarios. Table 1
provides a critical analysis of the existing works in the literature.
Zhao et al. reviewed existing work on blockchain technology in agri-food value chain management and summarized the key challenges, mainly including storage capacity and scalability issue, privacy leakage, regulation problems, high cost problem, throughput and latency issue, and lack of skills 
. Feng Tian proposed an agri-food supply chain traceability system based on RFID and Blockchain technology, which enhanced the reliability of agri-food traceability information 
. However, the system has the issues of high cost, data privacy leakage, and storage capacity issue. Liu et al. proposed an RFID-based blockchain big data traceability security model to achieve secure RIFD big data traceability management 
. This scheme is at the stage of theoretical analysis and has not been implemented and tested on a specific blockchain platform.
Table 1. Critical analysis of the existing works in the literature.
||To use blockchain combined with RFID for building the agri-food supply chain traceability system.
||Enhance the reliability of the agri-food traceability information.
||High cost for using RFID; data privacy leakage; Poor system storage capacity issue
|Liu et al. 
||Proposed a Security Provenance Model for RFID Big Data Based on Blockchain
||Blockchain, RFID big data
||Applying blockchain technology in the process of tracking and tracing IoT big data.
||No detailed experimental process and analysis process.
|Lin et al. 
||Proposed a food safety traceability system based on blockchain and EPCIS
||Ethereum, EPCIS and Smart Contract
||Collaborative management model of on-chain and off-chain data
||System performance is limited by the amount of data.
|Baralla et al. 
||Proposed a generic agri-food supply chain traceability system based on blockchain technology.
||Hyperledger Sawtooth, Smart contract
||Eliminate the centralization of information in the supply chain.
||The issue of enterprise data privacy leakage; Low maturity of the Sawtooth platform.
|Chen et al. 
||Designed a food traceability system based on blockchain
||Ethereum, Smart Contract
||Detailed system design and traceability process
||No traceability information privacy protection
|Dey et al. 
||Proposed a Blockchain and QR-code-based framework to digitize food production information and retrieval.
||Blockchain, QR Code, and Cloud computing
||Offer flexible scalability and improve the storage capacity.
||The framework need more computationally powerful cloud server as the number of products grows.
|Dey et al. 
||Proposed a blockchain-based framework to reduce food waste in a Web 3.0-enabled smart city.
||Machine Learning, Blockchain, Cloud Computing, and QR Code
||Use several cut-ting-edge technologies in conjunction to reduce food waste efficiently.
||Lacks in showing the specific implementation details
Lin et al. proposed and implemented a food safety traceability system based on blockchain and EPCIS and adopted the dynamic management of on-chain and off-chain data to solve data explosion problems on the blockchain 
Baralla et al. proposed a generic agri-food supply chain traceability system based on Hyperledger Sawtooth 
. Consumers can easily access traceable and verifiable product information by using QR codes. However, privacy data protection was not discussed in the system, and the maturity of the Sawtooth platform is relatively low.
Chen et al. designs a food traceability system based on the Ethereum platform and devises a dual storage model to store the complete data in the local database and the hash value of traceability information in the blockchain, thus improving the operational efficiency of the blockchain and solving the scalability problem of the blockchain 
Dey S et al. proposed a blockchain and QR (Quick Response)-code-based framework for digitizing food production information and retrieval, thereby making it easily accessible, traceable, and verifiable by consumers and producers 
. The proposed framework was implemented at a large scale in the cloud, which can improve the storage capacity of blockchain and offer flexible scalability as per the consumer’s demand. However, if the farm produces more than 10,000 items per day, the framework will require a more powerful cloud server, which may result in increased costs. Dey et al. used several cutting-edge technologies, including blockchain technology, cloud computing, QR codes, and reinforcement learning in conjunction to develop a framework that could reduce food waste efficiently