Skip to content

Geth Import should support importing PoS blocks #24601

@marioevz

Description

@marioevz

Rationale

At the moment, using geth import for PoS blocks (blocks that happen after the Terminal Total Difficulty is reached) fails because the feature requires all imported blocks to have a non-zero difficulty value, which is not the case for PoS blocks, which all require 0 in the difficulty field.

Why should this feature exist?
This feature would aid testing in the consensus hive simulator, which currently attempts to import blocks in the BlockchainTests category of the tests repository.

What are the use-cases?
Importing blocks with non-zero difficulty after the TTD has been reached should still result in error.
PoS blocks with ommers should also fail, or non-zero Nonce.
These are test cases that cannot be tested through the Engine API since the payload does not contain these fields.

This feature was also mentioned in #24003

Implementation

Do you have ideas regarding the implementation of this feature?
The import feature should be aware of the TerminalTotalDifficulty setting in the genesis, and act accordingly when doing the block imports.

Are you willing to implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions