Skip to content
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

wants to merge 8 commits into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions EIPS/
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)
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.
Copy link

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.

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](