(1/18) @ethereum Fundamentals: PoW Blocks
Every ~15 seconds a new $ETH block is born... ever wondered what's inside?
A field-by-field guide to the building blocks that make up the blockchain.
Every ~15 seconds a new $ETH block is born... ever wondered what's inside?
A field-by-field guide to the building blocks that make up the blockchain.
(2/18) @ethereum is the World Computer: a globally shared utility that exists between a network of 1000s of computers, each running a local version of the Ethereum Virtual Machine (EVM)
These nodes coordinate and sync their actions by building, proposing and distributing blocks
These nodes coordinate and sync their actions by building, proposing and distributing blocks
(3/18) Prerequisite - Merkle Trees
Merkle Tree: data structure used to organize and encrypt huge data sets. Merkle Proofs can be used to efficiently verify that data exists in a dataset (confirmation a piece of data exists without transferring the whole dataset).
Merkle Tree: data structure used to organize and encrypt huge data sets. Merkle Proofs can be used to efficiently verify that data exists in a dataset (confirmation a piece of data exists without transferring the whole dataset).
(4/18) An @ethereum block is made up of 3 parts:
- Header, including all the metadata of the block
- Transactions, a list of all the transactions included in the block
- Uncles, management of uncles (a block that was broadcast simultaneously with another but not chosen)
- Header, including all the metadata of the block
- Transactions, a list of all the transactions included in the block
- Uncles, management of uncles (a block that was broadcast simultaneously with another but not chosen)
(6/18) difficulty - a value that approximates the time a miner should calculate a hash function before finding a block. Network hash rate / difficulty = average block time
totalDifficulty - the cumulative value of the difficult required to build the chain up until this block
totalDifficulty - the cumulative value of the difficult required to build the chain up until this block
(7/18) nonce - extra data miners add to a block before hashing. A block is created when this hash matches a specific value; mining is the process of attempting to find this value by altering the nonce.
mixHash - intermediate value calculated from nonce, used for validation
mixHash - intermediate value calculated from nonce, used for validation
(8/18) baseFeePerGas - EIP-1559 created a minimum cost (base fee) for each unit of gas. When a block is created, the entire base fee is burned. The value changes based on how full the previous block was (max change of 12.5% per block).
gasLimit - total gas available to the block
gasLimit - total gas available to the block
(9/18) stateRoot - the root hash of a Merkle tree which stores the entire state of the EVM (account balances, contract storage, contract code, etc)
transactionsRoot - the root hash of a Merkle tree which stores the transactions contained within the block.
transactionsRoot - the root hash of a Merkle tree which stores the transactions contained within the block.
(10/18) receiptsRoot - the root hash of a Merkle tree which stores the receipts created by the transactions in a block. A receipt includes: block number, block hash, associated contracts, gas used, the stateRoot at the time (before) transaction, etc.
(11/18) logsBloom - a Bloom filter is a probabilistic structure that allows a user to filter through each element in the block. logsBloom minimize the number of queries a client needs to make.
llimllib.github.io
llimllib.github.io
(12/18) extraData - an (optional) 32-byte field in which block proposers can put anything they want. Often used by mining pools to log their blocks.
(14/18) For more information about the structure of @ethereum transactions, please see this thread:
(16/18) Uncle blocks are created when 2 blocks are mined and sent to the network simultaneously. The block that gets validated by more nodes gets added to the blockchain.
The other block becomes an uncle block. Uncle blocks are recorded, but do not affect the EVM state.
The other block becomes an uncle block. Uncle blocks are recorded, but do not affect the EVM state.
(17/18) sha3Uncles - the root hash of a Merkle tree which stores all uncles for a given parent
uncles - a list of the blocks uncled by this block
uncles - a list of the blocks uncled by this block
(18/18) And there you have it! That's an @ethereum (Proof of Work) block!
Like what you read? Help me spread the word by retweeting the thread (linked below).
Follow me for more explainers and as much alpha as I can possibly serve.
Follow me for more explainers and as much alpha as I can possibly serve.
Loading suggestions...