Skip to content

Commit

Permalink
Merge pull request #673 from oboukli/intro-revision
Browse files Browse the repository at this point in the history
Intro revision
  • Loading branch information
aantonop committed Jul 22, 2018
2 parents 5fbf204 + 0063e7c commit db25e09
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions intro.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@
[[control_responsibility]]
=== Control and responsibility

Open blockchains like Ethereum are important because they operate as a _decentralized_ system. That means lots of things, but one crucial aspect is that each user of Ethereum can (and should!) control their own private keys, which are the things that control access to funds and smart contracts. We sometimes call the combination of access to funds and smart contracts an "account" or "wallet". These terms can get quite complex in their functionality, so we will go into this in more detail later. As a fundamental principle, however, it is as easy as one private key equals one "account". Some users choose to give up control over their private keys by using a third party custodian, such as an online exchange. In this book, we will teach you how to take control and manage your own private keys.
Open blockchains like Ethereum are important because they operate as a _decentralized_ system. That means lots of things, but one crucial aspect is that each user of Ethereum can—and should—control their own private keys, which are the things that control access to funds and smart contracts. We sometimes call the combination of access to funds and smart contracts an "account" or "wallet". These terms can get quite complex in their functionality, so we will go into this in more detail later. As a fundamental principle, however, it is as easy as one private key equals one "account". Some users choose to give up control over their private keys by using a third party custodian, such as an online exchange. In this book, we will teach you how to take control and manage your own private keys.

With control comes a big responsibility. If you lose your private keys, you lose access to funds and contracts. No one can help you regain access - your funds will be locked forever. Here are a few tips to help you manage this responsibility:
With control comes a big responsibility. If you lose your private keys, you lose access to funds and contracts. No one can help you regain access—your funds will be locked forever. Here are a few tips to help you manage this responsibility:

* Don't improvise security. Use tried-and-tested standard approaches.
* Do not improvise security. Use tried-and-tested standard approaches.

* The more important the account (e.g. the higher the value of the funds controlled, or the more significant the smart contracts accessible), the higher security measures should be taken.

* The highest security is gained from an air-gapped device, but this level is not required for every account.

* Never store your private key in plain form, especially digitally. Fortunately, most user interfaces today won't even let you see the raw private key!
* Never store your private key in plain form, especially digitally. Fortunately, most user interfaces today won't even let you see the raw private key.

* Private keys can be stored in an encrypted form, as a digital "keystore" file. Being encrypted, they need a password to unlock. When you are prompted to choose a password, make it strong (i.e. long!), back it up and don't share it. If you don't have a password manager, write it down and store it in a safe and secret place. To access your account, you need both the "keystore" file and the password.
* Private keys can be stored in an encrypted form, as a digital "keystore" file. Being encrypted, they need a password to unlock. When you are prompted to choose a password, make it strong (i.e. long and random), back it up and don't share it. If you don't have a password manager, write it down and store it in a safe and secret place. To access your account, you need both the "keystore" file and the password.

* Do not store any passwords in digital documents, digital photos, screenshots, online drives, encrypted PDFs, etc. Don't improvise security. Use a password manager or pen and paper.
* Do not store any passwords in digital documents, digital photos, screenshots, online drives, encrypted PDFs, etc. Again, do not improvise security. Use a password manager or pen and paper.

* When you are prompted to back up a key as a mnemonic word sequence, use pen and paper to make a physical backup. Do not leave that task for "later"; you will forget. These can be used to rebuild your private key in case you lose all data saved on your system, or if you forget or lose your password. However, they can also be used by attackers to get your private keys, and so never store them digitally, and keep the physical copy stored very securely in a locked drawer or safe.
* When you are prompted to back up a key as a mnemonic word sequence, use pen and paper to make a physical backup. Do not leave that task for "later"; you will forget. These can be used to rebuild your private key in case you lose all data saved on your system, or if you forget or lose your password. However, they can also be used by attackers to get your private keys, and so never store them digitally, and keep the physical copy stored securely in a locked drawer or safe.

* Before transferring any large amounts (especially to new addresses), first do a small test transaction (e.g. less than $1 value) and wait for confirmation of receipt.

* When you create a new account, start by sending only a small test transaction to the new address. Once you receive the test transaction, try sending back again from that account. There are lots of reasons account creation can go wrong, and if it has gone wrong, it is better to find out with a small loss. If sending the test back works, all is well.

* "Block Explorers" are an easy way to independently see whether a transaction has been accepted by the network.
* Public block explorers are an easy way to independently see whether a transaction has been accepted by the network. However, this convenience has a negative impact on your privacy, because you reveal your addresses to block explorers, which can track you.

* Do not send money to any of the addresses shown in this book. The private keys are listed in the book and someone will immediately take that money.

[[ether_units]]
=== Ether currency units

Ethereum's currency unit is called _ether_, identified also as "ETH" or with the symbols Ξ (from the Greek letter "Xi" that looks like a stylized capital E) or (less often) ♦, for example, 1 ether, or 1 ETH, or Ξ1, or ♦1
Ethereum's currency unit is called _ether_, identified also as "ETH" or with the symbols Ξ (from the Greek letter "Xi" that looks like a stylized capital E) or, less often, ♦, for example, 1 ether, or 1 ETH, or Ξ1, or ♦1.

[TIP]
====
Expand Down Expand Up @@ -142,7 +142,7 @@ image::images/metamask_account.png["MetaMask Account Page"]

Your account page shows the name of your account ("Account 1" by default), an Ethereum address (0x9E713... in the example) and a colorful icon to help you visually distinguish this account from other accounts. At the top of the account page, you can see which Ethereum network you are currently working on ("Main Network" in the example).

Congratulations! You have set up your first Ethereum wallet!
Congratulations! You have set up your first Ethereum wallet.

[[switching_networks]]
=== Switching networks
Expand Down Expand Up @@ -223,7 +223,7 @@ The answer is because of the cost of _gas_. Every Ethereum transaction requires
Fees are required on the test networks too. Without fees, a test network would behave differently from the main network, making it an inadequate testing platform. Fees also protect the test networks from denial of service attacks and poorly constructed contracts (e.g. infinite loops), much like they protect the main network.
====

When you sent the transaction, Metamask calculated the average gas price of recent successful transactions at 3 GWEI, which stands for 3 gigawei. Wei is the smallest subdivision of the ether currency, as we discussed in <<ether_units>>. The gas cost of sending a basic transaction is 21000 gas units. Therefore, the maximum amount of ETH you spend is 3 * 21000 GWEI = 63000 GWEI = 0.000063 ETH. Be advised that average gas prices can fluctuate as they are predominantly determined by miners. We will see in a later chapter how you can increase/decrease your gas limit to ensure your transaction takes precedence if need be.
When you sent the transaction, MetaMask calculated the average gas price of recent successful transactions at 3 GWEI, which stands for 3 gigawei. Wei is the smallest subdivision of the ether currency, as we discussed in <<ether_units>>. The gas cost of sending a basic transaction is 21000 gas units. Therefore, the maximum amount of ETH you spend is 3 * 21000 GWEI = 63000 GWEI = 0.000063 ETH. Be advised that average gas prices can fluctuate as they are predominantly determined by miners. We will see in a later chapter how you can increase/decrease your gas limit to ensure your transaction takes precedence if need be.

All this to say: to make a 1 ETH transaction costs 1.000063 ETH. MetaMask confusingly rounds that _down_ to 1 ETH when showing the total, but the actual amount you need is 1.000063 ETH and you only have 1 ETH. Click "Reject" to cancel this transaction.

Expand Down

0 comments on commit db25e09

Please sign in to comment.