HomeLearnModule 1Ethereum's

    Table of contents

    • 💡 The idea
      • How does this fit into Kernel?
      • Brief
        • Virtual Economy
        • Generalised Compute
        • Kaizen and The Principle of Subtraction
    💡 The idea
    How does this fit into Kernel?

    This early video from Devcon 1 contains many gems of insight into the ideas behind Ethereum; why it might be interesting and important to have one, shared, Turing-complete environment which anyone can access and program; and what the vision was (and is). It's especially useful to look back and ask what of the original ideas we have succeeded in implementing, and where there are still opportunities for improvement. This video has been selected to assist you deepen your (more technical) understanding of:








    Censorship resistance


    (Not just!) money and speech


    This video is the genesis of the calculator (Bitcoin) vs smartphone (Ethereum) analogy and a demonstration of the power of generality...

    "Instead of having a protocol that is designed around one very small set of use cases, you just create a general-purpose operating system and you let people build whatever they want as applications on top of it."

    Ethereum is a blockchain with a few unique features:

    • Built-in Turing-complete scripting language - essentially a hybrid between standard VM architectures, Bitcoin script and a "few other things".
    • People can write programs in this script, or high level languages that compile down to this script, take these compiled scripts, put them into transactions and send them to the blockchain. The transaction gets confirmed and you get a special account at that address.
    • Contractual accounts and Externally Owned Accounts have the same privileges.
    • Anyone can create an application, with any rules. Anyone can then interact with that application, i.e. you can do NameCoin in 10 lines of code...

    State is defined as a key value mapping addresses to account objects. Every account object has a nonce and balance. Contract accounts also include a code hash and storage trie root. Vitalik then discusses how transactions work - important low-level details for us to build a full conceptual picture in the weeks ahead.

    "You can actually think of it as being a fairly simple system. You can think of the state as being a database, and you can think of each of these contracts as being programs that are sitting on one computer, except the computer is massively globally distributed. It's actually a highly secure network backed by tens of thousands computers around the world. It's bold because it's important."

    However, this raises the spectre of "The Halting Problem". If you have a general scripting language, then what is to stop someone writing a program which does not terminate (or halt), taking up all the computer's resources and preventing anyone else from using it? Vitalik explains how this is solved by "gas": a fee charged for every computational step the computer must take, where there is a limit to computational steps possible per block.

    Q: Ethereum's state is defined as a...?

    Reveal the answer

    A: key value mapping addresses to account objects.

    Didn't remember

    Virtual Economy

    This means there is no technical limit on what can be put in the

    field of a transaction, but there is an economic one, as the more data you include, the more expensive it becomes. It was an extra 68 gas for every byte of data you include at that time, though it may have changed now.

    💡 Exercise for the reader: how would you tell what the gas price per byte currently is?

    Vitalik then discusses some of the intricacies around

    , and
    from elliptic curve cryptography, and how
    is an extra field used for public key recovery. He also provides further information on receipts and logs and why logs are cheaper and allow for efficient light-client access. Although it may sound boring, this is the heart of how we build censorship-resistant tools.

    Q: How do we prevent a blockchain with a Turing-complete script from halting?

    Reveal the answer

    A: By charging "gas" for every computational step and limiting the amount of gas consumed per block.

    Didn't remember

    This is followed by a description of the Ethereum Virtual Machine:

    • Stack - up to 1024 32-byte fields.
    • Memory - just an infinitely expanding byte array, but the more you expand the byte array, the more gas you have to pay. Most of the limits aren't static, they're economic and you'll see this idea again and again.
    • Storage - permanent for contracts. You can read and write to it.
    • Environment variables - VM can access block number, time, mining difficulty, previous block hash etc.
    • Logs - append-only storage in a specific block, not in state.
    • Sub-calling - opcode by which VM can itself call other contracts.

    Vitalik then discusses ABI (application binary interface) and RLP (recursive length prefix) encoding "for people who are set theory geeks". It may seem boring, but it is a demonstration of the early culture and how the people who built all this stuff really think. He follows this with an explanation of memory-hard algorithms for mining and why they were an innovation; emphasises the fast block time (17s); and discusses "uncles", which solve the stale rates of blocks that arise due to network latency.. It's worth listening to for cultural context, but 23:50 - 28:57 is now a bit outdated.

    Vitalik makes the critical point that merkle tries are "a construction that allows for compact, efficiently-verifiable proofs that a particular transaction was included in a particular block." It's not just transactions in the Merkle trie though; it's the state too: i.e. that storage trie root we talked about in the account object earlier.

    Understanding how this particular choice of data structure allows us to succinctly express shared state reveals why intimacy with low-level technical details allows one to build a comprehensive conceptual picture of how it all ties together, and what meanings any technology can be used to build.

    What kinds of meaning exactly? Well, language itself is composed out of tree-like deep structures. It is these basic, but extraordinarily powerful, combinatorial patterns which allow very young human beings to learn and use an almost infinitely complex phenomenon with such ease, even as their brains are still developing. More prosaically, every word is a tree, with its roots tracing through endless other words and languages and people, and its branches reaching into any number of unique interpretations in times and contexts yet to be discovered. Language is the only logically decentralized system we have, so it makes sense that the data structures which inform the next logically decentralized systems we co-create mirror that at the heart of how we currently communicate value.

    Generalised Compute

    So, you're less technical then Vitalik (i.e. all of us) and are wondering what this all really means? Well, the critical point is this notion of a general purpose operating system - one, monolithic virtual machine distributed across the world which is shared by everyone, owned by no-one and which can't be turned off without also turning off the internet. With Bitcoin, you can carry 12 magical words in your head across any border in the world, incant them into an internet-connected machine and have immediate access to value.

    Now, there is the possibility that you could pull down not just monetary value, but generalised compute. That is, your 12 or 24-word mnemonic could be your entire personal OS, which would be accessible from anywhere. Stop thinking of computers as a screen into which you type things from a keyboard. Start seeing the world itself as an infinitely programmable playground, access to which only requires a few magical words anyone, anywhere can create when they learn the basics of a new order of language.

    Q: The 12 or 24 words used to generate your private key and grant you access to a blockchain is called a ________?

    Reveal the answer

    A: Mnemonic.

    Didn't remember

    Kaizen and The Principle of Subtraction

    It's also worth understanding the Ethereum Foundation's philosophy, as it works with two fascinating complementary opposites.

    The Quintessential DevCon IV Talk

    The term 改善 (pronounced "kaizen", meaning "continuous improvement") was first used in Japan after World War II, mostly promoted by American business and quality-management teachers, and found its apogee in "The Toyota Way". So it's not a term with a great history, but it is one we can reclaim by pairing it with it's opposite, what Aya Miyaguchi calls "The Principle of Subtraction".

    Rooted in Zen philosophy, the Ethereum Foundation aims to "grow small"; to do by not doing; and to try and matter less. When consistently subtracting from your own importance and influence, then the continuous improvement we all wish to see happens in the community's capacity and capability. It's elegant and simple.

    We seek to continuously improve the people around us by humbling ourselves and handing over power at every chance, without shirking responsibility.

    Delighted, we gradually find ourselves doing nothing, being happy.

    Promise Of