0% found this document useful (0 votes)
25 views5 pages

Assignment 04 New

The document discusses how to create a private Ethereum blockchain network for testing and experiments. It describes downloading tools like Geth or Pyethapp to create nodes and interact with the blockchain. The key steps are: 1) Create a data directory and genesis block to initialize the network; 2) Start the private network using Geth; 3) Generate an externally owned account (EOA) to manage transactions; 4) Obtain some "fake ether" by mining on the private network for free. Creating a private blockchain in this way allows learning how Ethereum works without using real money.

Uploaded by

danawaleharshad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

Assignment 04 New

The document discusses how to create a private Ethereum blockchain network for testing and experiments. It describes downloading tools like Geth or Pyethapp to create nodes and interact with the blockchain. The key steps are: 1) Create a data directory and genesis block to initialize the network; 2) Start the private network using Geth; 3) Generate an externally owned account (EOA) to manage transactions; 4) Obtain some "fake ether" by mining on the private network for free. Creating a private blockchain in this way allows learning how Ethereum works without using real money.

Uploaded by

danawaleharshad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

- CE-PROJECT ASSIGNMENT| 2022-23

*
Assignment 04
Title:
Creation of the Private Ethereum Blockchain
Ethereum Private Network:
Ethereum private network is a private blockchain completely isolated from the main
Ethereum network. Typically, private networks are created by organizations to store personal
data that should not be visible to people outside the organization. In addition, the private
network Ethereum can be used for testing and experiments with the blockchain.
Private Ethereum Blockchain:
● The private network blockchain is not affiliated with the main Ethereum chain.

● Access to the network is limited to one or more nodes.

● Creating private Ethereum networks for free.

● Creating private Ethereum networks for free.

● Free transactions.

Ethereum Virtual Machine:


To start own private blockchain, your computer must become a node in the Ethereum
network, that is, you need to download the entire blockchain network and synchronize it with
the main chain of Ethereum. We can use various tools (client) for this, but we need those
that allow us to interact with the blockchain network.If you do not go into the technical
nuances, then we can say that Ethereum is a network of many nodes, or EVM (Ethereum
Virtual Machine). EVM is software that can understand a set of instructions written according
to certain rules (to start a transaction) smart contracts, applications) and execute them on the
Ethereum network in a certain logical order, like a normal computer.

Geth(Go Ethereum):
The implementation of the Go (Golang) for Ethereum is called Geth. This is one of the three
initial implementations of the Ethereum protocol (along with Python and C ++). Choose this
tool if you have at least minimal web development experience and want to experiment or
create professional interfaces for dapps.

Pyethapp:
A Python-based client that implements the “Ethereum crypto economic finite state machine”.
You need to choose if you are interested in developing dapps or academic studies of the
Ethereum network.

NBN SSOE, DEPARTMENT OF COMPUTER ENGINEERING,


1
AMBEGAON, PUNE
- CE-PROJECT ASSIGNMENT| 2022-23
*
C++(eth):
Ethereum implementation in C ++. Choose if you are serious about mining on the GPU or
need to increase security by running two program implementations.

Geth(Go Ethereum):

Geth is a command line interface tool (CLI) that connects your system and
equipment to the Ethereum network. With geth you can:

● carry out financial transactions;

● mine ether (utilitarian currency of the Ethereum network);


● create smart contracts

● explore the block history;

● much more.

Create Private Blockchain Ethereum:

After we have installed and synchronized Geth with Ethereum, we can start the launch of a
“private” or “test” network. This is the best way to learn blockchain technologies, as you can
create, deploy and decentralized applications within the Ethereum private network without
spending a single live ether. Moreover, you can create a “fake” ether and use it to carry out a
transaction and initialize smart contracts.

Step 1:Create the DATADIR folder:

When is strongly recommended to use a separate folder for storing data (database and
wallet) of a private network. This is necessary for Ethereum private network files. Do not
replace files with a public one.

Step 2:Create a genesis block:

NBN SSOE, DEPARTMENT OF COMPUTER ENGINEERING,


2
AMBEGAON, PUNE
- CE-PROJECT ASSIGNMENT| 2022-23
*
As you probably know, the blockchain is a distributed digital register in which all
transactions are recorded in chronological order in the form of blocks. Blocks are generated
during the mining process and added to the blockchain chain. The number of blocks is
unlimited, but there is always one separate block that gave rise to the whole chain - the
genesis-block.
To create a private blockchain, you first need to generate a genesis block. To do this, you
need to create a Genesis file, write the necessary commands (attributes) into it and use it with
Geth chain Id. The identifier used by the blockchain (something like an address). You can
specify a random number, provided that it does not match the numbers of several important
blockchains, for example, the Ethereum main chain number (1). The instruction contains a
random three-digit identifier homestead Block. Homestead is the first official stable version
of Ethereum protocol, which replaced the previous version called Frontier. If you plan to use
this release, the attribute should be set to “0”You can connect other protocols such as
Byzantium, eip155B and eip158. To do this, under the homestead Block add the protocol
name with the Block prefix (for example, eip158Block) and set the parameter “0” to them.
difficulty. Determines the difficulty of generating blocks. The higher the complexity, the
more resources will be required for mining. To avoid waiting during tests and writing this
text, we set a relatively low complexity value gasLimit. Indicates the current network-wide
gas consumption limit per unit. Gas is the “fuel” that is used to pay transaction fees on the
Ethereum network. The more gas a user is willing to spend, the higher the priority of his
transaction in the queue. We set this value to a high enough level to avoid limitations during
tests alloc. It allows you to create a cryptocurrency wallet for our private blockchain and fill
it with fake ether. In our text, we will not use this option to show how to initiate mining on a
private blockchain. If you are running a private blockchain to test a smart contract or a
decentralized application, set the value you need (for example, 9999999999999).

Step 3:Start the private network:

So, we have created a genesis block. Now you can run our private network so that we or
other nodes (if you created several) can add new blocks. To do this, in the Geth console, you
need to initiate the command:

This command instructs Geth to launch a private blockchain. And use the specified directory
("path_to_your_data_directory" replace the address of the desired folder) to access the
running network.

The command also has the identifier "7776". It should be replaced with an arbitrary number
that is not equal to the identifier of the networks already created, for example, the identifier of
the main network Ethereum ("networkid = 1"). The identifier "networkid = 7776" also should
not be used, otherwise you will connect to the network we have created for this guide.

Another important point. Geth does not remember the parameters of your private blockchain
network, so every time you want to access your private chain, you will need to run

NBN SSOE, DEPARTMENT OF COMPUTER ENGINEERING,


3
AMBEGAON, PUNE
- CE-PROJECT ASSIGNMENT| 2022-23
*
commands in the console that initiate a connection to the Genesis file and your private
network. Keep them handy so you don’t look for them every time.

Step 4:Create and Externally owned account(EOA):

There are two types of accounts on the Ethereum network: Externally Owned Accounts
(EOA) and Contracts Accounts. You can find out about their capabilities and differences on
ethdocs.org. To manage our blockchain network, we need EOA. To create it, you need to run
Geth in two windows. In the second window / console enter the following command. Next
you will be asked to set a password, the introduction of which initiates the creation of an
account. It looks like this.Save the created account (a long set of characters in the screenshot),
as you will use it often. In addition, save the passphrase because it will be needed every time
you connect to your account.Next, we need to check the balance status of the account (how
much ether is there). To do this, use the following command:

Step 5:Get some ether for our account:

Mining on the main chain of Ethereum (real) is complex and requires expensive equipment
with powerful graphics processors. Usually ASICs are used for this. However, for the
mining of coins of our chain, any device will be suitable, since in the genesis file we set the
mining difficulty low (difficulty attribute). And remember that this is a fake ether. It can only
be used within your private blockchain for testing transactions, smart contracts, decentralized
applications and other functions.

Conclusion:

You created your first private Ethereum blockchain, and got some ether. This is not real
money and a test network, but the experience gained can be used .

NBN SSOE, DEPARTMENT OF COMPUTER ENGINEERING,


4
AMBEGAON, PUNE
- CE-PROJECT ASSIGNMENT| 2022-23
*

NBN SSOE, DEPARTMENT OF COMPUTER ENGINEERING,


5
AMBEGAON, PUNE

You might also like