0

I'm facing a strange issue, when I execute eth.coinbase command on Geth, it gives me wallet address which is not present in the key directory.

enter image description here

But that isn't in the genesis file

enter image description here

I'm not sure how this has been updated. Can coinbase update from web3js?

Version: 1.9.14-stable
Go Version: go1.14.2
Operating System: linux
1

The coinbase (also known as etherbase) can be configured from commmandline (--miner.etherbase) or from api call miner.setEtherbase().

In a PoW blockchain it doesn't have to be an existing account, it can be any address.

| improve this answer | |
  • I had idea of miner.setEtherbase() but not sure how the coinbase had been updated. Before it was 864093bb38b39bd718c6be71367e2d3873a81f7e – Div May 28 at 15:54
  • @Div If you have the RPC port open and miner api enabled then someone might have changed it. – Ismael May 28 at 18:40
  • Okay, is there any method in web3 js from which anyone can change coinbase? – Div Jun 2 at 5:43
  • 1
    @Div If you have RPC access you can call miner_setEtherbase without web3js. – Ismael Jun 2 at 17:16

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.