162 votes

Ethereum block architecture

Here's my interpretation, based on the yellow paper: ...the Tries should look more like this:
Lee's user avatar
  • 8,548
35 votes
Accepted

What is an Event?

The blockchain is a list of blocks which are fundamentally lists of transactions. Each transaction has an attached receipt which contains zero or more log entries. Log entries represent the result of ...
Thomas Jay Rush's user avatar
24 votes

Ethereum block architecture

Here is a complete structure of a block and where it plays its role in Ethereum's blockchain. You asked for a diagram but i think this would be more explanatory.
Vishal Sharma's user avatar
19 votes

What is an Event?

Events are dispatched signals the smart contracts can fire. DApps, or anything connected to Ethereum JSON-RPC API, can listen to these events and act accordingly. Event can be indexed, so that the ...
Mikko Ohtamaa's user avatar
15 votes

What is a block hash?

The block header is the hash returned from generating a Merkle tree that is below the current difficulty target for the blocks data. What's a hash? In order to understand what the block header is ...
Anandamide's user avatar
15 votes
Accepted

Why are there no leading zeroes in ethereum block hash?

In the Ethereum blockchain, the difficulty is used to calculate a target. Here are the ethminer logs for block number 1257006: ℹ 35:02:42.89 ethminer Solution found; Submitting to http://192.168.4....
BokkyPooBah's user avatar
  • 40.3k
10 votes

Ethereum block architecture

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 ...
Jouko Salonen's user avatar
9 votes

Why are there no leading zeroes in ethereum block hash?

What you see in block explorers is the sha3 of the block header, not the ethash.
Yaron Welner's user avatar
9 votes
Accepted

Block header structure change under the Merge to Proof of Stake?

Your question is a bit tricky because it depends on which types of block you speak of. After the merge, the beacon blocks will encapsulate all the info and thus can be considered as "the main ...
upavloff's user avatar
  • 1,100
9 votes

How large are the Ethereum block headers?

Ok, so according to the Yellow paper (section 4.4), we have several fields in the block header: parentHash, 256 bits ommersHash, 256 bits beneficiary, 160 bits stateRoot, 256 bits transactionsRoot, ...
Randomblue's user avatar
  • 2,610
9 votes

Block header hash calculation

Below are the steps to calculate blockHash, given a blockNumber: Step1. eth.getBlock(400000) Output:{ difficulty: '6022643743806', extraData: '0xd583010202844765746885676f312e35856c696e7578', ...
AnuragP's user avatar
  • 431
8 votes

block-header hash verification

Below are the steps to calculate blockHash, given a blockNumber: Step1. eth.getBlock(400000) Output:{ difficulty: '6022643743806', extraData: '0xd583010202844765746885676f312e35856c696e7578', ...
AnuragP's user avatar
  • 431
6 votes

Is a block number unique or does it change if the block becomes uncle? Does the transaction hash include a block hash as input?

Block number is not unique you can have two or more blocks with the same number. The chain will eventually sentle on one of them, but for a period of time any of them can be valid, ie some nodes on ...
Ismael's user avatar
  • 30.6k
6 votes

Ethereum block architecture

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&...
samlaf's user avatar
  • 160
6 votes
Accepted

Is block's timestamp current block's or previous block's timestamp?

It's the timestamp of the current block. The idea is like this: When a miner mines a block, he/she picks the timestamp, executes all contracts with the chosen timestamp to update the state, and does ...
Loi.Luu's user avatar
  • 2,103
4 votes
Accepted

What is the beneficiary in block header?

Here's the image from the linked answer Ethereum block architecture provided in your comment. And here's the data from a block 1932656. Beneficiary in the image above is the miner in the data below. ...
BokkyPooBah's user avatar
  • 40.3k
4 votes

Block header format

You can find the block header's structure in the Yellow paper, 4.4 (page 5). I don't have time to go through eveyrthing, but if I do not make any mistake, for example, you could bind the following: ...
Itération 122442's user avatar
3 votes

Is a block number unique or does it change if the block becomes uncle? Does the transaction hash include a block hash as input?

The Block number is not inherently unique. The Block number is the measure of blocks starting from the block in question to the first block(the genesis block). It might be simple to assume that the ...
Vignesh Karthikeyan's user avatar
3 votes

What is an Event?

The yellowpaper (version 7e819ec - 2019-10-20) section 6.1 Substate includes a description of: indexable ‘checkpoints’ in VM code execution that allow for contract-calls to be easily tracked ...
eth's user avatar
  • 85.7k
3 votes

How Geth and Parity resolve timestamps when validating block headers?

I doubt there has ever been an actual case of this happening (don't quote me on that unless you also quote that I said not to quote me on it). In order for a block to be valid by Parity and not valid ...
natewelch_'s user avatar
3 votes

How is the nonce in a the block header arrived at?

My company runs a blockchain explorer. Here is the information we have for that linked block. I've had a look through the raw data and none of the nonces actually start with 0x88 (as returned from a ...
Thomas Clowes's user avatar
3 votes
Accepted

Can contracts access the block header extraData field?

No, they cannot. However, it is quite simple to trustlesly verify the extraData from the past 256 blocks: simply provide the full header and make sure the hash matches the block hash
Tjaden Hess's user avatar
  • 37.1k
3 votes

block hash from block-header rlp

Below are the steps to calculate blockHash, given a blockNumber: Step1. eth.getBlock(400000) Output:{ difficulty: '6022643743806', extraData: '0xd583010202844765746885676f312e35856c696e7578', ...
AnuragP's user avatar
  • 431
3 votes
Accepted

How are Ethereum 2 block hashes computed?

According to EIP-3675, with the transition to Proof of Stake: Each block field listed in the table below MUST be replaced with the corresponding constant value Field Constant value Comment ...
eth's user avatar
  • 85.7k
2 votes
Accepted

What's the header hash displayed in the miner?

I don't have ethminer installed, so I can't verify this myself just yet. However, looking at the code I'd venture to guess that ethminer is partially encoding the bytes constituting the block header ...
ryepdx's user avatar
  • 1,342
2 votes

How large are header scalar values?

The header is defined here, and the 5 scalar values are *big.Int. These are arbitrary precision integers, so variable size.
Randomblue's user avatar
  • 2,610
2 votes

How Geth and Parity resolve timestamps when validating block headers?

Just brainstorming here but I guess the reason block times are accurate is for the same reason the miners agree on all of the other parameters a block must have. Eg they agree that they pay 3 Eth, at ...
willjgriff's user avatar
  • 1,658
2 votes
Accepted

Why is LH repeated in equation 35 of the yellow paper?

It's not the same function, it has an asterisk and, as per the definition right after the excerpt in the posted image, a function L(x)* is an element-wise sequence transformation:
Paul Razvan Berg's user avatar
2 votes
Accepted

Addresses in paths of State Patricia Trie

Every block header has 3 patricia trees. It contains a hash of the root nodes of 3 tries, not the entire tries. The tries themselves aren't stored in the block, they're stored separately in the state ...
Richard Horrocks's user avatar
2 votes
Accepted

Strange Ropsten Bug - transactionsRoot and recieptsRoot has same value

It is a block without transaction https://ropsten.etherscan.io/block/4138624, so those fields are keccak256 of an empty array of bytes. If you look at blocks for other networks like rinkeby or ...
Ismael's user avatar
  • 30.6k

Only top scored, non community-wiki answers of a minimum length are eligible