Reputation: 477
Does Hyperledger Fabric have virtual machine for executing chaincode? For instance, Ethereum has Ethereum Virtual Machine to execute contracts.
Upvotes: 2
Views: 2888
Reputation: 4037
Hyperledger fabric does not (currently) run a VM in the way that Eth does, for instance. Rather, Hyperledger fabric has two means of deploying and executing chaincode (software that manages the world state of a blockchain/ledger - similar to a smart contract): a) system chaincode which executes inline within the peer node itself and, b) chaincode that is external to the peer node and is deployed to a Docker container that is orchestrated by the peer node. In both cases, the peer node serves as a proxy to the chaincode for the clients that interact with the chaincode via either the SDK, CLI or REST API. In the latter case, the chaincode is actually published to and stored in the blockchain and the network participants must achieve consensus on the transaction that does so before the container is deployed and transactions can be invoked on the chaincode.
Upvotes: 2
Reputation: 963
In Hyper Ledger, the chain code is deployed by Validating Peers ( Nodes which can execute transactions and create consensus). And each chain code when deployed, its actually deployed in an isolated Sandbox(VM) of its own. This VM is implemented with a Docker. This is usually referred to as Chain code container or Docker Container. And this container implements build, start and stop methods. I hope this answers your question. To know further, please refer to https://github.com/hyperledger/fabric/blob/master/docs/protocol-spec.md
Upvotes: 6