Blockchain 11 min read

Understanding Ethereum Accounts, Transactions, and Gas

This guide explains Ethereum's account types, how transactions and internal messages work, the role of gas and gas limits, fee calculation, and how network congestion can lead to DoS‑like conditions, providing a practical foundation for developers.

Senior Brother's Insights
Senior Brother's Insights
Senior Brother's Insights
Understanding Ethereum Accounts, Transactions, and Gas

What Are Accounts

Ethereum distinguishes two kinds of accounts that differ from Bitcoin's UTXO model.

Externally Owned Account (EOA) – a regular user account.

Contract Account – an account that holds code and state.

Externally Owned Account (EOA)

Holds an Ether balance.

Contains a nonce to ensure each transaction is processed only once.

Can send transactions (Ether transfers, contract deployment, contract calls).

Controlled by a private key.

Has no associated code.

Contract Account

Holds an Ether balance.

Has associated bytecode.

Executed when triggered by a transaction or message, interpreted by the Ethereum Virtual Machine (EVM).

When a contract account is executed:

It runs with Turing‑complete complexity.

It can only modify its own persistent storage (state).

It can call other contracts.

All operations on the Ethereum blockchain are initiated by transactions from accounts. When a contract receives a transaction, the transaction’s parameters become the contract’s input, and the EVM runs the code on every participating node to validate the new block.

Transactions and Messages

Transactions

A transaction is a signed data packet sent from one account to another, recorded on the blockchain. Invoking a smart contract to change its state also counts as a transaction and incurs a fee.

Sender address

Recipient address

Signature proving the sender’s intent

Value (amount of Ether transferred)

Optional data field (e.g., contract call payload)

gasLimit – maximum gas the transaction may consume

gasPrice – price per gas unit the sender is willing to pay

Messages

Contracts can send "messages" to other contracts. A message is a virtual object that exists only during EVM execution and can be thought of as a function call.

Message sender (contract address)

Message recipient (contract address)

Optional data field (input for the callee contract)

gasLimit – same meaning as in a transaction

In practice, a message behaves like an internal transaction generated by a contract rather than an external account. When a contract executes call or delegatecall, a message is created, which may trigger code execution in the target contract.

What Is Gas

Gas is the unit used to measure the computational cost of executing operations in the Ethereum Virtual Machine (EVM). Every node runs the same EVM code to validate blocks, and each step of computation consumes a predefined amount of gas to prevent abuse and denial‑of‑service attacks.

Gas and Transaction Consumption

Each transaction includes a gas limit and a gas price. Miners select transactions to include in a block and collect the associated fees. If the gas used by a transaction exceeds its gas limit, the transaction is reverted but the fee is still charged. Unused gas is refunded to the sender.

Estimating Transaction Cost

The total transaction fee consists of two parts:

gasUsed : total gas consumed by the transaction.

gasPrice : price per gas unit, expressed in Ether.

Transaction fee = gasUsed * gasPrice.

gasUsed

Each EVM opcode has a fixed gas cost. To estimate gasUsed, developers can call web3.eth.estimateGas with the transaction data.

gasPrice

Users can set the gas price themselves; it fluctuates with network congestion and can be approximated from recent block statistics.

Transaction Example

Think of gasLimit as a car’s fuel tank capacity and gasPrice as the fuel price. If the price is 20 GWei per gas and the transaction consumes 21,000 gas, the cost is 0.00042 ETH (≈ $0.25 at $2.5 per liter analogy).

Ether Unit Conversion

1 wei = 1 wei

1 Kwei (babbage) = 1 × 10³ wei

1 Mwei (lovelace) = 1 × 10⁶ wei

1 Gwei (shannon) = 1 × 10⁹ wei

1 microether (szabo) = 1 × 10¹² wei

1 milliether (finney) = 1 × 10¹⁵ wei

1 ether = 1 × 10¹⁸ wei

Gas Limit

The block gas limit defines the maximum total gas that can be included in a single block, determining how many transactions can be packed together. For example, with five transactions having gas limits of 10, 20, 30, 40, 50 and a block gas limit of 100, the first four fit, while the fifth would need to be placed in a later block. The default client minimum block gas limit is 4,712,388, and the typical transaction gas limit is 21,000.

DoS‑Like Situations on the Ethereum Network

When the network becomes congested—e.g., many full blocks and a long transaction pool—users may experience significant delays. Miners prioritize transactions based on fees, so a backlog of low‑fee transactions can cause a temporary denial‑of‑service effect, whether intentional or not.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

transactionsblockchainGassmart contractsEthereumAccounts
Senior Brother's Insights
Written by

Senior Brother's Insights

A public account focused on workplace, career growth, team management, and self-improvement. The author is the writer of books including 'SpringBoot Technology Insider' and 'Drools 8 Rule Engine: Core Technology and Practice'.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.