[Node Operator Question] RPC network error #195
Replies: 2 comments 4 replies
-
If I'm not mistaken, "optimism_syncStatus" is a request sent to the op-node. Please confirm if your op-geth's port is also 8647. Please try 8646/8645 |
Beta Was this translation helpful? Give feedback.
-
Yeah @opfocus is right here, the Now in your JS code, you're calling |
Beta Was this translation helpful? Give feedback.
-
Are you running the most up to date node software?
Did you check the documentation?
Did you check for duplicate questions?
Issue Description
Hello, i used the guide on the documentation and installed Node from source. Everything went well, i can see that the logs are very similar to the logs that i must see on the Synchronization section of the guide. When i am calling:
curl -X POST -H "Content-Type: application/json" --data
'{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}'
http://localhost:8647
on my terminal, i am getting a response. But when i am calling this code from my js file:
const provider1 = new ethers.providers.JsonRpcProvider("http://localhost:8647")
console.log(await provider1.getBalance("address"))
i am getting "Could not detect network".
When i am running the following code:
const provider1 = new ethers.providers.JsonRpcProvider("http://localhost:8647" , 'op-mainnet')
console.log(await provider1.getBalance("address"))
i am getting "Invalid network error"
Also, websocket on port 8646 is not working either.
I am running Stereum on the same machine for Ethereum mainnet.
Is this error possible because op-node hasn't been 100% synced?
What else i need to search in order to know that RPC is working or is not working correctly (any commands i can run or something).
So far i have tried to change port numbers, allow all local network ports from ufw. I have run the same command using QuickNode RPC and it worked without any issue.
I am using EtherJs V5.
My goal is to use my local RPC instead of online node providers.
Thank you very much for your time.
Protocol Description
op-geth v1.101305.0
op-node v1.4.2
network: op-mainnet
Node Logs
No response
Additional Information
My config for op-geth:
My config for op-node:
--l1= QuickNode API
--l1.rpckind=quicknode
--l2=ws://localhost:8551
--l2.jwt-secret=./jwt.txt
--network=op-mainnet
--rpc.addr=localhost
--rpc.port=8647
--metrics.enabled
Feedback
No response
Beta Was this translation helpful? Give feedback.
All reactions