3

I created an Ethereum node (geth) and this automatically created an Ethereum account. Is this account an Ethereum wallet? I then created 2 other accounts using personal.newAccount() command. Are these accounts or wallets?

Thank you

3 Answers 3

1

Terminology is not strict enough, but in geth word account is used for so called externally owned accounts, i.e. Ethereum addresses derived from public keys (address is basically last 20 bytes from keccak256 hash of 64-byte uncompressed public key). Such address may be a transaction origin, i.e. Ethereum transactions may be published from such addresses, signed by a private key that corresponds to a public key the address was derived from.

In contrast, word wallet is often used for smart contract that is able to execute arbitrary Ethereum transactions when told to do so by wallet's owner. Here owner is another Ethereum address that is eligible to issue orders to the wallet. Usually, wallet allows its owner to transfer ownership to another address, which allows owner of the wallet to change private key without changing wallet's address and without transferring any assets.

Both, accounts and wallets may receive, store, and send Ether and tokens. Both may control smart contracts.

Account is controlled by private key, and there is no way to change private key (e.g. when suspected to be compromised) without changing address and transferring all the assets from old address to the new one. New accounts may be created for free. Account may be used to deploy smart contracts.

Wallet is controlled by another Ethereum address, that could be account, another wallet, or arbitrary smart contract. It is possible to change controlling address without changing wallet's address. Wallets creation requires some fee to be paid. While it is possible to design wallet smart contract that is able to deploy new smart contracts, common implementation usually does not have such feature.

5
  • create a wallet from ethclient is a cold wallet? github.com/miguelmota/ethereum-development-with-go-book/blob/… i see it doesn't need to connect to network to create it.
    – TomSawyer
    Commented Jun 12, 2019 at 19:01
  • Terminology is not strict, as i said. They use term "wallet" for externally owned account. From Ethereum Development Tutorial: externally owned account (EOAs): an account controlled by a private key, and if you own the private key associated with the EOA you have the ability to send ether and messages from it. Commented Jun 12, 2019 at 20:36
  • so do you mean using geth account new vs above way is the same? But i don't understand if it can be called wallet, so what's keystore created from this goethereumbook.org/en/keystore ? A keystore is a file containing an encrypted wallet private key. , so technically a keystore is a wallet with encrypted private key? I see the command geth account new, it generated keystore and store them in the data dir, are they the same?
    – TomSawyer
    Commented Jun 12, 2019 at 20:44
  • I'm not sure what "same" means for you, but get account new does not require network connection, if this is what you are asking for. Commented Jun 13, 2019 at 10:15
  • Quick question: if a wallet is a smart contract, does the user deploy the contract and, if so, at which point does it get deployed? when you create an account, you're given a private key and a public key pair, but nowhere in that process requires deploying a smart contract nor is the user given the address of the smart contract. I've also seen the distinction between an account and a wallet in the web3.js API as well, but the library doesn't seem to deploy a new smart contract when creating a wallet either.
    – Kevvv
    Commented Jan 12, 2022 at 22:46
0

There are two types of Ethereum accounts:

  1. An externally-owned account
  2. A smart-contract account

The 1st type is used only for transferring Ether to and from.

The 2nd type is used also in order to implement desired functionality.

What you refer to as wallet is most likely the 1st type, which means that in your question, the terms wallet and account are equivalent.

A few more details:

In both types, the address of an account is a hexadecimal string of 40 characters.

However, in opposed to externally-owned accounts, a smart-contract account doesn’t have a known private key when created, because the address of an externally-owned account is generated from its private key, while the address of a smart-contract is generated by hashing the address of the account used for deploying it.

In order to allow transferring Ether to a smart-contract account, the author of this smart-contract must implement function() external payable (aka the fallback function).

In order to allow transferring Ether from a smart-contract account, the author of this smart-contract must implement a function which does it (in opposed to an externally-owned account, where you "only" need the private key).

4
  • Which is the best way for mini exchage? Create EOA or a smart contract ? Commented Mar 17, 2019 at 13:39
  • @AvtandilKavrelishvili: What is "mini exchange"??? Commented Mar 17, 2019 at 14:03
  • mini exchange is exchange with only 2 coin and exchange's small functionality Commented Mar 18, 2019 at 19:23
  • @AvtandilKavrelishvili did you find your question?
    – Sajad
    Commented Sep 9, 2021 at 15:15
0

To put it simple:

In order to interact with ethereum network (blockchain) you need an account. This is an externally-owned account as @goodvibration explained. That account consists of public and private key-pair. Your ethereum address is basically part of your public key and you use your private key to sign transactions in order for them to be executed on chain.

The wallet is more of a way you store your key-pair(s). You can keep your key-pair on some server (commonly referred as hot wallet), on your PC (just what you did when you created account via geth) that is cold wallet, then you can keep it on piece of paper, carved in the wood...you also have something called HD wallet...and it goes on. Some wallets just keep your key-pairs while some other provide features like signing transaction, exchange...etc.

So in your case geth acts as, sort of, a wallet.

Hope I hit the point of your dilemma :)

2
  • which one can be created remotely on eth node? i see geth account new can be executed locally.
    – TomSawyer
    Commented Jun 12, 2019 at 14:19
  • Not sure what you meant by "which one"...but, if I got it right, the account created by local/remote node can be referred as cold wallet account, since you are in possession and control of it. But if you create the account on local/remote node to be used by user of your dapp, it will be hot wallet account from his point of view since you are in control of it and not the user himself. Hot/cold wallet is not a technical matter, account is account, it just a matter of who is in control of it Commented Jun 13, 2019 at 15:18

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.