A decade ago in the United States, a deadly strain of E. coli in tainted spinach ripped through 26 states, killing three people and sickening more than 200. The outbreak represents what can happen when sourcing food—and tracing contaminations—goes horribly wrong.
“Consumers, in general, stopped eating spinach. Restaurants pulled it off the menu,” says Frank Yiannas, vice president of food safety at Walmart (WMT). “If you could track and pinpoint where that came from faster, you could alleviate all that and ensure consumer confidence continues.”
This is the impetus behind the retailer’s latest unlikely project intended to overhaul the supply chain. Walmart is teaming up with IBM (IBM) and Tsinghua University in Beijing to digitally track the movement of pork in China on a blockchain, also known as a distributed ledger.
Such a system could help prevent disaster scenarios like the fatal, nationwide outbreak described above, Yiannas says.
Get Data Sheet, Fortune’s technology newsletter.
Walmart plans to use technology developed by the Hyperledger Project, an open source software project that builds blockchain tools and is based out of the Linux Foundation, a non-profit organization that maintains the code for a popular eponymous operating system. The blockchain in question, a private database co-developed by IBM, is designed to provide the retailer with a way to indelibly record a list of transactions indicating how meat has flowed through a commercial network, from producers to processors to distributors to grocers—and finally, to consumers.
“Consumers today want more transparency about where and how a product came to be,” Yiannas tells Fortune on a call from Beijing. “If you shine a light on the food system, that leads to transparency.”
Paul Chang, a global supply chain lead at IBM, says that the trial represents a substantial improvement over earlier projects that solely used barcodes and radio ID tags. “The missing piece was a shared forum where companies could begin to see each others’ transactions and develop trust,” he said. “That missing piece is something like the blockchain.”
Information to be stored on the blockchain, where fraud and inaccuracies are much harder to get away with, includes details related to farm origins, factory data, expiration dates, storage temperatures, and shipping. “We can eliminate layers that exist today that add very little value to the industry,” Chang said.
For more on IBM, watch Fortune’s video:
Chinese agriculture, in particular, has been notorious for running afoul of food safety mandates. One of the most well known incidents was a 2008 scandal in which milk and infant formula laced with melamine, a toxic chemical, killed six children, hospitalized tens of thousands, and rendered ill hundreds of thousands of others.
The Chinese government revised its food safety regulations in the hopes of avoiding similar calamities last year. The law calls for better record-keeping, more supervision, and stricter health guidelines.
“China’s rapid economic growth has led to massive opportunities for innovation, but it has also presented quality of life challenges, including ensuring that food sold in the country is safe to eat,” said Chai Yueting, a professor at Tsinghua University, in a statement.
China has also become a hotbed for research involving blockchain technologies and cryptocurrencies such as Bitcoin. (You can read more about Bitcoin’s biggest rival, Ethereum, in this recent Fortune feature story.)
In addition to announcing the blockchain-based pilot program, Walmart opened a food safety collaboration center in Beijing on Wednesday. Yiannas said that if the supply chain pilot program is a success, then Walmart will consider expanding trials to include more foodstuffs.
“The entire basket is the limit,” he said.