Does Hyperledger-Fabric provide a way to find out who (msg.sender in Ethereum) is called a chain?
2 answers
To add to Mo-Che Chan's answer:
func (stub *ChaincodeStub) GetCreator() ([]byte, error)
GetCreator returns the SignatureHeader.Creator of the signed object referenced by this stub.
GetCreator must receive a signed offer and offer.
From the HyperLedger Blog :
The Creator field stores the x.509 certificate, public key, and membership (MSP) that issued this information to the client. The Nonce field contains some random bytes.
type SignatureHeader struct { Creator []byte Nonce []byte }
And from another post on the same blog, block structure diagrams. It has a section in each transaction (see line 4) for
Developer ID (certificate, public key) - Client
It seems that yes, it would be the equivalent of msg.sender in Solidity.
+2
source to share