Skip to content

[Feature]: implement eip-2935 #406

@yihuang

Description

@yihuang

Summary

EIP-2935 is a new feature introduced in Prague hardfork to save historical block hash into state, see: https://eips.ethereum.org/EIPS/eip-2935, it provides an alternative way to query historical block hash than the BLOCKHASH opcode.

Problem Definition

No response

Proposed Feature

Right now, cosmos EVM has a historical block hash issue, see: #235, EIP-2935 can be an alternative way to solve it.

EIP-2935 itself don't fix the BLOCKHASH opcode itself, it expects users to migrate away from that opcode to query the system contract directly.

But we can change the GetHashFn to query this contract storage to serve the historical block hash in the BLOCKHASH opcode, and avoid duplicated storage (see #236).

Work Breakdown

#### Must have
- [ ] discuss proposal (if proposal rejected, close EPIC)
- [ ] create ADR (if ADR rejected, close EPIC)
- [ ] add sub-tasks needed to implement the proposed feature
#### Nice to have
- [ ] add sub-tasks that are nice to have for the proposed feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions