Accounts in Ethereum
Accounts can be either:
- Externally Owned Accounts (EOA): Controlled by private keys (users)
- Contract Accounts: Controlled by code (smart contracts)
Both account types contain:
- An address (unique identifier)
- Balance (in Ether)
- Nonce (transaction count)
Contract accounts additionally include:
- Storage space (for data persistence)
- Executable code (smart contract logic)
Blockchain Fundamentals
Address Generation
Ethereum addresses are derived through cryptographic processes:
- Private key โ Public key via ECDSA
- Public key โ Keccak-256 hash
- Last 40 bytes of hash โ Hexadecimal string prefixed with "0x"
Consensus Mechanisms
- Proof-of-Work (PoW): Miners solve complex puzzles to validate transactions (used in Ethereum 1.0)
- Proof-of-Stake (PoS): Validators stake ETH to participate in block validation (Ethereum 2.0)
Smart Contract Development
Key Components
| Component | Description |
|---|---|
| Gas | Computational unit measuring contract execution cost |
| EVM | Ethereum Virtual Machine that executes bytecode |
| Solidity | Primary programming language for contracts |
Common Vulnerabilities
- Re-entrancy Attacks: Malicious contracts recursively calling victim contracts
- Immutable Code Problem: Deployed contracts cannot be modified post-deployment
Ethereum Improvement Proposals
- EIPs: Technical standards for Ethereum's evolution
- ERCs: Application-level standards (e.g., ERC-20 for tokens)
Historical Milestones
- Frontier (2015): Initial test network
- Homestead (2016): First stable release
- Metropolis (2017-2019): Introduced key upgrades
- Serenity (Ongoing): Transition to PoS
FAQ Section
What's the difference between ETH and Gas?
ETH is Ethereum's native cryptocurrency, while Gas measures computational work. Transactions cost Gas, paid in ETH.
How are Ethereum addresses created?
Addresses derive from public keys through Keccak-256 hashing, using the last 20 bytes of the hash result.
Why are smart contracts immutable?
Immutability ensures trustlessness - once deployed, contract behavior cannot change unexpectedly. This requires careful pre-deployment testing.
What prevents infinite loops in contracts?
The Gas system naturally limits computation by requiring ETH payment for each operation, preventing runaway processes.