erigon icon indicating copy to clipboard operation
erigon copied to clipboard

FR: eth_getFilterLogs

Open quickchase opened this issue 3 years ago • 3 comments

Rationale

This was brought up in #4547 which was closed, but this method does not work and is not implemented.

Why should this feature exist? It's part of the eth namespace and everyone else supports it.

What are the use-cases? Feature parity with every other client

quickchase avatar Aug 17 '22 14:08 quickchase

The method is implemented, but you have to whitelist that specific method through --rpc_accesslist

enriavil1 avatar Aug 17 '22 15:08 enriavil1

--rpc.accessList=/home/eth/rules.json

cat /home/eth/rules.json 
{
  "allow": [
    "web3_clientVersion",
    "web3_sha3",
    "net_listening",
    "net_peerCount",
    "net_version",
    "eth_blockNumber",
    "eth_chainID",
    "eth_chainId",
    "eth_protocolVersion",
    "eth_syncing",
    "eth_gasPrice",
    "eth_maxPriorityFeePerGas",
    "eth_feeHistory",
    "eth_getBlockByHash",
    "eth_getBlockByNumber",
    "eth_getBlockTransactionCountByHash",
    "eth_getBlockTransactionCountByNumber",
    "eth_getUncleByBlockHashAndIndex",
    "eth_getUncleByBlockNumberAndIndex",
    "eth_getUncleCountByBlockHash",
    "eth_getUncleCountByBlockNumber",
    "eth_getTransactionByHash",
    "eth_getRawTransactionByHash",
    "eth_getTransactionByBlockHashAndIndex",
    "eth_retRawTransactionByBlockHashAndIndex",
    "eth_getTransactionByBlockNumberAndIndex",
    "eth_retRawTransactionByBlockNumberAndIndex",
    "eth_getTransactionReceipt",
    "eth_getBlockReceipts",
    "eth_estimateGas",
    "eth_getBalance",
    "eth_getCode",
    "eth_getTransactionCount",
    "eth_getStorageAt",
    "eth_call",
    "eth_callBundle",
    "eth_createAccessList",
    "eth_newFilter",
    "eth_newBlockFilter",
    "eth_newPendingTransactionFilter",
    "eth_getFilterChanges",
    "eth_getFilterLogs", <------------------------- HERE
    "eth_uninstallFilter",
    "eth_getLogs",
    "eth_getProof",
    "eth_sendRawTransaction",
    "eth_coinbase",
    "eth_hashrate",
    "eth_submitHashrate",
    "eth_getWork",
    "eth_submitWork",
    "eth_subscribe",
    "eth_unsubscribe",
    "debug_accountRange",
    "debug_accountAt",
    "debug_getModifiedAccountsByNumber",
    "debug_getModifiedAccountsByHash",
    "debug_storageRangeAt",
    "debug_traceBlockByHash",
    "debug_traceBlockByNumber",
    "debug_traceTransaction",
    "debug_traceCall",
    "trace_call",
    "trace_callMany",
    "trace_rawTransaction",
    "trace_replayBlockTransactions",
    "trace_replayTransaction",
    "trace_block",
    "trace_filter",
    "trace_get",
    "trace_transaction",
    "txpool_content",
    "txpool_status",
    "erigon_getHeaderByHash",
    "erigon_getHeaderByNumber",
    "erigon_getLogsByHash",
    "erigon_forks",
    "erigon_issuance",
    "erigon_GetBlockByTimestamp"
  ]
}

curl http://localhost:8545/ \
>   -X POST \
>   -H "Content-Type: application/json" \
>   --data '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x0"],"id":1}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"the method eth_getFilterLogs does not exist/is not available"}}

quickchase avatar Aug 17 '22 16:08 quickchase

image

quickchase avatar Aug 17 '22 16:08 quickchase

same as well

jackjieYYY avatar Sep 14 '22 03:09 jackjieYYY

Same here also ! Any help ?

odannis avatar Sep 18 '22 17:09 odannis

Hi @AskAlexSharov and @AlexeyAkhunov, I saw you closed issues related to this topic. However, I am not quite sure if everything is resolved now. Maybe you can share with us your thoughts on this issue. I have the same issue here as the other commenters. Specifically, I use a tool that tries to call eth_getFilterLogs.

User Story: As a user of Erigon, I want to use all Web3 interfaces so that scraping tools using Erigon do not need to be changed.

Acceptance Criteria: Scenario 1:

  • Given: Installation of https://github.com/ChristianBirchler/scrape-721
  • When: Scraping transaction data of any Smart Contract
  • Then: No exception should be thrown due to missing implemented Web3 interfaces (e.g., eth_getFilterLogs)

ChristianBirchler avatar Oct 24 '22 09:10 ChristianBirchler

I'm running into the same issue, and I do have it whitelisted

mahirkarim1 avatar Oct 28 '22 19:10 mahirkarim1

Also, I looked at the code and there are no mentions of getFilterLogs https://github.com/ledgerwatch/erigon/blob/devel/cmd/rpcdaemon/commands/eth_filters.go The only file that mentions it https://github.com/ledgerwatch/erigon/blob/devel/eth/filters/api.go but it looks like unused legacy code. So, I think that it's not implemented either.

Termina1 avatar Dec 02 '22 13:12 Termina1

Hi there, I have indeed the same use case as @ChristianBirchler . Any plan to implement it in the near future?

cyril-kit avatar Dec 09 '22 07:12 cyril-kit

Hi! I think working on this issue would be fantastic

pauline-thrackle avatar Dec 20 '22 17:12 pauline-thrackle

This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

github-actions[bot] avatar Feb 09 '23 02:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Feb 17 '23 02:02 github-actions[bot]