Reputation: 149
It the hyperledger documentation, it's stated that when implementing some features is difficult or impossible then we use system chaincode to implement those features.
But, user chaincode uses "Go" which is Turing-complete language. So, it seems to me, everything can be implemented on it (unless its cost is prohibitively high but this is not defined anywhere in hyperledger documentation).
Question 1: What kind of operations is hard or impossible to implement in user chaincode?
Question 2: When do we use system chaincode?
Upvotes: 1
Views: 286
Reputation: 5140
Question 1: What kind of operations is hard or impossible to implement in user chaincode?
Operations that need access to native peer services like its communication layer, its Membership Service Provider (MSP) service, etc. But also operations like computing a pre-image of a 1-way function, or operations that decide whether a given code stops on a given input.
Question 2: When do we use system chaincode? In 2 types of cases:
Upvotes: 2