The MPC-Sample is a simple Hyperledger Fabric application gateway with mpc functionalities:
- built starting from fabric-samples and implementing mpc functionalities through a sample provided by lattigo
- inspired by ORide
This sample includes smart contract and application code in Go and is thought to be a simple demo. This sample shows creation of an asset representing a result of Oblivious Homomorphic Encryption based computation. Application's main goal is presenting a decentralized solution to the problem described by ORide developers, built upon Hyperledger Fabric Blockchain Infrastructure.
Follow the execution flow in the client application code, and corresponding output on running the application. Pay attention to the sequence of:
- Transaction invocations (console output like "--> Submit Transaction" and "--> Evaluate Transaction").
- Results returned by transactions (console output like "*** Result").
The smart contract (in folder chaincode-go
) implements the following functions to support the application:
- CreateService
- ReadService
- UpdateService
- DeleteService
- TransferService
- GetAllServices
- ServiceExists
Note that the asset transfer implemented by the smart contract is a simplified scenario, without ownership validation, meant only to demonstrate how to invoke transactions.
The Fabric test network is used to deploy and run this sample:
Create test network, deploy chaincode and run application through its Gateway
./run_mpc_app.sh --up
Once and until the network is up, chaincode is deployed and application is executable (from the MPC-Sample/application-gateway-go
folder):
go run .
When you are finished, you can bring down the test network (from the test-network
folder). The command will remove all the nodes of the test network, and delete any ledger data that you created.
./run_mpc_app.sh --down
All work is done with respect to original authors and owners provided Licenses