# Blockchain Traceability Process for Hairy Crab Based on Cuckoo Filter
## 3 ECMI Model  
As delineated in Figure 3, the present study introduces an innovative model, denoted as ECMI (Enhanced Cuckoo Merkle Index). This model is engineered to refine the mechanisms of data storage and retrieval within the blockchain ecosystem, with a particular emphasis on two fundamental processes: the initial encoding and storage of data fingerprints and the subsequent retrieval and validation of these fingerprints in response to user query demands. The ECMI model distinguishes itself from the conventional blockchain verification protocols, which are typically anchored in Merkle tree structures, by incorporating advanced cuckoo filter technology. This strategic integration not only augments the efficiency of data storage but also significantly amplifies the efficacy of the query verification process. Moreover, the cuckoo filter ensures a consistent and predictable query response time, a critical parameter in high-performance computing environments.  
The ECMI model exemplifies a paradigm of high operational efficiency while concurrently sustaining an exceedingly low false positive rate, a testament to its robustness and reliability in data integrity verification. The detailed elucidation of these two processes is presented in the ensuing sections, providing a comprehensive understanding of the model's operational dynamics and its implications for the field of blockchain technology.  
Considering the storage cost associated with storing all the data on the chain, the ECMI model adopts an efficient strategy: only the hash values obtained by hashing the full-process data of a single product are stored. These hash values are further processed through the cuckoo filter to generate data fingerprints, which are stored in the cuckoo filter. Meanwhile, the uplinked block data consist of these hash values to form a hash chain, and the corresponding hash chain Merkle tree is constructed based on this. The hash values that are stored on the blockchain are organised into a hash chain, which is a series of linked hash values that represent the data's journey from their origin to the current state. From these hash values, a Merkle tree is constructed. This tree structure is fundamental for the blockchain's ability to verify data integrity efficiently. The Merkle tree allows for the validation of data without the need to process the entire dataset, thus saving computational resources and time.  
When a user initiates a product traceability query request, the ECMI model first retrieves the fingerprint in the cuckoo filter. If the fingerprint does not exist, the query request is determined to be a failure, and the corresponding failure response is returned to the user. If the fingerprint is found, the model proceeds with a verification process using the Merkle tree. This involves validating the hash value against the Merkle tree to ensure the data's integrity and authenticity. The verification process is made more efficient by the fact that the data uploaded to the blockchain is compact (32 bytes post-hashing), leading to a reduced number of layers in the Merkle tree. This optimisation allows for swift verification, even with extensive datasets. Upon successful verification, the ECMI model retrieves and returns the complete process data associated with the product, ensuring that the user receives comprehensive and verified information. Conversely, if the verification fails, the system returns a failure response, indicating potential issues with data integrity.