Sending Ether on a Private Ethereum Blockchain Network

·

In this guide, we'll walk through the process of transferring Ether (ETH) on a private Ethereum blockchain network using Geth. This builds upon our previous setup where we configured a private network.

Understanding Ether and Ethereum

Ethereum features built-in cryptocurrency functionality similar to Bitcoin. Ether is Ethereum's native currency (like BTC in Bitcoin), used for:


Prerequisites

Before sending Ether, ensure you have:

  1. A private Ethereum network running via Geth (see our previous guide).
  2. Two Externally Owned Accounts (EOAs) — A sender and a receiver.

Step 1: Creating Accounts

Start Geth and access the JavaScript console:

geth --networkid "10" --nodiscover --datadir "/root/eth_private_net" console 2>> /root/eth_private_net/geth.log

Create two accounts with passwords:

> personal.newAccount("AAAAAAAA")  // Sender (Account 0)  
> personal.newAccount("BBBBBBBB")  // Receiver (Account 1)

Verify the accounts:

> eth.accounts
["0xb0490eae092b1a3e44bb313d52bacc49f6678efc", "0x6b8fc0fdb66f7d17f8b9dbfefcbbc12eab0c6eb3"]

💡 Note: The default Etherbase (mining reward address) is eth.accounts[0]. Change it with:

miner.setEtherbase(eth.accounts[1])

Step 2: Mining Ether

Ether is obtained through mining. Start mining with:

> miner.start()

Check progress:

> eth.blockNumber  // Confirm new blocks are being added
> eth.mining       // Should return 'true'

After mining, check the sender’s balance (in wei; 1 ETH = 10¹⁸ wei):

> web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")  // Convert to ETH
820  // Example balance

Stop mining:

> miner.stop()

Step 3: Sending Ether

A. Unlock the Sender’s Account

> personal.unlockAccount(eth.accounts[0], "AAAAAAAA")

B. Send 10 ETH

> eth.sendTransaction({
    from: eth.accounts[0],
    to: eth.accounts[1],
    value: web3.toWei(10, "ether")
})

C. Confirm Transaction

Initially, the transaction is pending. Mine a new block to finalize it:

> miner.start()  // Wait for 1-2 blocks
> miner.stop()

Check the receiver’s balance:

> web3.fromWei(eth.getBalance(eth.accounts[1]), "ether")
10  // Success!

Key Takeaways

  1. Private networks simplify mining — No competition means faster Ether rewards.
  2. Transactions require block confirmations — Pending transfers need mining to complete.
  3. Gas fees apply — Even in private networks, though they’re negligible here.

👉 Learn more about Ethereum transactions


FAQs

Q1: Why is my transaction stuck as "pending"?

A: The network hasn’t mined a block containing your transaction. Resume mining to process it.

Q2: How do I check transaction details?

A: Use:

> eth.getTransaction("0xTxHash")

Q3: Can I automate this process?

A: Yes! Scripts using web3.js or ethers.js can handle transfers programmatically.


Next, we’ll explore smart contracts on private networks! Stay tuned.

👉 Advanced Ethereum development tools