Abstract
Ethereum is an open source, decentralized blockchain platform with computational capabilities that reconstructs an elementary currency exchange into a transfer of value between users via a scripting language. Ethereum is widely recognized as a successor to the Bitcoin protocol, generalizing the original ideas and enabling a more diverse array of applications to be built on top of the blockchain technology. Ethereum has two essential components. First, there is a Turing-complete virtual processor that can load resources and execute scripts called the Ethereum Virtual Machine (EVM). The second component is a token of value called ether, which is the currency of the network and is used for user-to-user transactions or compensation to miners of the network. In this chapter, we begin our journey with an overview of Ethereum’s architecture in comparison to Bitcoin, focusing on the EVM and Turing-completeness properties. Following the architecture section, there is a short discussion of the accounts model in Ethereum and account representation with Merkle-Patricia Trees. This will lead us to the topics of global state representation in Ethereum, account storage, and gas, which is a spam-prevention mechanism in the network. Then, we deconstruct the notion of a smart contract enabled by EVM, the security concerns revolving around sandboxing executable code, and how the EVM pushes executable code (bytecode) to the blockchain. After that, we provide an introduction to Solidity and Vyper, two programming languages used for writing smart contracts in Ethereum. We explore the syntax of Solidity and Vyper, as well as the popular integrated development environments (IDEs) being used, and provide a brief list of key developer resources. Next, we focus on the World Computer model proposed in Ethereum and introduce supporting decentralized technologies such as IPFS and Whisper. Then, we look at the state of decentralized apps (DApps) along the publishing platform called Mist available in Ethereum. This allows us to transition into talking about the Layer 2 updates to Ethereum—the major technical focus of this chapter and the Ethereum ecosystem in 2020. Finally, we conclude the chapter with a brief discussion of the enterprise side. Here, we introduce a particularly noteworthy development of Blockchain-as-a-Service (BaaS) deployed on the Azure cloud by Microsoft.