Skip to main content
24 votes
Accepted

What is the exact "longest chain" rule implemented in the Ethereum "Homestead" protocol?

Ethereum determines the longest chain based on the total difficulty, which is embedded in the block header. Ties are broken randomly. Total difficulty is the simple sum of block difficulty values ...
Nick Johnson's user avatar
  • 8,164
7 votes
Accepted

Are there still uncles with proof-of-stake?

As it stands, by my reading of it, there is something akin to uncles in the proposed PoS system, referred to as "dunkles". See this: The second strategy is to simply punish validators for creating ...
Lee's user avatar
  • 8,618
7 votes
Accepted

Are uncle/ommer blocks still possible after the merge?

In the post-merge PoS Ethereum, validators will be pre-selected to validate blocks, which means that no more than one validator will be validating a block at a time. Hence, there are no uncle (ommer) ...
Yongjian P.'s user avatar
  • 4,308
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.3k
6 votes

Difference between uncle block and forked blocks

Valid blocks that are not included in the main Ethereum chain because they were found a bit too late are still submitted to the network. Miners can include those blocks as "uncles" if they are not "...
jotud's user avatar
  • 330
5 votes
Accepted

Different uncles reward

The uncle reward calc is: (U_n + 8 - B_n) * R / 8 In the first example, there are two uncles, U1 and U2. The uncle number of U1 is 4445, and the uncle number of U2 is 4446. The block number is 4447 ...
Thomas Jay Rush's user avatar
5 votes
Accepted

Are uncle blocks included in blockchain

No. Only uncle block headers are included. Also when including uncles only the validity of their headers is checked, transactions are ignored. From Design Rationale: Uncle validity requirements: ...
medvedev1088's user avatar
5 votes

What happens to transactions in Uncles?

Answering your first question: If the transactions in a block that is declared invalid have not been already validated somewhere else in the main blockchain, they will be returned to the pool of ...
Tesa's user avatar
  • 2,279
4 votes

How do miners decide which block should be an ommer block?

Yes, it is possible because the miner's won't necessarily know the other has found a solution. The news of these discoveries spreads via gossip, so there is always latency. A very short summary of ...
Rob Hitchens's user avatar
  • 55.6k
4 votes

What is the exact "longest chain" rule implemented in the Ethereum "Homestead" protocol?

Things have changed since the answer by Nick was posted. Especially, with introduction of EIP 100 (which was accepted in June 2017 - just 3 months after Nick's answer) which changes the difficulty ...
dufferZafar's user avatar
4 votes
Accepted

About uncle block and event

If your frontend observes the event logs via JSON RPC (method eth_newFilter to create a filter and method eth_getFilterChanges to poll for the subsequent changes), you have the ability to receive ...
Forketyfork's user avatar
4 votes

Difference between uncle block and forked blocks

This is only a partial answer. Here are some differences which I noticed when looking a the linked pages in your question: Miner Reward. Forked blocks earned the miners a full reward (5 ETH + gas ...
Tesa's user avatar
  • 2,279
3 votes

Does the ETH blockchain have fundamentally more branching than BTC?

Yes, but they are routine and are less of a concern than they would be if the Bitcoin algorithm was arbitrarily speeded up, Ethereum's proof-of-work is not merely bitcoin's with a faster blocktime. ...
Rob Hitchens's user avatar
  • 55.6k
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
Accepted

How many Uncles (Ommer) can be included and how is the reward distributed

One block can include up to two uncles. If a block references two uncles, each uncle will earn 7/8th of 5 ETH to whoever mined that uncle. Each uncle being referenced will also earn a small reward ...
Tesa's user avatar
  • 2,279
2 votes

What is the exact "longest chain" rule implemented in the Ethereum "Homestead" protocol?

It is stated here that GHOST protocol is not used in ethereum. Why did Ethereum abandon the GHOST protocol? and that it was abandoned 2 weeks after mainet launch and that Ethereum uses modified ...
Blissful's user avatar
  • 384
2 votes

What is an uncle/ommer block?

In case of proof-of-work mining, there are many miners trying to mine the same set of transactions at the same time. Since the block mining time is very short (about 15 sec. in case of ethereum) there ...
abhikedia_'s user avatar
2 votes

In what cases if any, does a transaction get lost from the network forever?

Yes. But the exact circumstances are hard to pin down as it varies between nodes. Each node on the Ethereum network will maintain it's own finite list of pending transactions. This is configurable on ...
AndyK's user avatar
  • 695
2 votes
Accepted

Is there any way to extract transactions in uncles?

Uncle are blocks that are not longert part of the main chain due to a chain reorganization. You can try calling getBlock(hash) if it was mined recently. Nodes will stop propagating once it was mined ...
Ismael's user avatar
  • 30.3k
2 votes
Accepted

Does the ETH blockchain have fundamentally more branching than BTC?

Just to add to Rob's answer. So does ETH fundamentally have a lot more branches, Yes, as per Rob's answer. and a lot more orphaned transactions than BTC does? Yes, but, if most miners are ...
Richard Horrocks's user avatar
2 votes

How do miners decide which block should be an ommer block?

Any way they want. While miners have a good reason to build on the longest chain (because other miners will build on the longest chain (because other miners will build on the longest chain (...))) ...
Matthew Schmidt's user avatar
2 votes
Accepted

Are uncle blocks unnecessary overhead on blockchain?

In Ethereum, the ommers (i.e. the uncles until 6th generation before that are "included in the main block") get a reward. According to the Ethereum protocol specification (yellow paper), it is ...
Briomkez's user avatar
  • 1,904
2 votes
Accepted

How to check uncle block when listening to new block?

You can never be 100% sure that any given block will be in the long term chain, but as more blocks are added on top of it, the chance that a given block will become an uncle decreases exponentially. ...
Tjaden Hess's user avatar
  • 37.3k
2 votes

can I trust transactions in blocks with just 1 block confirmation?

So can I trust that all transactions in these blocks will be in the main chain? In a word (or two): not necessarily :-) I wrote a quick (dumb) script a while back to scrape data from Etherscan ...
Richard Horrocks's user avatar
2 votes

How do I compute the uncle block reward issued for a lock?

To calculate the uncle rewards, you can use: (uncle_block_number + 8 - block_number) * block_reward / 8 Uncle blocks occur when two or more miners create blocks at almost the same time. The basic ...
stoooops's user avatar
2 votes
Accepted

How can you get an uncle block reward and a block reward for the same block?

The block's miner 0x5a0b54.. (Spark Pool) didn't get the uncle reward, their rewards were: 2 ETH - block reward 0.014707875066268655 ETH - transactions fees 0.0625 ETH - including a uncle block The ...
Ismael's user avatar
  • 30.3k
2 votes
Accepted

How Uncles (Ommers) Hash include in headers?

I think the yellow paper or beige paper best explain this. to understand uncles first it's important to understand consensus. imagine two miners, let's say in US and in China, work on two different ...
high_byte's user avatar
  • 313
1 vote

Transactions in uncle block are lost

The code you are posting is executed during a chain split. A chain split is when you have one chain on local node, and suddenly a longer chain comes from another node. So, your node must delete all ...
Nulik's user avatar
  • 4,116
1 vote
Accepted

A doubt about forks and mining

If you see an invalid block you just ignore it and go back to doing whatever you'd be doing if you'd never seen it. Use the transactions you were previously using, and the next nonce you were ...
Edmund Edgar's user avatar
  • 16.9k
1 vote
Accepted

Detecting whether a transaction was cancelled (because a block is orphaned)

It is possible that after a chain reorganization a transaction will be in another block. For example if a transaction was mined in block 100, afte a reorg it is possible it ends up at block 102, or ...
Ismael's user avatar
  • 30.3k

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