Skip to content

Conversation

@buddh0
Copy link
Contributor

@buddh0 buddh0 commented Sep 24, 2024

Description

BEP-440: Implement EIP-2935: Serve historical block hashes from state

Rationale

tell us why we need these changes...

Example

use node-deploy(bfc5db87b54db995ac06dd3b38d40a2a77bd89a8) to test

  1. modify bsc_cluster.sh, then set up the cluster
image 2. cat log, if prague is enabled at `blockNumber=13`

get blockhash of blockNumber=11

curl http://127.0.0.1:8545/ --data '{
      "jsonrpc": "2.0",
      "id": 0,
      "method": "eth_call",
      "params": [ {
            "to": "0x0aae40965e6800cd9b1f4b05ff21581047e3f91e",
            "data": "0x000000000000000000000000000000000000000000000000000000000000000B"
        }, "latest"]
    }'  -H "Content-Type: application/json"  -X POST

get zero hash

{"jsonrpc":"2.0","id":0,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"}

get blockhash of blockNumber=12

curl http://127.0.0.1:8545/ --data '{
      "jsonrpc": "2.0",
      "id": 0,
      "method": "eth_call",
      "params": [ {
            "to": "0x0aae40965e6800cd9b1f4b05ff21581047e3f91e",
            "data": "0x000000000000000000000000000000000000000000000000000000000000000C"
        }, "latest"]
    }'  -H "Content-Type: application/json"  -X POST

get expected hash

{"jsonrpc":"2.0","id":0,"result":"0x1a4552035ba93e7a463e13f458e9d71b798c4393a79a6c08e157cb81cb11c0bb"}
image

Changes

code implement following ethereum/go-ethereum#29465

but the logic for deployment is different from the raw eip-2935

Notable changes:

  • add each change in a bullet point here
  • ...

@buddh0 buddh0 marked this pull request as ready for review September 25, 2024 08:44
@buddh0 buddh0 marked this pull request as draft November 22, 2024 10:05
@buddh0 buddh0 marked this pull request as ready for review November 29, 2024 09:51
@zzzckck zzzckck merged commit e874fb1 into bnb-chain:develop Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants