Posted By : Sakshi
Before developing a custom Blockchain solution with the help of Multichain, one must have a good understanding of Multichain and Blockchain both.
• The first blockchain was developed by “Santoshi Nakamoto”, an anonymous person, in 2008.
• It is rumored that Nick Szabo who invented the first virtual currency, is the real Santoshi Nakamoto but it has not been proved yet.
• The fundamental aim of blockchain was to serve as the public transaction ledger for Bitcoin.
• A blockchain is distributed immutable ledger, distributed between the nodes of a system.
• A blockchain is a growing list of records, called blocks, that are linked using cryptography.
• The first block of a blockchain is known as the Genesis block.
• A Block consists of:
1. Block Number
2. Data
3. previous Hash
4. Current Block Hash
1. It is open to all, anyone can be a part of it.
2. Examples of public blockchains are Bitcoin & Ethereum.
1. It is fully private.
2. It is based on access controls that restrict the people who can participate in the networks.
3. Example of a private blockchain is MultiChain.
1. It is partially private, permission, and multiorgan.
2. This sort of blockchain is suitable for use between companies that often have dealings with each other.
3. Examples of federated blockchains are Hyperledger, Ripple, and R3.
• MultiChain blockchain has been invented in 2014.
• It is an open-source blockchain platform. (community version – GPLv3)
• It is used to create and deploy private blockchains within an organization for financial transactions.
• Multichain takes place when two blockchain nodes connect, this is known as the Handshaking process in MultiChain.
• It has two major concepts Assets and Streams.
1. Create two nodes (VMs) using cloud9 in AWS or using a virtual box. (named Node1 and Node2)
2. Install multichain binaries on both nodes.
1. Firstly set up the root password on both nodes by using the below command.
< sudo password root >
2. Secondly follow the below commands on both nodes cli to download and install multichain community in Linux.
<
su (enter root password)
cd /tmp (go in tmp directory)
wget https://www.multichain.com/download/multichain-2.2.1.tar.gz
(download multichain binary)
tar -xvzf multichain-2.2.1.tar.gz (extract the multichain file and install it)
cd multichain-2.2.1 (go to the respective directory)
mv multichaind multichain-cli multichain-util /usr/local/bin
( set all the local variables to work effectively on CLI)
exit>
• After doing all the steps written above on both nodes. Now we will create a blockchain on node1 and connect that blockchain with node2.
• To create our new blockchain based on multichain’s blockchain
default parameters, run the below command on node1.
< multichain-util create TestChain>
Here “TestChain” is my blockchain name, you can re-write it on your own.
• After running the above command a params.dat file has been created and contains all the settings of the blockchain. We can edit this with any text editor according to our requirements.
• When you have finalized with settings, we can run the below command to activate the blockchain to run in the background.
< multichaind TestChain -daemon >
• After running the above command, you get a connecting command to connect with other nodes.
• Run that command on node2. In my case, the connecting command is :
< multichaind [email protected]:2759 >
• After running the above command on node2, you will get some grant permission commands, you need to run that commands on node1.
It contains three types of permission connect, send and receive. According to your suitability give access to other nodes.
• You have successfully created a distributed blockchain environment.
• There are two type of modes:
1. Interactive Mode
< multichain-cli [chain-name] >
2. Basic Mode
<multicahin-cli [chain-name] [function-name] >
To know more about it or learn about assets and streams, go through with below documentation:
“https://www.multichain.com/developers/creating-connecting/“
September 8, 2024 at 02:20 am
Your comment is awaiting moderation.