115

Where can I find a description (preferably a diagram like below) showing the block structure in an Ethereum blockchain?

Diagram showing how Bitcoin transactions can be verified

Credits: Wikipedia

2
  • 1
    Correct me if I am wrong but this is not only relevant to Proof of Work, the Proof of stake will still use the same Merkle Tree right?
    – Cyberience
    Jun 27, 2018 at 7:03
  • @Cyberience yes, Merkle trees are still being used today (Sep 2023, post-Merge). But Merkle trees will be replaced by Verkle trees during The Verge. Refer to this blog post for more info on Verkle trees. Sep 22, 2023 at 13:05

8 Answers 8

161

Here's my interpretation, based on the yellow paper:

enter image description here

...the Tries should look more like this:

enter image description here

7
  • 7
    Hi @atomh33ls, do you mind sharing the source file for the illustrations (in whatever software format you used to create them). I would like to create an illustration for transactions trie. It will look almost the same as state trie except some details will be changed. Thank you! Oct 26, 2017 at 10:29
  • 2
    @atomh33ls +1 to the source file, please. If not, I'd also be happy recreating it in mermaid.js so the community could co-edit it. The three specific changes I have in mind are adding a note that the key size is shortened for simplified purposes, putting the tree complexity (max depth) in the bottom right, and adding and example of an extension node with prefix 1[].
    – Olshansky
    Apr 23, 2022 at 0:35
  • 2
    @Olshansk The main diagram svg is here. Alas I don't have the merkle diagram to hand. They seem like good ideas - will be interesting to see what you come up with..
    – Lee
    Apr 25, 2022 at 12:21
  • 1
    Has anyone dived into the details of whether there were changes to this after "the merge"?
    – Olshansky
    Nov 5, 2022 at 19:05
  • 1
    @Olshansky the first diagram definitely requires an update after The Merge. Uncle blocks are now called dunkles. Also, these diagrams will become increasingly outdated as Ethereum transitions to The Surge, The Verge, The Purge, and eventually The Purge. Sep 22, 2023 at 9:20
82
+50

Lets first start with my adaptation of this figure illustrating the Bitcoin block structure:

Boitcoin Blockchain architecture

So far so good. All fairly basic.

Enter Ethereum and things get a wee bit more complex. After reading through this and this, and as per @eth 's recommendation this, my best interpretation is the figure below:

![Ethereum Blockchain Architecture

The header field definitions are available in section 4.3 of the yellow paper.

6
  • 2
    Uncles is a hash (of a list of uncles), Yellow Paper has: "The Keccak 256-bit hash of the ommers list portion of this block". Codehash is just a hash since contracts are immutable. The pointers point to "hash of whole block header" (the Keccak-256 hash of all the bytes in the block header). To have a full diagram, should really consult the Yellow Paper...
    – eth
    Jan 29, 2016 at 22:53
  • Updated response after consulting the YP. Starting to get clearer now. Thanks!
    – zanzu
    Feb 1, 2016 at 12:34
  • Why are the transactions from block N linked to those of block N+1?
    – Sebi
    Jun 10, 2016 at 8:31
  • 3
    These links correspond to contract state that has not changed in between blocks. Referencing the state from the previous blocks instead of replicating is more efficient from a block size perspective.
    – zanzu
    Jun 10, 2016 at 9:49
  • 1
    You forgot the difficulty in bitcoin headers.
    – Jus12
    Sep 23, 2016 at 16:52
24

Here is a complete structure of a block and where it plays its role in Ethereum's blockchain.

Ethereum Block Structure

You asked for a diagram but i think this would be more explanatory.

12

The description can be found in the Yellow Paper which is the formal specification of the Ethereum protocol.

Here are the main pieces of a block:

4.3. The Block. The block in Ethereum is the collection of relevant pieces of information (known as the block header), H, together with information corresponding to the comprised transactions, T, and a set of other block headers U that are known to have a parent equal to the present block’s parent’s parent.

No diagram though (an opportunity for the community).

1
  • ComeonI though you guys would do better at this explanation
    – NaN
    Nov 27, 2017 at 12:37
10

Here's a picture from V's article regarding data structures for light clients:

https://blog.ethereum.org/2014/02/18/ethereum-scalability-and-decentralization-updates/

enter image description here

1
  • 4
    The above is an abstraction of a Merkle tree. I'm rather looking for the Ethereum block structure (including all the actual header fields).
    – zanzu
    Jan 22, 2016 at 8:57
10

Vitalik Buterin gives a compact answer:

Every block header in Ethereum contains 3 trees for three kinds of objects: Transactions, Receipts (essentially, pieces of data showing the effect of each transaction), State.

You can read a longer version with pictures here.

6

Extrapolating from the syntactic block structure, we can also ask what the semantic ethereum world state structure looks like. I use this diagram to explain the relationship between "on-chain", "off-chain", and everything in between, including L2 scaling solutions. Please see my accompanying blog post for more details.

enter image description here

0

Here is my interpretation based on the latest version of yellow paper(BERLIN VERSION beacfbd – 2022-10-24)

enter image description here

here is the whole link: https://medium.com/@JanessaTech/ethereum-a-latest-interpretation-of-yellow-paper-29ec14d05867

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.