Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

fix(rpc): align block number input behaviour for eth_getProof #1639

Merged
merged 5 commits into from
Jan 27, 2023

Conversation

mmsqe
Copy link
Contributor

@mmsqe mmsqe commented Jan 26, 2023

Closes: #XXX

Description

eth_getProof reflect the change on block + 1 instead of block:

Contract deployed on Goerli block 0x7dde86

curl --location --request POST $GOERLI_URL\
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getProof",
    "params": [
        "0x0f9fa59eeaed7bc0d0b320927b513c0570a0eed5",
        [
            "0x0",
            "0x1"
        ],
        "0x7dde86"
    ],
    "id": 0
}'

Value of storage key 0x0 is 0xc05a754131288197f958cf36c6c807faf5ec12d6

Contract deployed on Cronos block 0x6c0f35

curl --location --request POST 'https://evm-t3.cronos.org' \
--header 'Content-Type: application/json' \
--header 'Cookie: __cf_bm=G_4gMZJGaNjs.Gwvb1QjshoBBUHHTlotTaG1z3ENpg4-1674722000-0-AW+JQtRTMYy8xK7Jig1wyvy/8/6uxMwLkpfnwOlS01KUt5yN2R5vrKGwynI2eigc7tl+ilCOVk8OUFi1qPxDEjI=' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getProof",
    "params": [
        "0xee130eae4626cf43374954a6901b00423b870ff4",
        [
            "0x0",
            "0x1"
        ],
        "0x6c0f35"
    ],
    "id": 0
}'

Value of storage key 0x0 is 0x0, only query next block 0x6c0f36 can get 0xc05a754131288197f958cf36c6c807faf5ec12d6


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@mmsqe mmsqe changed the title fix(rpc): align block number input behaviour as ethereum fix(rpc): align block number input behaviour for eth_getProof Jan 26, 2023
@mmsqe mmsqe marked this pull request as ready for review January 26, 2023 09:14
@mmsqe mmsqe requested a review from a team as a code owner January 26, 2023 09:14
@mmsqe mmsqe requested review from GAtom22 and adisaran64 and removed request for a team January 26, 2023 09:14
@fedekunze fedekunze enabled auto-merge (squash) January 27, 2023 09:48
@fedekunze fedekunze merged commit 35f09d9 into evmos:main Jan 27, 2023
mmsqe added a commit to mmsqe/ethermint that referenced this pull request Mar 14, 2023
…1639)

* add state change contract for test

* fix context height for get proof

* add change doc

* fix lint

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
mmsqe added a commit to crypto-org-chain/ethermint that referenced this pull request Mar 14, 2023
…rt: evmos#1639) (#226)

* fix(rpc): align block number input behaviour for eth_getProof (evmos#1639)

* add state change contract for test

* fix context height for get proof

* add change doc

* fix lint

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* fix resolve

* fix test

---------

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants