1

I want to use RPCs to access a Geth node. Do I have to execute admin.StartRPC on the node in order to activate the RPC server?

1

Instead of admin.startRPC(addr, port), when you start your node (if you are using geth) you can use the rpc flag

geth --rpc - this defaults to localhost:8545

You can also define your own address and port number with these options:

geth --rpc --rpcaddr <ip> --rpcport <portnumber>

geth --rpc --rpccorsdomain "http://localhost:3000"

Documentation

| improve this answer | |
0

I use something like this: geth --rpcapi eth,net,web3 --rpccorsdomain * --rpc --rpcaddr 0.0.0.0

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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