Mastering Ethereum, by Andreas M. Antonopoulos, Gavin Wood

Mastering Ethereum

Mastering Ethereum Cover

Mastering Ethereum is a book for developers, offering a guide to the operation and use of the Ethereum, Ethereum Classic, RootStock (RSK) and other compatible EVM-based open blockchains.

Reading this book

To read this book, see book.asciidoc. Click on each of the chapters to read in your browser. Other parties may choose to release PDFs of the book online.

Chapters

Content

The content status is "COMPLETE". The first edition of this book was published on December 1st, 2018. That edition is available in print and ebook format at many popular bookstores. It is tagged "first_edition_first_print" in the develop branch of this repository.

At this time, only bug fix requests are accepted. If you find a bug, start an issue or better yet, fix the problem with a pull request. We will start work on the second edition in late 2019.

Source and license

The first edition of this book, as printed and sold by O'Reilly Media, is available in this repository.

Mastering Ethereum is released under the Creative Commons CC-BY-SA license.

This "Free Culture" compliant license was approved by our publisher O'Reilly Media (http://oreilly.com), who understands the value of open source. O'Reilly Media is not just the world's best publisher of technical books, but is also a strong supporter of this open culture and the sharing of knowledge.

Creative Commons License
Mastering Ethereum by Andreas M. Antonopoulos, Gavin Wood is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at https://github.com/ethereumbook/ethereumbook.

Translate This Book!

If you are interested in translating this book, please join our team of volunteers at: https://www.transifex.com/aantonop/ethereumbook

Comments
  • Hiring a Github Editor to manage this repo

    Hiring a Github Editor to manage this repo

    I would like to get a second print or second edition of the book released by Q2/Q3'2020.

    Unfortunately, I cannot focus time on processing all the PRs and Issues to get it done. Many of the examples are out of date and don't compile or work properly. They all need to be updated. Many have already been "fixed" with PRs, but all need to be tested and improved.

    I am looking to hire a part-time editor, someone who is willing to put in 30-40 hours of work over the next 3 months to clear out all the outstanding issues, PRs and test all the examples in the book. At the end of it, we will release a new edition or print of the book. The Github editor will be given appropriate attribution in the preface.

    Please reply to this issue if you are interested and provide some supporting information as to why I should select you to do this. Also, please post your hourly rate in your reply. Payment will be made in USD, BTC or ETH. US Labor laws apply: I will need tax documentation and cannot hire people from sanctioned countries, but otherwise your location does not matter.

  • Add Auction Dapp

    Add Auction Dapp

    Auction Dapp covers:

    • Auction House contracts and ERC721 compliant Token/Deed Repository
    • Data storage on swarm
    • Whisper messaging
    • Frontend and web3 interactions with the smart contracts

    Demo: http://52.59.238.144/ Available on Ropsten Or Add Cuctom RPC in metamask and insert the following address:

    http://52.59.238.144:8545/
    

    Add these test accounts:

    address: 0xC1DF06368AFB95ABe7154978786213A99887aD2A
    privateKey: be97a9660105da2a4e2e631b067ac4e08cabdcb2bc85b061b7ffc51d2219162a
    
    address: 0xfFbeB6b8fc95D34535cb89c0b034595E87BE9a31
    privateKey: 31013408a0776fe01f2a3cd9306c1780f4188ed577083ecda5b9d27b480808fd
    

    Contributions and improvements are needed!

  • Architecture diagram showing browser, web3, JSON-RPC and client relationship

    Architecture diagram showing browser, web3, JSON-RPC and client relationship

    I think I need to create an architecture diagram that shows the relationship between a web-browser, a web3 .js instance (injected by MetaMask, for example, or provided by a web application), the web3 provider and the Ethereum blockchain. Clarify the role of web3 provider, full client, JSON-RPC client and web3 injector.

  • Complete glossary, by reviewing each chapter for term definitions that are not in the glossary: Easy task for new contributors

    Complete glossary, by reviewing each chapter for term definitions that are not in the glossary: Easy task for new contributors

    Go through each chapter. Anywere a term is defined, check to see if it is in the glossary. If not, copy the definition and edit it appropriately.

    Compare entries to other glossaries and see if major entries are missing. If missing, add one by writing it from scratch (not using the text from the other glossary, unless the license allows it):

    Homestead Guide (License does not allow us to use anything here. Compare for completeness) https://github.com/ethereum/homestead-guide/blob/master/source/glossary.rst

    Yellow Paper (Definitions at the end. License does allow us to use some): https://ethereum.github.io/yellowpaper/paper.pdf

    Wiki Glossary (Can use definitions from here, it's CC0) https://github.com/ethereum/wiki/wiki/Glossary

    Add links to the bottom of the glossary with attribution if any entries are used from other glossaries.

  • Blockchain Governance from a Developer point of view

    Blockchain Governance from a Developer point of view

    Through this issue I intend to highlight the importance that it can have for a developer to know what or who governs the evolution of the Ethereum protocol.

  • Oracles - external data carriers for decentralized apps

    Oracles - external data carriers for decentralized apps

    For me it would be important to mention in the book the inherent isolation of Ethereum from the outside world and the importance of defining mechanisms, commonly called Oracles, to achieve its interaction with it.

    There is already some initiative trying to cover this limitation, such as "http://www.oraclize.it". They define themselves as the "data carrier for decentralized apps".

    Maybe there is something more about it out there.

  • METoken contract migration issue.

    METoken contract migration issue.

    I want to deploy MET to private network. I have created a separate project to deploy MET. The project is here: https://github.com/chainhead/MET that I will raise a PR for eventually.

    I have edited my truffle.js to point to my private network.

    module.exports = {
    	networks: {
    		aws: { // Private network on AWS
    			network_id: "15",
    			host: "public-ip-address",
    			port: 8545,
    			gas: 6721975
    		}
    	}
    };
    

    The truffle compilation goes through. However, the migration does not give any information about successful deployment. Can you please suggest what may I be missing?

    truffle migrate --network aws
    Using network 'aws'.
    
    Network up to date.
    
    

    Also, I noted the following and fixing them in my repository.

    • Truffle configuration file points to Faucet.sol in tokens.asciidoc. Shouldn't it be one in METoken.sol?
    • Import error for StandardToken.sol.
    • Require error for artifacts.require("Migrations").
    • Lint errors as per VSCode.
  • Ethereum Classic

    Ethereum Classic

    @aantonop recently mentioned that it would be good to cover some topics on Ethereum Classic in the book. I have question, to what extent? Do you want to make just simple remark of the project? Or do you want to cover ETC specific topics and software, such as Classic Geth, SputnikVM and Emerald? There're also other changes, such as different monetary policy, difficulty bomb, and so on. There many things actually to cover. I'd like to help with this part if you would be interested

  • Diagram: EVM context when running a smart contract

    Diagram: EVM context when running a smart contract

    When a smart contract is running, it has a very limited context (state) it can access through the EVM.

    We need a diagram that shows this: A circle or box in the middle that is the EVM and within it the contract. Surrounding it are boxes representing the various parts of the context: one box for the calling transaction context, one for the contract variables, one for the blockchain etc. Each of these boxes contain a list of items that can be accessed from that context (the sender of the transaction, the startGas) and the name of each item as it exists in Solidity (eg. msg.sender).

  • difference between kovan and rinkeby

    difference between kovan and rinkeby

    On the intro.asciidoc, on the metamask section, the testnets are presented. But, the text explaining Kovan is the same as the one explaining Rinkeby:

    Kovan Test Network:: Ethereum public test blockchain and network, using Proof-of-Authority consensus (federated signing). ETH on this network has no value.

    Rinkeby Test Network:: Ethereum public test blockchain and network, using Proof-of-Authority consensus (federated signing). ETH on this network has no value.

    This brings the question about why do we have two, instead of just one. So I think the text should be expanded a little, to include the difference between the two.

  • Scalability

    Scalability

    It's probably worth dedicating a major section on scalability. In particular,

    • Why is scalability critical to Ethereum?
    • Why is scalability difficult for Ethereum, probably more difficult than it is for Bitcoin?
    • A description of the upcoming scalability solutions, namely, PoS, sharding, plasma, raiden, etc.

    A challenge is to write something timeless. Since the R&D teams seem to move very fast with scalability solutions, it's potentially hard for the book to be up to date with the latest developments.

  • Chapter09/fix parity multisig 2nd hack code example

    Chapter09/fix parity multisig 2nd hack code example

    Fixing smart contract example for chapter 9. Current version contains patched smart contracts version and therefore does not contain the vulnerability that is described in the text. I updated the snippet to use the exploited version of smart contract and changed the URL to reference to link to this version too.

  • Misleading simplification in the transation chapter

    Misleading simplification in the transation chapter

    https://github.com/ethereumbook/ethereumbook/blob/develop/06transactions.asciidoc#transmitting-value-to-eoas-and-contracts

    If the destination address (to) is a contract, then the EVM will execute the contract and will attempt to call the function named in the data payload of your transaction. If there is no data in your transaction, the EVM will call a fallback function ...

    This simplification leads to the understanding that such contract's flow and checks are assured by EVM, while it is rather implemented by higher languages (Solidity, ...).

    Minimal proxies are the examples, where such statement is not valid.

Mastering Bitcoin 2nd Edition - Programming the Open Blockchain

Code Examples: Mastering Bitcoin Mastering Bitcoin is a book for developers, although the first two chapters cover bitcoin at a level that is also app

Jan 1, 2023
Jan 7, 2023
LEO (Low Ethereum Orbit) is an Ethereum Portal Network client.

LEO LEO (Low Ethereum Orbit) is an Ethereum Portal Network client. What makes LEO different from other Portal Network clients is that it uses libp2p f

Apr 19, 2022
Ethereum-vanity-wallet - A fork of https://github.com/meehow/ethereum-vanity-wallet but the key can be exported to a JSON keystore file

ethereum-vanity-wallet See https://github.com/meehow/ethereum-vanity-wallet This version: doesn't display the private key let's you interactively expo

Jan 2, 2022
Go-ethereum - Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated b

Jan 4, 2022
This library aims to make it easier to interact with Ethereum through de Go programming language by adding a layer of abstraction through a new client on top of the go-ethereum library.

Simple ethereum client Simple ethereum client aims to make it easier for the developers to interact with Ethereum through a new layer of abstraction t

May 1, 2022
Huobi Eco Chain client based on the go-ethereum fork

The Huobi Open Platform is a unified infrastructure platform based on the technical, traffic and ecological resources of the Huobi Group, and will be gradually open to the blockchain industry.

Dec 31, 2022
Streaming Fast on Ethereum
Streaming Fast on Ethereum

Stream Ethereum data like there's no tomorrow

Dec 15, 2022
a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains
a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains

A golang sdk for working with DeFi protocols and general utilities for working with ethereum-compatible blockchains. packages bclient bindings cli con

Dec 15, 2022
run ABI encoded data against the ethereum blockchain

Run EVM code against a database at a certain block height - Note You can't run this against a running geth node - because that would share the db and

Nov 11, 2021
Go implementation of Ethereum proof of stake

Prysm: An Ethereum Consensus Implementation Written in Go This is the core repository for Prysm, a Golang implementation of the Ethereum Consensus spe

Jan 1, 2023
Ethereum Dapp Go API

Web3 Go Ethereum Dapp Go API, inspired by web3.js. Report Bug ยท Pull Request Introduction This is the Ethereum Golang API which connects to the Generi

Nov 29, 2022
A phoenix Chain client based on the go-ethereum fork,the new PoA consensus engine is based on the VRF algorithm.

Phoenix Official Golang implementation of the Phoenix protocol. !!!The current version is for testing and developing purposes only!!! Building the sou

Apr 28, 2022
Ethereum on StreamingFast

Ethereum on StreamingFast Requirements (clone repos, build stuff...) Install Geth git clone [email protected]:streamingfast/go-ethereum.git cd go-ethereu

Dec 23, 2022
Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum.

Evmos Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum. It's built using the Co

Dec 31, 2022
Monorepo implementing the Optimistic Ethereum protocol
Monorepo implementing the Optimistic Ethereum protocol

The Optimism Monorepo TL;DR This is the primary place where Optimism works on stuff related to Optimistic Ethereum. Documentation Extensive documentat

Sep 18, 2022
Tool for monitoring your Ethereum clients. Client-agnostic as it queries the standardized JSON-RPC APIs
Tool for monitoring your Ethereum clients. Client-agnostic as it queries the standardized JSON-RPC APIs

e7mon Tool for monitoring your Ethereum clients. Client-agnostic as it queries the standardized JSON-RPC APIs. However, the execution client should be

Dec 20, 2022
Ethereum 2.0 node multiplexer between consensus and execution

The Minority Client Run the minority client! ~Danny Ryan and/or Tim Beiko As of writing, Ethereum has multiple client implementations, but Geth / go-e

Dec 23, 2022
A Commander for Go implementation of official Ethereum Client

Young A Commander for Go implementation of official Ethereum Client by zhong-my. Overview Young Dependencies Young stands on the shoulder of many grea

Oct 14, 2021