Open 0xVegtam opened 3 years ago
Are you shutting the node down and bringing it back up between launches?
This error is usually caused by a node’s RPC engine not being up yet. It only occurs (I think; I’llI dig into the code) when the first call to eth_chainId does not return a meaningful value.
between launches, no. The node is running on a remote server and is running (seemingly) fine and untouched throughout any issues/regardless of what is done on the local machine.
but in my mind that sounds like that wouldn't be an issue if the node is up and running already right?
Can you think of a reason why that would happen after some time of execution with no problem? I would expect the eth_chainnId
call to fail at the start before the script starts receiving mempool objects since the node potentially would still be starting up.
Regardless though, is it possible to avoid that call by hardcoding the chainID? Could be worth trying
Hey Guys, Do we have an update on this issue, As We do not have EIP1559 gas data fetched from web3. We were planning to switch to ethersjs. As etherjs does have this functionality.
When I changed it to ethers using the WebSocketProvider
, It does not support tunneling and I faced the same above mentioned issue , I wanted to pass the tunneling agent as below in web3 but ethers Networkish
object does not have many properties,
Let me know if you working on this or any new update on this.
Web3.providers.WebsocketProvider(URL, {
requestOptions: {
agent: httpsOverHttp({
proxy: {
host: HOSTNAME,
port: PORT,
},
}),
},
});
Describe the bug
I am trying to use a WebSocketProvider to connect to a personal geth node and stream pending transactions from the mempool to print on the console. I am doing this to setup some boilerplate stuff prior to beginning a new project. I have found that intermittently when running I will get "noNetwork" events raised by ethers which cause the program to crash despite the running computer never losing internet connectivity and the geth node being up and available the entire time. Running the script multiple times results in receiving the noNetwork event randomly, sometimes almost immediately others after several minutes of running. From what I can tell, the running machine never loses internet connectivity and I am able to use the internet and connect to my geth node and verify that it is properly synced and exposed so I am confident that I am not being rate limited.
Reproduction steps I am using this code snippet to elicit the error:
Error message/noNetwork event that I get looks like this:
Environment:
I am running my own geth node (1.10.5) on AWS - ports properly exposed, node synced and is usable.
Script running on OSX 11.3 M1 mac
Using these packages: