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

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

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

buddh0
Copy link
Collaborator

@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 force-pushed the historical_block_hashes branch 2 times, most recently from e8277b3 to 066df1f Compare September 25, 2024 06:57
@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 force-pushed the historical_block_hashes branch 5 times, most recently from 568e44b to 893bd0e Compare November 29, 2024 09:12
@buddh0 buddh0 force-pushed the historical_block_hashes branch from 893bd0e to b9530c8 Compare November 29, 2024 09:25
@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
7 checks passed
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