5 Minutes to Set Up an Ethereum Private Chain — PoA Consensus Example (Part 2)

·

Setting up your own Ethereum private chain is a powerful way to explore blockchain technology in a controlled environment. In this continuation of our tutorial, we’ll walk through initializing the blockchain with a genesis block, launching a node, sending transactions, and enabling mining using Proof of Authority (PoA) consensus. Whether you're a developer testing smart contracts or a learner diving into decentralized systems, this guide offers clear, actionable steps.

By the end of this article, you’ll have a fully functional single-node Ethereum private network running locally—perfect for experimentation without the cost or complexity of the mainnet.


Initializing the Genesis Block

The first critical step in creating a private Ethereum blockchain is defining and initializing the genesis block—the very first block in the chain. This block sets the foundational rules for your network, such as initial account balances, consensus mechanism, and chain ID.

To initialize the genesis block, use the following command:

geth --datadir node1 init node.json

Here:

After running this command, Geth generates the necessary database structure and applies the settings defined in node.json. You’ll see output confirming the successful initialization, including details like:

This step ensures that every node joining your private network starts from the same cryptographic foundation.

👉 Learn how blockchain networks validate transactions securely and efficiently.


Launching Your Ethereum Node

Once the genesis block is initialized, it’s time to launch your node. The following command starts a Geth instance configured for a private network with RPC access enabled:

geth --datadir node1 \
  --allow-insecure-unlock \
  --nodiscover \
  --syncmode "full" \
  --networkid 7777 \
  --port 30303 \
  --rpc \
  --rpcport 8545 \
  --rpcapi "eth,net,web3" \
  --unlock "f96f9d02cb76cf745d5bd37bd040ac203926f600" \
  --password /Users/wusonglin/node1/password.txt \
  console

Let’s break down these key parameters:

Upon successful startup, you’ll enter the Geth JavaScript console, showing your node’s Ethereum address (coinbase), loaded modules (admin, eth, net, etc.), and synchronization status.


Sending Transactions on the Private Chain

With the node running, you can now send transactions. Since this is a PoA network, there are no miners by default—transactions remain in the transaction pool until mined.

Try sending ether using:

eth.sendTransaction({
  from: eth.accounts[0],
  to: "0x91449c31b4f1b6651Acd4bAe4A2067C009750392",
  value: web3.toWei(100000, "ether")
});

This transfers 100,000 test ether from the unlocked account to another address. However, because mining isn’t active yet, the transaction won’t be confirmed immediately.

To inspect pending transactions:

txpool.inspect.pending

You should see your transaction listed under the sender’s address queue—waiting for a miner to include it in a block.


Enabling Mining to Confirm Transactions

Since Ethereum’s PoA consensus requires authorized signers to create blocks, you must manually start mining to process pending transactions.

In the Geth console, run:

miner.start()

The node begins creating new blocks. The first block will include your previously sent transaction. You’ll see log messages indicating block creation, gas usage, and confirmation.

After a few seconds—or once the transaction is confirmed—stop mining with:

miner.stop()

Now check the transaction pool again:

txpool.inspect.pending

The output should be empty, confirming that your transaction was successfully mined and removed from the pending queue.

You can also verify the recipient’s balance:

eth.getBalance("0x91449c31b4f1b6651Acd4bAe4A2067C009750392")

It should reflect the received amount in Wei.

👉 Discover how modern blockchain platforms streamline transaction validation and scalability.


Core Keywords for SEO and Technical Clarity

To ensure this guide ranks well in search engines while remaining technically accurate, we’ve naturally integrated the following core keywords:

These terms align with common developer queries and support both educational and technical search intent.


Frequently Asked Questions (FAQ)

Q: What is a genesis block in Ethereum?

A: The genesis block is the first block in a blockchain. It defines initial parameters like chain ID, difficulty, and pre-funded accounts. All subsequent blocks build upon it cryptographically.

Q: Why do I need to use --allow-insecure-unlock?

A: Geth disables HTTP-based account unlocking by default for security. In private, local environments where security risks are minimal, this flag allows you to unlock accounts via RPC—essential for automation and testing.

Q: Can I run multiple nodes on the same machine?

A: Yes. Use separate data directories (node1, node2), different ports (30303, 30304), and distinct RPC ports (8545, 8546) to avoid conflicts.

Q: Why isn’t my transaction being confirmed?

A: If mining isn’t running, transactions stay in the txpool. Always ensure miner.start() is called after sending transactions on a private PoA network.

Q: Is Proof of Authority suitable for production use?

A: PoA is ideal for private or consortium chains where trusted validators control block production. It offers high performance and low energy use but sacrifices decentralization.

Q: How do I reset my private chain?

A: Delete the datadir folder (e.g., node1/) and reinitialize with geth init node.json. This wipes all data and starts fresh.


Conclusion

You’ve now successfully created an Ethereum private chain using Proof of Authority consensus. From initializing the genesis block to launching a Geth node, sending transactions, and managing mining operations—you’ve gained hands-on experience with core blockchain concepts.

This local environment serves as a sandbox for experimenting with smart contracts, dApps, or network configurations without relying on public infrastructure.

👉 Explore advanced tools for blockchain developers building next-generation decentralized applications.

Whether you're preparing for enterprise blockchain deployment or learning Ethereum internals, mastering private chain setup is a valuable skill. Continue expanding your knowledge by adding more nodes, integrating MetaMask, or deploying simple Solidity contracts.