Ethereum 2 0

Comment

Author: Admin | 2025-04-28

Use up a ton of computer disk space, Since mining the public Ethereum network isn’t the purpose of this guide, use “Control C” to stop this process. Setting up a private Ethereum blockchainTo clarify what we’ll be doing here:We will be creating two Ethereum accounts on Geth: account 1 and account 2. The first account will serve as our master account and will hold any Ethereum token (expressed in Wei) we earn from mining new blocks on this private blockchain.We’ll also be running a single node private blockchain on our local computer. We’ll go ahead and mine some new Ethereum blocks on our private blockchain and be rewarded with some tokens (Wei). Finally, we will create an Ethereum transaction by sending some earned tokens from our master account (account 1) to account 2. 1. Creating two new Ethereum accounts on GethTo create Account 1, run the command: geth account new Enter fullscreen mode Exit fullscreen mode This will open an interactive interface and prompt you to enter a password (make sure to remember this password as it will be used later). You should also copy out the newly generated public address key somewhere as you’d be needing it later in this guide. Your terminal should look like this:Repeat the above process to create Account 2. 2. Creating a single node private blockchainWe’ll be needing a genesis block to create our blockchain network, don’t know what a genesis block is? Well, A Genesis Block is the name given to the first block of a blockchain, such as Bitcoin. A blockchain consists of a series of blocks that are used to store information related to transactions that occur on a blockchain network. Each of the blocks contains a unique header, and each such block is identified by its block header hash individually. Inside the private-blockchain directory, create a json file with the name genesis-block.json and copy in the below content:{ "config": { "chainId": 15, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, "constantinopleBlock": 0, "petersburgBlock": 0, "ethash": {} }, "difficulty": "1", "gasLimit": "8000000", "alloc": {},} Enter fullscreen mode Exit fullscreen

Add Comment