-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EIP 2622 - Total Difficulty in Block Header #2622
Closed
+43
−0
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4d802f3
Create eip-2357
tkstanczak 19594fc
Rename eip-2357 to eip-2357.md
tkstanczak 8ec705c
Update eip-2357.md
tkstanczak 01330c4
Update eip-2357.md
tkstanczak 3e351d2
Update eip-2357.md
tkstanczak bc6223e
Update eip-2357.md
tkstanczak 609dd10
Update eip-2357.md
tkstanczak 7ed0046
Update and rename eip-2357.md to eip-2622.md
tkstanczak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
eip: 2622 | ||
title: Total Difficulty in Block Header | ||
author: Tomasz K. Stanczak (@tkstanczak) | ||
discussions-to: https://ethereum-magicians.org/t/eip-2357-replace-difficulty-with-total-difficulty-in-block-headers/4233 | ||
status: Draft | ||
type: Standards Track | ||
category: Core | ||
created: 2020-04-29 | ||
--- | ||
|
||
## Simple Summary | ||
|
||
This document proposes to replace Dififculty with Total Difficulty in the Ethereum block headers.. | ||
|
||
## Abstract | ||
|
||
Replace field Difficulty with TotalDifficulty (sum of difficulties since genesis) in the Ethereum block header. | ||
|
||
## Motivation | ||
|
||
Simplify total difficulty verification in stateless clients (no need to hold all headers from genesis to verify total difficulty claim). | ||
|
||
In Eth62 StatusMessage a TotalDifficulty field is included and when nodes are on different branches they need to resync from the branching point to verify such TotalDifficulty claim. A false claim may lead to long range reorg assumption and force clients to try to resync with new entrants many blocks back. | ||
|
||
NewBlock message in Eth62 includes a TotalDifficulty field that is currently ignored by the clients because it cannot be verified. It means that it harder to switch to winning branches during a short length reorgs (2 blocks) if we do not contain the parent of the block (we have to ask for the parents before verifying the higher total difficulty claim). | ||
|
||
These problems lead to client implementations relying on a chain length instead of total difficulty when selecting the longest branches. This is one of the reasons that makes the Clique chains less stable. | ||
|
||
## Specification | ||
|
||
Difficulty field will be replaced with TotalDifficulty (sum of difficulties since genesis) in the Ethereum block header. | ||
|
||
## Rationale | ||
|
||
This simplifies the selection of the best peer, acceptance of the NewBlock broadcasts and stateless client execution without verification from genesis. | ||
|
||
## Backwards Compatibility | ||
|
||
Clients will have to understand that headers before the EIP will have Difficulty and not total difficulty field. | ||
|
||
## Copyright | ||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should link to the Eth62 spec here. Preferably to the
StatusMessage
part.