Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Blockchain by (12.7k points)

I was reading through the documentation of Hyperledger Fabric and found a very confusing aspect. I do not know if it really is a security issue or if I have misunderstood something.

 what I understood is the interface of the smart contract needs to be the same when it is instantiated on different peers. Does that mean that I can have different business logic within the smart contract functions while having same interface when deploying it to different peers?

If I am correct, doesn't this mean a BIG security issue in the design? Any help in understanding the concept better would be appreciated.

1 Answer

0 votes
by (29.5k points)

Chaincode interface is strictly defined and cannot be changed. You have one method to handle initialization aspect of you logic while rest would be executed via Invoke method. Now, during chaincode install/instantiation computed hash of the chaincode and persisted within lifecycle namespace bound to chaincode. Therefore if another peer will have different binary code and will try to use it, peer will fail to execute it.

Browse Categories

...