Grocery giants Walmart and Sam's Club are requiring their lettuce suppliers to get on the blockchain bandwagon.

Those providing leafy green vegetables to the grocery chains will need to upload data about their foods to blockchain within a year, the companies said in letters to suppliers Monday.

The companies highlighted an E. coli outbreak in romaine lettuce that recently affected more than 200 people and salmonella in products such as eggs and breakfast cereal. Using blockchain and storing the information digitally, a supplier could theoretically see which farms are infected and quickly stop the supply to restaurants and consumers.

"Walmart believes the current one-step up and one-step back model of food traceability is outdated for the 21st Century and that by, working together, we can do better," Walmart said in its letter. "There is no question that there is a strong public-health and business-case for enhanced food traceability."

Even when Walmart has been able to determine affected areas and get the foods out of grocery stores, it said, millions of heads of romaine lettuce had to be removed from the marketplace, and consumers lost confidence regardless of the region it was grown in.

With blockchain, all fresh leafy greens suppliers are expected to be able to trace their products back to farms "in seconds – not days," Walmart said in a letter to suppliers. Direct suppliers will be required to conform to Walmart's standards and "enable end-to-end traceability" back to farms by Sept. 30, 2019, the company said.