erigon
erigon copied to clipboard
eth_newFilter does not exist/is not available on bsc mainnet
The README shows that the devel branch has already support eth_newFilter , but when I test the rpc of eth_newFilter on a archive node of bsc mainnet , the rpc has show it not support. I have already update the code into newest devel branch
[root@tf]# curl --location --request POST 'localhost:9548/' --header 'Content-Type: application/json' --data-raw '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["0x12341234"]}],"id":73}' {"jsonrpc":"2.0","id":73,"error":{"code":-32601,"message":"the method eth_newFilter does not exist/is not available"}}

@leowkong maybe we by mistake limit it to websockets only, can you try with the websockets enabled and using ws connection instead?
@leowkong maybe we by mistake limit it to websockets only, can you try with the websockets enabled and using ws connection instead?
python: 3.9.7 web3: 5.30.0 erigon: the new update devel branch rpcdaemon cli: rpcdaemon --datadir /node/erigon --http.api=eth,erigon,web3,net,debug,trace,txpool --http.addr=192.168.XX.XX --ws
` from web3 import Web3, HTTPProvider, WebsocketProvider #w3 = Web3(WebsocketProvider("wss://mainnet.infura.io/ws/v3/xxxxxxxxxxxxxxx")) <----------it works w3 = Web3(WebsocketProvider("ws://xxxxxxx:8545"))
usdt_address = "0xdac17f958d2ee523a2206206994597c13d831ec7" #USDT
event_signature_hash = w3.keccak(text="Transfer(address,address,uint256)").hex()
event_filter = w3.eth.filter({
"address": w3.toChecksumAddress(usdt_address),
"topics": [event_signature_hash]
})
`
still return error info {'code': -32601, 'message': 'the method eth_newFilter does not exist/is not available'}
@mandrigin seems not support on ws
[root@tf_nodereal_prod_archive_nvme2_ec2 rpctest]# wscat -c ws://10.****:9548 Connected (press CTRL+C to quit)
{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x6b175474e89094c44da98b954eedeac495271d0f","topics": []}],"id":1}' < {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"the method eth_newFilter does not exist/is not available"}}
I added a log to see what http APIs we have enabled, but I am looking into this too
It looks like eth_newFilter works over HTTP but not WS. WS says it doesn't exist but HTTP works fine.
You have to have the access rules to make it available over HTTP though.
It looks like eth_newFilter works over HTTP but not WS. WS says it doesn't exist but HTTP works fine.
You have to have the access rules to make it available over HTTP though.
I have been trying to use it on goerli through HTTP and I get the same error. I have been looking at the reason why it might not be getting exposed.
Do you have --rpc.accessList
defined?
See #4541
@MysticRyuujin have not set --rpc.accessList flags
Got same error on ETH mainnet with ws connection.
start command:
./erigon/build/bin/erigon \
--datadir /mnt/node_data/erigon \
--prune=hrtc \
--http --http.addr 0.0.0.0 --http.api "eth,erigon,web3,net,debug,trace,txpool" --http.corsdomain "*" \
--private.api.addr 192.168.1.10:9091 \
--metrics --metrics.addr 0.0.0.0 \
--ws
log:
[INFO] [08-08|03:50:13.805] Starting metrics server addr=http://0.0.0.0:6060/debug/metrics/prometheus
[INFO] [08-08|03:50:13.805] Build info git_branch=devel git_tag=v2021.10.03-1613-g1b20322b6 git_commit=1b20322b608e7a5afa073bc78852296815d013a1
[INFO] [08-08|03:50:13.805] Starting Erigon on Ethereum mainnet...
[INFO] [08-08|03:50:13.808] Maximum peer count ETH=100 total=100
[INFO] [08-08|03:50:13.808] starting HTTP APIs APIs=eth,erigon,web3,net,debug,trace,txpool
[INFO] [08-08|03:50:13.808] torrent verbosity level=WRN
[INFO] [08-08|03:50:15.911] Set global gas cap cap=50000000
[INFO] [08-08|03:50:16.011] Opening Database label=chaindata path=/mnt/node_data/erigon/chaindata
[INFO] [08-08|03:50:16.015] Initialised chain configuration config="{ChainID: 1, Homestead: 1150000, DAO: 1920000, DAO Support: true, Tangerine Whistle: 2463000, Spurious Dragon: 2675000, Byzantium: 4370000, Constantinople: 7280000, Petersburg: 7280000, Istanbul: 9069000, Muir Glacier: 9200000, Berlin: 12244000, London: 12965000, Arrow Glacier: 13773000, Gray Glacier: 15050000, Terminal Total Difficulty: <nil>, Merge Netsplit: <nil>, Engine: ethash}" genesis=0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
[INFO] [08-08|03:50:16.015] Effective prune_flags="--prune.h.older=90000 --prune.r.older=90000 --prune.t.older=90000 --prune.c.older=90000" snapshot_flags="--snapshots=true"
[INFO] [08-08|03:50:21.827] Initialising Ethereum protocol network=1
[INFO] [08-08|03:50:21.827] Disk storage enabled for ethash DAGs dir=/mnt/node_data/erigon/ethash-dags count=2
[INFO] [08-08|03:50:23.153] Starting private RPC server on=192.168.1.10:9091
[INFO] [08-08|03:50:23.153] new subscription to logs established
[INFO] [08-08|03:50:23.153] rpc filters: subscribing to Erigon events
[INFO] [08-08|03:50:23.153] new subscription to newHeaders established
[INFO] [08-08|03:50:23.153] New txs subscriber joined
[INFO] [08-08|03:50:23.154] Reading JWT secret path=/mnt/node_data/erigon/jwt.hex
[INFO] [08-08|03:50:23.155] HTTP endpoint opened for Engine API url=localhost:8551 ws=true ws.compression=true
[INFO] [08-08|03:50:23.156] HTTP endpoint opened url=0.0.0.0:8545 ws=true ws.compression=true grpc=false
[INFO] [08-08|03:50:23.159] Started P2P networking version=66 self=enode://0310ecccf26e27661da6e9219c3d1481c0447bcd98e8e529ef734200c134d6fca53a1fc9695363d1823efa18019466d386a68992d5ea0bc651456e4cf68d5aa7@127.0.0.1:30303 name=erigon/v2022.99.99-dev-1b20322b/linux-amd64/go1.18.1
[INFO] [08-08|03:50:23.167] [Snapshots] Fetching torrent files metadata
[INFO] [08-08|03:50:23.173] [Snapshots] Stat blocks=15209k indices=15209k alloc=2.6GB sys=2.8GB
[INFO] [08-08|03:50:23.173] [1/16 Headers] Waiting for headers... from=15299297
[INFO] [08-08|03:50:26.344] Generating ethash verification cache epoch=509 percentage=91 elapsed=3.000s
[INFO] [08-08|03:50:26.651] [1/16 Headers] Processed highest inserted=15299301 age=22s
[INFO] [08-08|03:50:27.471] [6/16 Execution] Completed on block=15299301
[INFO] [08-08|03:50:28.550] [txpool] Started
[INFO] [08-08|03:50:29.220] Timings (slower than 50ms) Headers=3.487s Bodies=106ms Senders=54ms Execution=655ms HashState=316ms IntermediateHashes=597ms CallTraces=103ms AccountHistoryIndex=69ms StorageHistoryIndex=128ms LogIndex=161ms TxLookup=61ms Prune TxLookup=75ms Prune Senders=143ms
[INFO] [08-08|03:50:29.220] RPC Daemon notified of new headers from=15299297 to=15299301 header sending=11.702µs log sending=295ns
[INFO] [08-08|03:50:29.220] [1/16 Headers] Waiting for headers... from=15299301
[INFO] [08-08|03:50:29.618] Generating ethash verification cache epoch=510 percentage=75 elapsed=3.000s
[INFO] [08-08|03:50:49.221] [1/16 Headers] Wrote block headers number=15299301 blk/second=0.000 alloc=2.9GB sys=3.1GB
[INFO] [08-08|03:50:52.599] [1/16 Headers] Processed highest inserted=15299302 age=29s
[INFO] [08-08|03:50:52.900] [6/16 Execution] Completed on block=15299302
[INFO] [08-08|03:50:53.454] Timings (slower than 50ms) Headers=23.378s Bodies=74ms Execution=182ms HashState=83ms IntermediateHashes=176ms Prune Senders=145ms
[INFO] [08-08|03:50:53.454] Tables PlainState=71.2GB AccountChangeSet=1.6GB StorageChangeSet=2.7GB BlockTransaction=24.0GB TransactionLog=6.5GB FreeList=17.6MB ReclaimableSpace=17.6GB
[INFO] [08-08|03:50:53.566] Commit cycle in=112.282449ms
[INFO] [08-08|03:50:53.566] RPC Daemon notified of new headers from=15299301 to=15299302 header sending=15.242µs log sending=444ns
[INFO] [08-08|03:50:53.566] [1/16 Headers] Waiting for headers... from=15299302
[INFO] [08-08|03:51:03.116] [1/16 Headers] Processed highest inserted=15299303 age=11s
[INFO] [08-08|03:51:03.308] [6/16 Execution] Completed on block=15299303
[INFO] [08-08|03:51:03.718] Timings (slower than 50ms) Headers=9.55s Bodies=72ms Execution=91ms IntermediateHashes=101ms Prune Senders=147ms
[INFO] [08-08|03:51:03.718] Tables PlainState=71.2GB AccountChangeSet=1.6GB StorageChangeSet=2.7GB BlockTransaction=23.9GB TransactionLog=6.5GB FreeList=17.6MB ReclaimableSpace=17.6GB
[INFO] [08-08|03:51:03.807] Commit cycle in=89.008683ms
[INFO] [08-08|03:51:03.807] RPC Daemon notified of new headers from=15299302 to=15299303 header sending=15.723µs log sending=397ns
[INFO] [08-08|03:51:03.807] [1/16 Headers] Waiting for headers... from=15299303
[WARN] [08-08|03:51:10.645] Served method=eth_newFilter reqid=18 t=32.775µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:12.592] Served method=eth_newFilter reqid=33 t=22.916µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:15.308] Served method=eth_newFilter reqid=48 t=22.813µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:17.081] Served method=eth_newFilter reqid=63 t=24.345µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:19.310] Served method=eth_newFilter reqid=78 t=24.449µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:21.081] Served method=eth_newFilter reqid=93 t=23.601µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:22.648] Served method=eth_newFilter reqid=108 t=23.233µs err="the method eth_newFilter does not exist/is not available"
[INFO] [08-08|03:51:23.155] [txpool] stat block=15299303 pending=345 baseFee=29998 queued=27234 alloc=3.0GB sys=3.2GB
[INFO] [08-08|03:51:23.808] [1/16 Headers] Wrote block headers number=15299303 blk/second=0.000 alloc=3.0GB sys=3.2GB
[WARN] [08-08|03:51:24.220] Served method=eth_newFilter reqid=123 t=22.775µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:26.467] Served method=eth_newFilter reqid=138 t=22.748µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:28.250] Served method=eth_newFilter reqid=153 t=23.032µs err="the method eth_newFilter does not exist/is not available"
[WARN] [08-08|03:51:31.296] Served method=eth_newFilter reqid=168 t=31.452µs err="the method eth_newFilter does not exist/is not available"
@MysticRyuujin if we set the eth_newFilter to config file which can be work by --rpc.accessList, we also need to specify ALL individual methods in the rules.json file. it is seems not friendly as we need support all the rpc methods.
I completely agree. I'm not a maintainer and it was not my decision to require the ACL. However, the complete list of supported methods is in the rpcdaemon README. Copy, paste.
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.
This issue was closed because it has been stalled for 7 days with no activity.