Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logIndex broken on v3.0.0-alpha7 #13367

Open
mriccobene opened this issue Jan 10, 2025 · 0 comments
Open

logIndex broken on v3.0.0-alpha7 #13367

mriccobene opened this issue Jan 10, 2025 · 0 comments
Assignees
Labels
erigon3 imp1 High importance
Milestone

Comments

@mriccobene
Copy link
Member

mriccobene commented Jan 10, 2025

In the RPC Integration test suite, the following tests fail on the v3.0.0-alpha7:

  • eth_getLogs/test_16.tar
  • eth_getLogs/test_17.json
  • eth_getLogs/test_18.json
  • eth_getLogs/test_19.tar
  • eth_getLogs/test_20.json

It seems that more log objects inserted in a certain block have a coincident log index while before it was not so.

This is the diff between the expected response and the actual response of the eth_getLogs in the test 17:
Image

Also, if you request all logs of a specific block then log indexes seem broken on alpha7.
This request:

curl \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
      {
        "address": [],
        "fromBlock": "0x3D08F6",
        "toBlock": "0x3D08F6",
        "topics": [[]]
      }
    ]
  }' \
  http://localhost:8545

produces different responses on alpha5 and alpha7: the only difference is in the logIndex.
On alpha5 logIndex is progressing from 0x0 to 0x23 but on alpha7 it is always 0x1a or 0x1b.
Here the responses:
alpha5.json
alpha7.json

Note that the problem does not seem to be related to eth_getLogs but to the code that writes the logIndex to snapshots/database, because if we run erigon alpha7 with an alpha5 db then the answers are ok.

@mriccobene mriccobene added the bug label Jan 10, 2025
@mriccobene mriccobene changed the title eth_getLogs broken on v3.0.0-alpha7 logIndex broken on v3.0.0-alpha7 Jan 10, 2025
@AskAlexSharov AskAlexSharov added this to the 3.0.0-beta2 milestone Jan 20, 2025
@VBulikov VBulikov added imp1 High importance and removed bug labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erigon3 imp1 High importance
Projects
None yet
Development

No branches or pull requests

4 participants