How address and wallet work in Ethereum

Note

For a comprehensive coverage of blockchain development in Ethereum or mastering Solidity programming, taking our below self paced courses is highly recommended:

 

Recap

In our previous article (How Ethereum Virtual Machine works), we discussed how Ethereum Virtual Machine works.

In this article, we learn how Ethereum address and wallet work.

 

Address and wallet

Earlier, we introduced Ethereum accounts, transactions, and smart contracts. They are all linked to an address, which refers to the owners of both types of accounts or the senders of messages and transactions. Like Bitcoin, Ethereum has the concept of the Ethereum wallet too. It is a tool that allows you to easily share your public keys and securely keep private keys. In this article, we will discuss the details about the Ethereum address and wallet. We will also provide a brief introduction to different wallet tools.

 

One-to-One Live Blockchain Classes

Coding Bootcamps school offers One-to-One Live Blockchain Classes for Beginners.

 

Addresses in Ethereum

As we discussed earlier, an EOA has a pair of public and private keys. The private key is used to digitally sign any transactions. The public key is used to generate the account address, which is linked to account state in the world state.

To generate an Ethereum address, take the Keccak-256 hash of the public key. The rightmost 20 bytes of the hash, with a prefix of 0x as the hexadecimal identifier, is your Ethereum address.
The CA has an account address too. Traditionally, it is generated based on the sender’s public key and the transaction nonce. A newer address creation schema based on EIP 1014,
Skinny CREATE2, was implemented as part of the system-wide upgrade release of Constantinople. It allows the developer to create an address for future smart contract deployment. Interested readers can check out the EIP link at https://eips.ethereum.org/ EIPS/eip-1014. Once the transaction is processed, the CA will be linked to the account address in the world state.

Ethereum wallet

Before you can trade ether, you need a place to store it. Ether, just like every other cryptocurrency, doesn’t exist in any tangible shape or form. All that exists are records on the Ethereum blockchain. In the same way as Bitcoin, the Ethereum wallet allows you to interact with the blockchain to enable cryptocurrency transactions.
An Ethereum wallet stores the public and private keys, where the private key is used for paying or spending ethers and the public key for receiving ethers. A wallet can contain multiple public and private key pairs. An Ethereum address, derived from public keys, is used as the public address for you to receive the ethers. However, every piece of cryptocurrency has a private key. You will need the private keys from your wallet to unlock the funds to spend the coins.

Wallet tools

There are many wallet implementations to choose from. You may have to decide for yourself which wallet is best for you. You have options to choose between hot and cold wallets; in other words, online and offline wallets. Or you can choose between hardware, software, or even paper wallets. There are a lot of mobile wallets available too.
For Ethereum, you may want to choose an ERC-20 compatible wallet. ERC-20 is an Ethereum token standard that defines standards, smart contract interfaces, and rules for issuing crypto-tokens on the Ethereum network. The following are a few known to be compatible with ERC-20 token standards:

  • MyEtherWallet (https://www.myetherwallet.com/)
  • MetaMask (https://metamask.io/)
  • Mist (https://github.com/ethereum/mist/releases)
  • Parity (https://ethcore.io/parity.html)

 

Next Article

In our next article (How mining works in Ethereum), we discuss mining in Ethereum.

This article is written in collaboration with Brian Wu who is a leading author of “Learn Ethereum: Build your own decentralized applications with Ethereum and smart contracts” book. He has written 7 books on blockchain development.

 

Resources

coming soon