hg0088线上

blocks are batches of transactions with a hash of the previous block in the chain. this links blocks together (in a chain) because hashes are cryptographically derived from the block data. this prevents fraud, because one change in any block in history would invalidate all the following blocks as all subsequent hashes would change and everyone running the blockchain would notice.

Prerequisites

Blocks are a very beginner-friendly topic. But to help you better understand this page, we recommend you first read Accounts, Transactions, and our introduction to Ethereum.

Why blocks?

hg0088线上to ensure that all participants on the ethereum network maintain a synchronized state and agree on the precise history of transactions we batch transactions into blocks. this means dozens (or hundreds) of transactions are committed, agreed on, and synchronized on all at once.

by spacing out commits, we give all network participants enough time to come to consensus: even though transaction requests occur dozens of times per second, blocks on ethereum are committed approximately once every fifteen seconds.

How blocks work

to preserve the transaction history, blocks are strictly ordered (every new block created contains a reference to its parent block), and transactions within blocks are strictly ordered as well. except in rare cases, at any given time, all participants on the network are in agreement on the exact number and history of blocks, and are working to batch the current live transaction requests into the next block.

once a block is put together (mined) by some miner on the network, it is propagated to the rest of the network; all nodes add this block to the end of their blockchain, and mining continues. the exact block-assembly (mining) process and commitment/consensus process is currently specified by ethereum’s “proof-of-work” protocol.

A visual demo

Proof of work protocol

proof of work means the following:

More on mining

What's in a block?

Block size

a final important note is that blocks themselves are bounded in size. each block has a block gas limit which is set by the network and the miners collectively: the total amount of gas expended by all transactions in the block must be less than the block gas limit. this is important because it ensures that blocks can’t be arbitrarily large. if blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements. the block gas limit at block 0 was initialized to 5,000; any miner who mines a new block can alter the gas limit by up to about 0.1% in either direction from the parent block gas limit. the gas limit as of november 2018 currently hovers around 8,000,000.

Further reading

Know of a community resource that helped you? Edit this page and add it!

Back to top ↑
  • On this page
  • Prerequisites
  • Why blocks?
  • How blocks work
  • Proof of work protocol
  • What's in a block?
  • Block size
  • Further reading
  • Related topics