2

I'm trying to start geth node to perform queries about blockchain state.

The command that worked for me year ago as follows:

geth --rpc --rpcapi="db,eth,net,web3,personal,web3" --rpcaddr "localhost" --rpcport "8545"

However geth node refuses to init one of namespaces like this:

ERROR[08-15|15:50:04.923] Unavailable modules in HTTP API list     unavailable=[db] available="[admin debug web3 eth txpool personal ethash miner net]"

I'd be ok without it, however this doc clearly says that db namespace is needed to make use of getBalance which is essential part of targeted thing.

My geth version is 1.9.19-stable-3e064192 & windows if that matters.

What should I try further to get this going or maybe db namespace is no longer required for balance queries?

2 Answers 2

1

If with the js console, you should use eth.getBalance(...).

If with a rpc request, you should use this body

{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_getBalance",
    "params":["..."]
}
0

[https://github.com/ethereum/go-ethereum/issues/20773#issuecomment-619764495][1]

I come across the similer problem. I found a suggestion, you may check out form the link above,but I have not try it out

appoint command --rpcapi="web3,eth,net,db,personal"

my problem as below

ERROR[03-29|08:41:48.709] Unavailable modules in HTTP API list unavailable="[db network]" available="[admin debug web3 eth txpool personal ethash miner net]"

in which it said that the network is also a unavailable module

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 29, 2022 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.