install a blockchain platform

FIND A SOLUTION AT Academic Writers Bay

University of Wolverhampton
School of Mathematics and Computer Science
Student Number:
Name:
IoT Security Workshop 8

Lab Description
In this workshop we are going to install a blockchain platform. There are many implementations of blockchain in the market: some of them are public blockchains, others are private. Widely used implementations are under the umbrella project called Hyperledger (www.hyperledger.org) which is supported by the Linux Foundations. Every implementation has its own unique characteristics, for example Hyperledger Iroha is developed in C++ while Hyperledger Fabric is written in the GoLang language and Javascript. They also differ based on the consensus mechanisms they use or support. The choice of the correct implementation is something that depends on your business needs. Usually, when privacy and security are the main objective (as in IoT Security) the preferable choice is to use private-permissioned blockchain, having Hyperledger Fabric one the most important example.
Task 1, Hyperledger Fabric pre-requirements
Start you VM
Open a terminal and type this command to install docker and docker-compose. Docker is a platform to run containers inside your machine. Using containers, we can install a blockchain network inside a single machine (vm).
sudo apt-get -y install docker-compose
Using Internet, try to explain (with you own words) the differences between containers and traditional virtual machines. [MARKS]
To check if the installation went fine, type the following commands and check if you get similar output
To start docker every time the VM starts, type
sudo systemctl start docker
sudo systemctl enable docker
Docker is available only for users inside the group “docker” so we need to add our current user
sudo usermod -a -G docker <username>
where <username> is your user (you can see it in your prompt). Now restart the machine (or log-out and then log-in again) otherwise the new permissions are not applied.
Let’s have a final check with
docker run hello-world
and you should see
Now we need the GO language, created by Google. In the terminal, type
sudo snap install go –classic
Check if GO is installed correctly with
go version
and you should see something like “go version go1.16.3 linux/amd64”
Task 2, Install Hyperledger Fabric samples
Now, we need to clone the repository with
cd
curl -sSL https://bit.ly/2ysbOFE | bash -s
and the samples (and the docker images) will be downloaded
At the end, you will see a list of images
Each image is duplicated 3 times (even if the corresponding storage is not duplicated), according to the its version (2.3 => major release, 2.3.2 => major and minor, latest) which is used by docker to find the correct container. We need all these images to build a blockchain network.
Using Internet, search those images and try to explain what their roles in the network are. [MARKS]
Image
Role
Fabric-tools

YOU MAY ALSO READ ...  supply chain management functions

Fabric-peer

Fabric-orderer

Fabric-ccenv

Fabric-baseos

Fabric-ca

Task 3, Test your first network
Time to test our installation. In the terminal, type
cd
cd fabric-samples/test-network
In this directory (try with ‘ls -l’) you can find a script named “network.sh” which is used to start the network (with “./network.sh up”) and to stop it (with “./network.sh down”).
Let’s start the network…type
./network.sh up
And the output will be
As you can see, the script created 4 containers, more specifically:
A container of type “fabric-tools”, version “latest” which contains the commands/scripts to communicate with the network (for example the peers)
2 containers of type “fabric-peers”, version “latest”, which are the peers of two different organisations (org1 and org2)
1 container of type “fabric-orderer”, version “latest”, which has the duty to organise the creation of new transactions, implementing the consensus method.
We can also see the command used to start each container, as well as the ports exposed.
You can further check the status of the containers using
docker ps -a
Put your screenshot here. [MARKS]
Now you can stop the network with
./network down
This is the end of workshop 8. You can close your terminals and stop the machine.

YOU MAY ALSO READ ...  Research Paper Writing Service – Finding the Perfect One
Order from Academic Writers Bay
Best Custom Essay Writing Services

QUALITY: 100% ORIGINAL PAPERNO PLAGIARISM – CUSTOM PAPER