# Research on Flexible Traceability System of _Agaricus bisporus_ Supply Chain
## 4 Design of the System
### Design Concept  
Consumer, enterprise, and regulatory entities, as pivotal stakeholders in traceability, present distinct requirements and utilization patterns for traceability data. This leads to notable disparities in aspects such as capacity, privacy, and security. Consumer demands for traceability data capacity are relatively modest, primarily encompassing fundamental information on cultivation, storage, processing, logistics, and sales within the _Agaricus_bisporus_ supply chain. These details typically entail straightforward data with relatively small volumes.  
Conversely, enterprises and regulatory bodies necessitate higher traceability data capacity, seeking more extensive and detailed insights. This includes comprehensive information on growth environment specifics, product quality inspection data, qualification reports, and other substantial datasets, resulting in larger data volumes. These stakeholders engage with traceability data in a manner that requires a more comprehensive and detailed understanding of the _Agaricus bisporus_ supply chain, thus demanding a higher capacity to accommodate the larger volumes of data involved. In terms of traceability data privacy and security, it is imperative to ensure secure data transmission and storage for both consumers and enterprises. This can be achieved by employing triple-layer data encryption algorithms for ciphertext storage of traceability data in off-chain databases. Regulatory entities additionally need to verify the source and authenticity of the traceability data, and conduct risk assessments and compliance checks on the data.  
The single-chain structure in conventional blockchain models encounters challenges pertaining to diminished query efficiency and redundant traceability data. In response, we advocate for the establishment of three distinct main chains: a public chain, an enterprise chain, and a regulatory chain, each tailored to the specific needs of traceability stakeholders. Multi-chain technology serves as a safeguard for data security and privacy, ensuring that different traceability entities are shielded from the potential risk of disclosing proprietary information to third-party entities.  
Within the traceability chain and the risk chain, nodes at various stages play crucial roles in maintaining the ledgers of all three main chains. This configuration enables both upstream and downstream enterprises to access pertinent data through local nodes at each stage. However, consumer nodes are confined to retrieving traceability data solely through dedicated consumer traceability nodes within the traceability chain. Similarly, regulatory nodes are restricted to supervising risk data solely within the regulatory chain, precluding access to data housed in the other chains.  
This methodical approach not only upholds the confidentiality of internal data exchanged between upstream and downstream enterprises, but also endows each traceability entity with access solely to duly authorized data. Thus, it effectively establishes controlled access permissions tailored to the distinctive requirements of different traceability stakeholders [23; 24].