4

what I did:

Created account (address1) on pc1 and another account (address2) on pc2.

I have a wallet for ether on coinbase.com (address3).

I have another wallet jaxx on pc (address4).

On pc1 and pc2 I started geth --etherbase "0xaccount1"

I mined and got ether on pc2. pc1 has 0 ether

Now I want to send the ether to coinbase.com.

I tried on pc2:

eth.sendTransaction({from:"0xaddress1", to:"0xaddress2", value: web3.toWei(0.05023575, "ether")})
-> Error unknown account

eth.sendTransaction({from:"0xaddress1", to:"0xaddress3", value: web3.toWei(0.05023575, "ether")})
-> Error unknown account

eth.sendTransaction({from:"0xaddress1", to:"0xaddress4", value: web3.toWei(0.05023575, "ether")})
-> Error unknown acco unt

What should I do? Can I create a new account with address1 and how?

Victory
  • 1,231
  • 1
  • 8
  • 21
Water Devil
  • 43
  • 1
  • 3

3 Answers3

0

In the go-ethereum source code, this error gets thrown for the following reason:

 // Find attempts to locate the wallet corresponding to a specific 
//account. Since accounts can be dynamically added to and removed from 
//wallets, this method has a linear runtime in the number of wallets.
        func (am *Manager) Find(account Account) (Wallet, error) {
            am.lock.RLock()
            defer am.lock.RUnlock()

            for _, wallet := range am.wallets {
                if wallet.Contains(account) {
                    return wallet, nil
                }
            }
            return nil, ErrUnknownAccount
        }

More specifically,

// ErrUnknownAccount is returned for any requested operation for which no backend
// provides the specified account.
var ErrUnknownAccount = errors.New("unknown account")

Please make sure that the accounts you are referencing on the different PC's actually reside in the PC's memory. i.e. pc2 can not send funds from an account made on pc1 without importing the accounts private key.

Malone
  • 1,590
  • 12
  • 23
0

thanks, this seems good.

But how can I import the key. In all instructions there is absolutely nothing about exporting - see https://github.com/ethereum/go-ethereum/wiki/Manage-your-accounts-(geth--=1.7). I've tried to copy the private key file from PC1:/$HOME/.ethereum/keystore/UTC--2017-10-16T11-44-26.489099864Z--ethaddress to PC2:/$HOME/.ethereum/keystore/, exited geth console and started geth.

I tried at PC2:

geth account import PC2:/$HOME/.ethereum/keystore//UTC--2017-10-16T11-44-26.489099864Z--ethaddress. Fatal: Failed to load the private key: encoding/hex: invalid byte: U+007B '{'

And "Error unknown account" resides...

eth.accounts lists only one address.

Water Devil
  • 43
  • 1
  • 3
  • The private key file needs to be a plain text containing only the private key, the file under "keystone" is encrypted and can't be directly used. See this question https://ethereum.stackexchange.com/questions/465/how-to-import-a-plain-private-key-into-geth-or-mist – Linmao Song Nov 13 '17 at 10:34
0

I had to set correct permissions after copying the key file. Then it was working.

Water Devil
  • 43
  • 1
  • 3