-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Getting error method net_version does not exist/is not available
calling NetworkID via geth
#29770
Comments
That method in ethclient should be dropped (cc @fjl ), we don't expose the network id any more to the outside. |
@karalabe I have two follow-up questions here:
|
|
|
I stand corrected. It was eth_version that was dropped. |
@nidhi-singh02 please provide |
@
Thanks for the clarification. I have embedded this Client struct into my code go-ethereum/ethclient/ethclient.go Line 35 in d2f00cb
When I call |
@holiman geth version is |
Wait, please demonstrate what you mean by this |
I have my nodes running locally, when I run the This is the curl I am referring to |
System information
Geth version:
geth version
- 1.14.3CL client & version: e.g. lighthouse/nimbus/prysm@v1.0.0
OS & Version: Windows/Linux/OSX
Commit hash : (if
develop
)Expected behaviour
The method should return me the Network ID.
Actual behaviour
I am getting error
method net_version does not exist/is not available
I have checked the nodes,
http-api net,eth
is enabled. If I try to run the curl command on the RPC endpoint of the node, it works fine.config toml of my node has
HTTPModules = ["admin", "engine", "net", "web3", "eth", "debug", "txpool"]
Steps to reproduce the behaviour
Through code, try to invoke NetworkID referred here -
go-ethereum/ethclient/ethclient.go
Line 356 in 6154f87
Backtrace
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: