besu icon indicating copy to clipboard operation
besu copied to clipboard

Invalid key field when using getProof API

Open JosephK95 opened this issue 2 years ago • 1 comments

Description

When we execute getProof API, it returns an array of storage-entry objects as requested. According to the Ethereum API specification, the key field in the entry object should conform to ^0x([0-9a-f][0-9a-f]){0,32}$ regex pattern. However, it seems that Besu returns a non-conforming value. (Specification link: https://github.com/ethereum/execution-apis)

Expected behavior:

{ 
  ...
  storageProof: [ { key: '0x2', value: '0x0', ... } ]
}

Actual behavior:

{ 
  ...
  storageProof: [ { key: '2', value: '0x0', ... } ]
}

Frequency: Always

Versions (Add all that apply)

  • Software version: besu/v22.4.4/linux-x86_64/openjdk-java-16
  • OS Name & Version: Ubuntu 20.04.4 LTS

JosephK95 avatar Aug 10 '22 13:08 JosephK95

Hi there - is this bug present on Besu v22.7.0? @fab-10 @daniellehrner is this something we addressed in Hive testing?

non-fungible-nelson avatar Aug 15 '22 16:08 non-fungible-nelson