Incorrect logIndex when using getPastLogs API
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)
-
Download test files test_cases.zip
-
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 -
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
Hi @sjmini, thank you for opening this issue. We are tracking this in relation to #4114.
@iamhsk Thanks for letting me know this.
Fixed as part of #4114.