On-chain vs off-chain traceability
A blockchain is great at proving that a record hasn't changed and poor at storing documents. The practical answer for fresh produce is to keep the data off-chain and its fingerprint on-chain.

Side by side
| All data on-chain | Off-chain package + on-chain hash (CHAIN-TRACE) | |
|---|---|---|
| What is stored on the chain | Every field and document | Supplier, product, record type, file name, hash |
| Privacy | Visible to every node, permanently | Encrypted; supplier chooses who sees what |
| Documents & photos | Impractical | PDF, XLS, DOC, JPG in the package |
| Cost per record | High, grows with data size | Low and fixed |
| Tamper evidence | Yes | Yes – any change breaks the hash |
| Deleting data after retention | Not possible | Packages purged after 4 years |
How a CHAIN-TRACE verification works
Package
Producepak builds a traceability package for a batch, pallet or invoice.
Hash
CHAIN-TRACE encrypts the package, stores it off-chain and writes its hash to a new blockchain record.
Scan
A purchaser or consumer scans the QR code or enters the code in the portal.
Verify
Several nodes recompute the hash and compare it with the chain record before the report is shown.
The same blockchain-plus-database pattern is used in academic produce traceability platforms such as the one described in Computers (MDPI), 2024, built on Hyperledger Fabric.
Questions
Is off-chain data less secure?
No. The file is encrypted and its hash is on-chain; any change to the file changes the hash, so tampering is detectable by anyone verifying it.
Why not store everything on-chain?
On-chain data is permanent, public to every node and expensive to store. Commercial documents, photos and personal data don't belong there.