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

chifra export - poor performance of logs query #3520

Open
tjayrush opened this issue Feb 22, 2024 · 1 comment
Open

chifra export - poor performance of logs query #3520

tjayrush opened this issue Feb 22, 2024 · 1 comment

Comments

@tjayrush
Copy link
Member

tjayrush commented Feb 22, 2024

This query takes a very long time through chifra

time chifra export --cache \
   --logs \
   --fmt json \
   0xBBAAc125DCE2B69d2a516C90559af1eD7B7d5EAf \
   --emitter=0xC36442b4a4522E871399CD717aBDD847Ab11FE88 \
   --topic 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef \
           0x0000000000000000000000000000000000000000000000000000000000000000 \
           0x000000000000000000000000BBAAc125DCE2B69d2a516C90559af1eD7B7d5EAf

The equivilant using just the RPC (see below) is MUCH faster.

@gphil
Copy link

gphil commented Feb 22, 2024

here's the corresponding eth_getLogs request:

curl --request POST \
     --url <ETH_MAINNET_RPC_URL> \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "address": [
        "0xc36442b4a4522e871399cd717abdd847ab11fe88"
      ],
      "fromBlock": "0x429d3b",
      "toBlock": "latest",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000000000000000000000000000000000000000000000",
        "0x000000000000000000000000BBAAc125DCE2B69d2a516C90559af1eD7B7d5EAf"
      ]
    }
  ]
}
'

@tjayrush tjayrush closed this as completed Jun 4, 2024
@tjayrush tjayrush reopened this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants