Skip to content

eth_getProof output is off-spec for 1186 #5478

Open
@prestwich

Description

@prestwich

This issue arises out of a change made for hive test compatibility due to off-spec behavior in geth. Please see more detailed write-up of geth's behavior here

Acceptance Criteria

eth_getProof should return storage keys as Quantity according to 1186 spec, with Quantity as defined in 1474. It should never have a leading zero in a returned storage proof key

Steps to Reproduce (Bug)

$ curl localhost:8545 \     
    -X POST \                
    -H "Content-Type: application/json" \
    -d '{"method":"eth_getProof", "params":["0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41",["0x05"], "latest"],"id":44,"jsonrpc":"2.0"}' \
    | jq

Expected behavior:
According to 1186 storage keys in eth_getProof responses should be Quantity encoded (0x prefixed no-leading-zeroes hex strings) as defined in 1474. These should never have leading 0 nibbles

Actual behavior:
Nethermind returns a leading 0 e.g. 0x05 due to changes made in #4564 as a result of #4504.

Frequency:
roughly 1 in 16 (whenever a leading nibble is 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion)RPCbugSomething isn't workingmainnetsnackSmaller coding task - less than a day for an experienced devtesting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions