Skip to content
ZhiShuYun LogoZhiShuYun
Free codes on signup, register now →
Blockchain

Hyperledger Fabric in Supply Chain Traceability: Implementation in Practice

2025-10-25ZhiShuYun Blockchain Team11 min

Architecture design, consensus mechanism selection, smart contract development for enterprise consortium blockchain Hyperledger Fabric in traceability scenarios, and integration with China's national blockchain infrastructure Xinghuo Chain Network.

Blockchain's immutability characteristic is a natural fit for traceability scenarios. ZhiShuYun has built an enterprise-grade consortium blockchain notarization network based on Hyperledger Fabric 2.5, writing critical traceability data (production batches, quality inspection reports, logistics trajectories) to the blockchain to ensure data is immutable, auditable, and legally admissible.

For consensus mechanism selection, we chose Raft ordering service — compared to Kafka, Raft requires no additional ZooKeeper dependency and is simpler to deploy; compared to PBFT, Raft offers a more balanced performance and fault tolerance profile in consortium chain scenarios. In actual testing, a 3-node Raft cluster achieved stable TPS of 3,000+, fully meeting the throughput requirements of traceability data on-chain.

Smart contracts (Chaincode) are developed in Go, implementing four core functions: RegisterProduct, RecordTraceEvent, UpdateBatchStatus, and QueryHistory. The contract design follows the single responsibility principle, with each function independently deployed to reduce upgrade and maintenance complexity.

Integration with CAICT's Xinghuo Chain Network is a significant milestone. Xinghuo Chain Network uses a custom BID (Blockchain Identifier) identity system and data format. We developed a Xinghuo Chain Network adapter that implements bidirectional conversion between Fabric transaction format and Xinghuo Chain Network format, enabling enterprise data to be simultaneously notarized on both private consortium chains and national blockchain infrastructure, meeting cross-border trade data mutual recognition requirements.