Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does shim in fabric chaincode stand for?

I see lots of word "shim" in Hyperledger fabric chaincode samples like

func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {

which is imported from

import (
    "errors"
    "fmt"

    "github.com/hyperledger/fabric/core/chaincode/shim"
)

What is shim the abbreviation of?

like image 845
Satoshi Nakanishi Avatar asked Feb 27 '17 14:02

Satoshi Nakanishi


Video Answer


1 Answers

Shim in computing is used when referring to adapting software layers between different interfaces/components. In the context of Hyperledger Fabric, Shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes. Shim contains the generic means for chaincode and validating peer to communicate with each other.

For more information, you can check Chaincode Protocol specification

like image 84
Aleksi Sitomaniemi Avatar answered Oct 12 '22 23:10

Aleksi Sitomaniemi