Understanding Ethereum: Accounts, Transactions, and Network Basics
This article provides a comprehensive overview of Ethereum, explaining what it is, how its external and contract accounts work, the mechanics of transactions and gas, the underlying network architecture, major client implementations, and how Hardhat facilitates smart‑contract development.
What Is Ethereum
Ethereum is an open‑source blockchain platform that enables developers to create and run decentralized applications (DApps). It supports smart contracts written in Solidity or other languages, and its native token Ether (ETH) is used to pay transaction fees and transfer value.
Ethereum Accounts
Ethereum defines two account types that share the same underlying data structure but differ in behavior.
Externally Owned Accounts (EOAs)
EOAs are controlled by a single private key generated with a cryptographically secure pseudo‑random number generator (CSPRNG). The address is derived from the public key as follows:
1. Generate a random 256‑bit number N (private key) using CSPRNG.
2. Compute the public key P = N·G on the secp256k1 curve (coordinates px, py).
3. Concatenate px and py to form <code>data</code>.
4. Compute H = keccak256(data).
5. Take the last 20 bytes of H as the Ethereum address.Balance attribute (Ether amount).
Can send and receive transactions.
Controlled by a single private key.
No associated contract code.
Contract Accounts
Contract accounts are created during contract deployment and contain executable bytecode. Their address is derived from the deploying account and the deployment nonce.
Balance attribute (Ether amount).
Associated contract bytecode.
Can be invoked by transactions or by messages from other contracts.
Can modify persistent storage, call other contracts, and perform complex logic.
Ethereum Transactions
A transaction is a signed data packet that moves Ether or triggers contract code. Key fields:
from : sender address (EOA).
to : recipient address or contract address.
value : amount of Ether transferred.
gasLimit : maximum gas the transaction may consume.
gasPrice : price per gas unit (in wei).
nonce : sender’s transaction count, prevents replay attacks.
data : optional payload; empty for simple transfers, compiled bytecode for contract creation, or function selector + encoded arguments for contract calls.
Gas is the unit that measures computational effort. Each operation has a fixed gas cost (e.g., 500 gas for a basic transfer, 53 000 gas for contract creation, 5 gas per data byte). The total transaction cost is gasUsed × gasPrice.
Ethereum Network
Ethereum nodes form a distributed hash table (DHT) using a Kademlia‑style routing table with 256 buckets, each holding up to 16 peers identified by a NodeID.
Node Discovery
Locate the N closest nodes to the target NodeID in the routing table.
Send lookup requests to those nodes.
Each responded node returns its own N closest nodes.
Iterate until the target NodeID information is found.
Ethereum Clients
Go‑ethereum (Geth) – https://github.com/ethereum/go-ethereum Parity – https://github.com/paritytech/parity-ethereum Cpp‑ethereum (Aleth) – https://github.com/ethereum/aleth pyethapp – https://github.com/ethereum/pyethapp Ethereumjs‑lib – https://github.com/ethereumjs/ethereumjs-lib Ethereumj – https://github.com/ethereum/ethereumj Geth, written in Go, is the most widely used client.
Hardhat and Ethereum
Hardhat is a development framework for Ethereum that provides:
A local Ethereum network node for fast testing.
Solidity compilation, testing, and deployment tools.
Plugin architecture and scripting capabilities to automate repetitive tasks.
Developers use Hardhat to write, test, and deploy smart contracts on Ethereum without connecting to a public testnet or mainnet.
Reference:
https://hardhat.org/hardhat-runner/docs/getting-started#installationJavaEdge
First‑line development experience at multiple leading tech firms; now a software architect at a Shanghai state‑owned enterprise and founder of Programming Yanxuan. Nearly 300k followers online; expertise in distributed system design, AIGC application development, and quantitative finance investing.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
