Go-ethereum: The eth.coinbase throws unexpected error

Created on 5 May 2017  路  9Comments  路  Source: ethereum/go-ethereum

System information

Geth __host*__ installed by AKASHA into ~/Library/Application Support/AKASHA/geth:
Geth version: 1.5.9-stable
Commit hash : a07539fb88db7231d18db918ed7a6a4e32f97450
Go Version: go1.7.4

Geth __client*__ installed by brew:
Geth version: 1.6.1-stable
Commit hash : 021c3c281629baf2eae967dc2f0a7532ddfdc1fb
Go Version: go1.8.1

OS & Version: macOS 10.12.4 (16E195)

Expected behaviour

Print something like:
"{ERROR_CODE} coinbase is not set" or
"{ERROR_CODE} coinbase isn't created" or
"{ERROR_CODE} coinbase address must be explicitly specified".

Actual behaviour

Error: etherbase address must be explicitly specified
    at web3.js:3104:20
    at web3.js:6191:15
    at get (web3.js:6091:38)
    at <unknown>

There:

  1. etherbase != coinbase
  2. Stacktrace are really needed there?

Steps to reproduce the behaviour

  1. Execute AKASHA.app
  2. Execute in console: geth attach ipc:/Users/whoami/Library/Ethereum/akasha-alpha/geth.ipc
  3. type eth.coinbase and press RETURN
  4. get the error

Addition info

AKASHA with geth was in the sync state

screen shot 2017-05-05 at 21 19 14

triage

Most helpful comment

I got this same error when trying to eth.coinbase using the --light mode
If I use Full mode or Fast mode works fine

All 9 comments

I believe @zelig made 2 years ago an effort to rename coinbase to etherbase but I think it never made it into the official RPC standard. Internally geth uses etherbase. I don't think this is really a big deal since error messages aren't standarised. If you really want to change this you can make a PR. It should be really simple.

error messages aren't standarised

That is problem.

I am having the same issue! Whats the solution for this? Why is there an error when I try: eth.coinbase?

To be clear, this is the error that I am getting:

> web3.eth.coinbase
Error: not supported
    at web3.js:3104:20
    at web3.js:6191:15
    at get (web3.js:6091:38)
    at <unknown>

I got this same error when trying to eth.coinbase using the --light mode
If I use Full mode or Fast mode works fine

@pctripsesp Thanks! This fixed it for me

Please can you be more specific? I'm dealing with same error here.

instance: Geth/v1.8.3-stable-329ac18e/windows-amd64/go1.10
modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

personal.unlockAccount(eth.coinbase)
Error: etherbase must be explicitly specified
at web3.js:3143:20
at web3.js:6347:15
at get (web3.js:6247:38)
at

I am also experiencing 'not supported' in light mode:

Ryan:~ ryan$ ethconsole
ETHEREUM CONSOLE
Connecting to node at /Users/ryanghods/Library/Ethereum/geth.ipc ...
Connection successful!

螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢
Network: RINKEBY
Current block: 2248668 (May 8th 2018, 10:21:19)
螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢螢

> web3.eth.getCoinbase(console.log)
Error: Returned error: not supported
    at Object.ErrorResponse (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-core-helpers/src/errors.js:29:16)
    at Object.<anonymous> (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-core-requestmanager/src/index.js:140:36)
    at callback (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-providers-ipc/src/index.js:65:40)
    at Array.forEach (<anonymous>)
    at Socket.<anonymous> (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-providers-ipc/src/index.js:76:51)
    at Socket.emit (events.js:159:13)
    at addChunk (_stream_readable.js:265:12)
    at readableAddChunk (_stream_readable.js:252:11)
    at Socket.Readable.push (_stream_readable.js:209:10)
    at Pipe.onread (net.js:598:20)
Error: Returned error: not supported
    at Object.ErrorResponse (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-core-helpers/src/errors.js:29:16)
    at Object.<anonymous> (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-core-requestmanager/src/index.js:140:36)
    at callback (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-providers-ipc/src/index.js:65:40)
    at Array.forEach (<anonymous>)
    at Socket.<anonymous> (/Users/ryanghods/.nvm/versions/node/v9.2.1/lib/node_modules/ethereum-console/node_modules/web3-providers-ipc/src/index.js:76:51)
    at Socket.emit (events.js:159:13)
    at addChunk (_stream_readable.js:265:12)
    at readableAddChunk (_stream_readable.js:252:11)
    at Socket.Readable.push (_stream_readable.js:209:10)
    at Pipe.onread (net.js:598:20)

https://github.com/ethereum/go-ethereum/blob/master/les/backend.go#L201

// Etherbase is the address that mining rewards will be send to
func (s *LightDummyAPI) Etherbase() (common.Address, error) {
    return common.Address{}, fmt.Errorf("not supported")
}

// Coinbase is the address that mining rewards will be send to (alias for Etherbase)
func (s *LightDummyAPI) Coinbase() (common.Address, error) {
    return common.Address{}, fmt.Errorf("not supported")
}

It's obviously intentional. What should, or should not happen here? I'm a bit lost. The LES does not have a coinbase.. ?

The coinbase and etherbase is meant for mining rewards, but light client does not mine.
However, geth has historically alias:ed coinbase/etherbase as the first account from eth.accounts, which has led to this user expectation that it should be so.
I'd argue that that aliasing is wrong, and leads user to misuse coinbase. A better mode of operation is to use eth.accounts, particularly since coinbase/etherbase won't be supported in clef.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VenusHu picture VenusHu  路  3Comments

ysqi picture ysqi  路  3Comments

aakilfernandes picture aakilfernandes  路  3Comments

phpsamsb picture phpsamsb  路  3Comments

VoR0220 picture VoR0220  路  3Comments