Ethereum accounts
An Ethereum account is an entity with an ether (ETH) balance that can send transactions on the chain. These accounts are either controlled by users through private keys, or they function as smart contracts, executing code upon receiving specific inputs. Transactions are broadcast to the network, where any node can request their execution on the Ethereum Virtual Machine. Block producers then process these requests, update the network state accordingly, and propagate the changes to all other nodes.
Types of Ethereum accounts:
There are two types of accounts in Ethereum.
Externally Owned Accounts (EOA):
Externally owned accounts (EOAs) are simple user-controlled accounts on the Ethereum blockchain. They lack any associated code or data storage and rely on private keys stored in software wallets for secure transactions and ownership of digital assets.
Creating an account costs nothing
Can initiate transactions
Transactions between externally-owned accounts can only be ETH/token transfers
Made up of a cryptographic pair of keys: public and private keys that control account activities

An externally owned address is an account with a public and private key pair holding one’s funds. It is the ‘public’ address required to receive funds from another party. To access the funds, one must have its private key. Caution is needed; a private key gives access to all the funds in an address. A wallet is an interface for managing an Ethereum account—as well as its public and private key. Get an Ethereum address or account to both send and receive funds.
Contract Accounts:
A contract account is controlled by code executed by the Ethereum Virtual Machine. It is also referred to as a smart contract. Contract accounts have associated code and data storage, but not private keys.

Contract accounts also have a 42 character hexadecimal address:
A contract address hosts a collection of code on Ethereum that executes functions. The functions are executed when a transaction with associated input data (contract interaction) is made. Such addresses are created when a contract is deployed to the blockchain. Both the externally owned and contract addresses share the same format of 42-hexadecimal characters.
Example:
0x06012c8cf97bead5deae237070f9587f8e7a266d
The contract address is usually given when a contract is deployed to the Ethereum Blockchain. The address comes from the creator's address and the number of transactions sent from that address (the “nonce”).
An account examined
Ethereum accounts have four fields:

nonce
A counter that indicates the number of transactions sent from an externally owned account or the number of contracts created by a contract account. Each transaction can only be executed once, protecting against replay attacks where signed transactions are repeatedly broadcast and re-executed.
Balance
This field represents the amount of Ether (ETH) or other tokens held by the account.
Code Hash
This hash refers to the code of an account on the Ethereum virtual machine (EVM). Contract accounts have code fragments programmed in that can perform different operations. This EVM code gets executed if the account gets a message call. It cannot be changed, unlike the other account fields. All such code fragments are contained in the state database under their corresponding hashes for later retrieval. This hash value is known as a codeHash. For externally owned accounts, the codeHash field is the hash of an empty string.
storageRoot
Sometimes known as a storage hash. A 256-bit hash of the root node of a Merkle Patricia trie that encodes the storage contents of the account (a mapping between 256-bit integer values), encoded into the trie as a mapping from the Keccak 256-bit hash of the 256-bit integer keys to the RLP-encoded 256-bit integer values. This trie encodes the hash of the storage contents of this account and is empty by default.
An account is not a wallet. An account is the keypair for a user-owned Ethereum account. A wallet is an interface or application that lets you interact with your Ethereum account.
https://takenobu-hs.github.io/downloads/ethereum_evm_illustrated.pdf
Last updated