Ajitesh kumar soni
BiniBFT - An Optimized BFT on Fabric
Evaluation 1 - Report
Submitted By: Ajitesh kumar Soni
Collaborative Learning Program
Engagement Details
Name of Mentee | Ajitesh Kumar Soni |
Evaluation Period | 06-07-2023 to 11-08-2023 |
Task | RAFT familiarization & an application implementation using it |
Date Submitted | 12-08-23 |
Mentor | Dr. Anasuya Threse Innocent |
Tasks, Objectives, and Results
This Evaluation report consolidates the candidate’s work for Hyperledger CLP - BiniBFT project by BiniWorld Innovations Pvt Ltd during the internship (Weeks 1-6). The report has been categorized into two sections: outline the key task assigned to the candidate and day-to-day activities undertaken by the candidate.
Key Outline of the Task assigned to the candidate (This includes Project name, Problem statement, expected Output and other relevant details)
Implemented a fabric-sample and perform relevant transactions on it using CLI interface:
By running its test network and perform transactions as the functions are created in the SmartContract.go containing following functions:
- InitLedger: This transaction initializes the ledger by adding a predefined set of base assets.
- CreateAsset: It issues a new asset to the world state with the provided details.
- ReadAsset: This transaction retrieves an asset from the world state based on the given asset ID.
- UpdateAsset: It updates the details of an existing asset in the world state using the provided parameters.
- DeleteAsset: This transaction removes a specified asset from the world state.
- AssetExists: Checks whether an asset with a given ID exists in the world state and returns a boolean value.
- TransferAsset: Updates the owner field of an asset with a given ID in the world state, returning the previous owner's information.
- GetAllAssets: Retrieves all assets stored in the world state.
- Chaincode on the network using the command:
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go
- InitLedger: run the following command to call in InitLedger function
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'
assets := []Asset{
{ID: "asset1", Color: "blue", Size: 5, Owner: "Tomoko", AppraisedValue: 300},
{ID: "asset2", Color: "red", Size: 5, Owner: "Brad", AppraisedValue: 400},
{ID: "asset3", Color: "green", Size: 10, Owner: "Jin Soo", AppraisedValue: 500},
{ID: "asset4", Color: "yellow", Size: 10, Owner: "Max", AppraisedValue: 600},
{ID: "asset5", Color: "black", Size: 15, Owner: "Adriana", AppraisedValue: 700},
{ID: "asset6", Color: "white", Size: 15, Owner: "Michel", AppraisedValue: 800},
}
GetAllAssets:Retrieves all assets stored in the world state.
TransferAsset:Updates the owner field of an asset with a given ID in the world state