Mingyang Chen, Zhiyao Zhao, Jiping Xu, Jiabin Yu, Xiaoyu Cui, Xin Zhang
Food-safety systems increasingly need to manage large detection files and externally generated analytical results across multiple organizations while linking these records to batch-level control actions. This study proposes a blockchain-based dual-track mechanism for trusted circulation of food-safety detection data and batch-level risk control, using aflatoxin B1 (AFB1) as the empirical case. High-dimensional files are stored in InterPlanetary File System (IPFS) and anchored on-chain by content identifiers (CIDs); three authorized oracles use two-of-three matching of detection values and evidence hashes before contract-based state determination. A stage-device-operation inverted index identifies associated batches, while signed second-track confirmations drive GREEN/YELLOW/RED state transitions. Experiments on a four-node Quorum Byzantine Fault Tolerance (QBFT) network used 57 independent HyperPistachio samples with 86.625-mebibyte (MiB) band-interleaved-by-line (BIL) files. Real-file access was successfully completed, single-oracle failures were tolerated when two consistent oracle reports remained, and associated-batch query latency increased only from 13.06 to 16.78 ms as fanout rose from 1 to 40. A 115.15 min sustained run maintained consistent states across all four nodes. The study manages externally supplied AFB1 results rather than evaluating analytical AFB1 detection accuracy, and its experimental validation is limited to the AFB1 case.