besu icon indicating copy to clipboard operation
besu copied to clipboard

Incorrect logIndex when using getPastLogs API

Open sjmini opened this issue 3 years ago • 1 comments

Description

When we execute the attached test case (getPastLogs), the client produces the wrong values for the logIndex field. Similar issues occur when using the getTransactionReceipt API.

Steps to Reproduce (Bug)

  1. Download test files test_cases.zip

  2. Run the node with the following command besu --data-path test_cases/data-besu --genesis-file test_cases/besu.json --rpc-http-port 8549 --rpc-http-enabled --rpc-http-api ETH --network-id 15 --discovery-enabled false

  3. Execute the javascript test case test1.js

Expected behavior: [What you expect to happen] { ... ,"logIndex": 1, ...} { ... ,"logIndex": 1, ...} { ... ,"logIndex": 5, ...} { ... ,"logIndex": 2, ...} { ... ,"logIndex": 5, ...}

Actual behavior: [What actually happens] { ... ,"logIndex": 0, ...} { ... ,"logIndex": 1, ...} { ... ,"logIndex": 1, ...} { ... ,"logIndex": 1, ...} { ... ,"logIndex": 1, ...}

Frequency: [What percentage of the time does it occur?] 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

sjmini avatar Aug 09 '22 17:08 sjmini

Hi @sjmini, thank you for opening this issue. We are tracking this in relation to #4114.

iamhsk avatar Aug 15 '22 16:08 iamhsk

@iamhsk Thanks for letting me know this.

sjmini avatar Aug 21 '22 01:08 sjmini

Fixed as part of #4114.

iamhsk avatar Feb 03 '23 02:02 iamhsk