by Achal Srinivasan and Yorke Rhodes IV

Abstracting Blockchains

Blockchain Beyond Bitcoin | Lecture 5

Achal Srinivasan
Published in
12 min readFeb 20, 2019

--

Recap

Last lecture, we discussed how blockchains attempt to solve a problem fundamental to distributed computing. In a distributed network, it is important that the system remain functional despite some faulty or malicious nodes (users). This class of problems can be generalized to the Byzantine Generals Problem, which models how the flow of information through a distributed system with nodes exhibiting malicious behavior can result in undesirable outcomes. Blockchains implement consensus algorithms which serve to elect a leader who decides the contents of the next block of the chain; these algorithms can impact both the security of the system and the economic incentives for mining or securing the network. Creating consensus algorithms involves the study of mechanism design, which is a subset of economics which starts with socially desirable outcomes and works backwards to create a set of rules which incentivizes participants to move towards those outcomes.

Determining and validating the content of the next block on the blockchain is a way of maintaining the state (history of actions, transactions, etc.). In this lecture, we will see how the idea of managing state in a decentralized manner is one of the most novel features of Bitcoin, and more generally, blockchains.

Evolution of Software

Software As Tools

Before access to the internet proliferated, software resembled tools rather than services. As Sonal Chokshi and Denis Nazarov of a16z crypto mention in a post about the evolution of open-source software, original tools were useful in a self-contained manner — without needing to interact with other users or pieces of software — and were commonly distributed under a license model. This gave users a strong sense of ownership and control over the software. These tools served distinguished use cases, such as providing digital versions of industrial processing tools.

Open-Source Software

The license-based model of selling software tools resulted in piracy, since code was relatively uncomplicated and easy to reverse-engineer or duplicate. Communities of software-engineers began to create unlicensed, free alternatives to proprietary services, which could be reused and improved by anyone. While these open-source alternatives were often less polished, they appealed to a broader and less constrained use case.

Software-as-a-Service

From an infrastructure perspective, software evolved from individual instances running on computers, to internet-connected services operating on a client-server model. This allowed for scalable computing where an endless number of clients could be connected to dynamically created instances of applications on server infrastructure in the cloud.

Cloud computing involves shared pools of resources that can be rapidly provisioned with little manual oversight. It achieves economies of scale akin to a public utility. This new form of infrastructure enabled companies and organizations to focus on core business instead of spending time and resources on infrastructure management and maintenance, reducing upfront costs. Applications could be spun up faster, meeting unpredictable demand, and charging on a pay-for-use basis.

Software as a service (SaaS) is a licensing and delivery model where software is centrally hosted and access is subject to subscription-based pricing. Users need only a web browser to access and use these services, since all of the heavy computing happens on remote servers. These applications plug into cloud computing providers. SaaS has been incorporated into the strategy of nearly all leading enterprise software companies.

Combinatorial Innovation

Software is by nature composable: it is designed from building blocks which can be combined to solve more complex problems and interactions. Thus, it is well-suited for what Nazarov defines as “combinatorial innovation”.

The right conditions must exist for this type of innovation to take place.

This includes a medium of communication for a flow of ideas, a culture of sharing which develops and refines ideas through discourse, and healthy competition providing a powerful incentives to motivate entrepreneurs.

The development of increasingly complex technologies results in modularity, where problems are divided into parts and conquered individually, once there is a critical mass of users. This modularity lends itself to permutations of ideas and strategies for implementation.

For software, the internet is the gold standard of communication technology, and its open and accessible nature results in unparalleled information flow and collaboration. Capitalism as a marketplace for ideas provides a fertile environment for software entrepreneurs, and over four billion potential consumers provide an excellent environment for testing & refining hypotheses about human behavior. Open-source software provides the ideal breeding ground for combinatorial innovation; the culture of sharing is pervasive, since developers build generalizable tools and solutions which can be shared with other developers. Network effects — the increase in the utility of a network as the number of users increases — result in internet services which are autonomous, continuous, and global. Plugging into existing networks provides more value than creating a new one, resulting in consolidation and monopolization (see: Facebook, Google). This is due to the existence of state within these networks and applications.

What is State?

The following two components of software help to explain the shift in software from tools to services: logic (in the form of code), and memory (in the form of state). Tools were functional by nature (input => software => output). The ability to remember was usually limited and restricted to the actions of the singular user. Internet services leveraged advanced state management and network effects to create unparalleled utility, locking users into an ecosystem of applications built atop a history of user behaviors and interactions.

Individual behaviors and actions have positive externalities and spillover effects for these networks, feeding into algorithms designed to improve the overall experience of the applications (such as updating search rankings upon clicks of a particular link). The usefulness of state compounds, while the logic of the program becomes less important to update and maintain. This is a byproduct of the desire to monetize state: companies can sum information across groups of users to create proprietary knowledge. This defends proprietary, closed networks against their open-source alternatives. Without network effects & feedback loops which make state increasingly useful and attractive for users, open-source services usually cannot displace proprietary ones.

Internet State

The internet does not natively maintain state, independent of trusted third-parties (internet companies). It also does not have a native mechanism to transfer that state. Cookies were invented to enable web applications to maintain state locally on devices, such that users would be able to continue where they left off. Cookies and their associated data, though, are only meaningful to service providers as opposed to users. For instance, cookies stored in your browser contain data that only make sense to the servers from which they are read, such as unique identifiers and hashes.

With the advent of cloud computing, internet companies began to hold state on servers for increased efficiency and security over a user’s state. While this is not “unfair”, internet companies yield disproportionate benefits from holding, accessing, and monetizing user state. The internet’s ability to remember takes the form of data stored within closed applications and services. If a user is unable to hold or control the state and its associated value, then they are also unable to transfer it (between applications, for instance). The ability to transfer value is native to economic development, and the basic internet protocols of FTP and SMTP are well suited (but not perfect, due to their simplicity) to serve as the “pipes” which allow for that transfer of value & information.

Monetization of state has taken the form of advertising; advertising businesses store and transmit the state of billions of users, leading to three problems:

  1. Third parties facilitate and profit off of every advertising transaction
  2. Advertising favors established businesses over new companies
  3. Richer advertising economies are reliant upon more user data creating for bad user experiences and misaligned incentives

Since the inception of Bitcoin, we have seen an emergence of a new model for internet state which is publicly maintained and accessible. This is called open state, and we will see how this enables a new class of applications for users.

What is a Blockchain?

A block-chain is the technological underpinning of Bitcoin, first described in the white paper “Bitcoin: A Peer-to-Peer Electronic Cash System”, published in 2008. Block-chains for more general uses were discussed in the original paper, but it was not until a few years later that blockchain emerged as a generic term. A blockchain is a distributed computing architecture utilized by a network to ensure the same transactions, grouped into blocks, are executed and recorded on each copy of a ledger by all the network nodes. One block is added at a time, and every block contains a cryptographic proof which verifies that it follows in sequence from the previous block, forming an ordered chain. Specific implementations of a blockchain define protocol rules which the network nodes conform to, governing what transactions are considered valid. Profits built into the protocol incentivize nodes which maintain and verify transactions, explaining how the ledger is kept in consensus across the entire network. It is useful to have a mental model for understanding blockchains irrespective of implementation, so we will proceed to identify the elementary components of a blockchain and their role within the network.

Components of an Abstract Blockchain

We have identified 5 important layers consistent across blockchain implementations.

The consensus layer encompasses the public format of the ledger and the consensus algorithm which network nodes can use to determine which of multiple candidate ledgers is the consensus ledger.

The mining layer defines the protocol that incentivizes network nodes to maintain consensus and continue adding new blocks to the ledger, ensuring that the ledger will continue to be useful in the future.

The propagation layer defines how the ledger and subsequent updates are transmitted and communicated between nodes in the network.

The semantic layer defines the specification of how new blocks must relate to previous blocks, outlining the rules for miner block formation and a protocol with which the rest of the network can verify conformity.

The application layer encompasses any code or business logic which implement additional features utilizing the data available on the network’s ledger.

With this new abstraction, we can return to our discussion of the Bitcoin blockchain implementation with new understanding.

Components of the Bitcoin Blockchain

The consensus layer of Bitcoin defines the ledger format to be a table with account balances of the native coin. The consensus algorithm encourages network nodes to defer to the ledger with the most computational work associated.

The mining layer of Bitcoin incentivizes network nodes with a work-intensive hash puzzle that, when a solution is provided (proof of work), allows these nodes to reward themselves on the ledger’s balance table.

The propagation layer of Bitcoin has all communication occur over TCP (Transmission Control Protocol) in the form of messages which contain information such as the sender node’s client version, observed transactions, block inventory, etc.

The semantic layer of Bitcoin defines a transaction rule set which revoles around the principle of preventing debt in the balance table. More concretely, new blocks cannot contain transactions which allow an account’s balance to go below zero.

The application layer of Bitcoin has evolved as the cryptocurrency began attracting greater attention from developers and technologists. Novel projects began to use the bitcoin network for purposes other than value transfer of the native coin, tapping into this new widely available form of financial data, which we will now briefly explore.

Stateful Applications on top of Bitcoin

Bitcoin’s blockchain maintains state for the purposes of recording a history of coin transfers. It was the first time that this type of state was held in a digitally native, verifiable, public form. Using this open-access state, developers began to build primitive applications with simple scripts.

One early example of this was a simple Bitcoin escrow application.

Imagine a scenario where actor Alice wants to buy a package P from actor Bob using her Bitcoin, but doesn’t want to pay until the package has been delivered.

A mutually trusted third-party actor Charlie can be used to hold funds while the package is in transit, ensuring that Alice cannot go back on her purchase promise.

Once Alice receives the package, she notifies Charlie who forwards the funds to Bob, completing the exchange of Bitcoin for package.

We see that Charlie can easily charge a fee for his services, enabling a new market for escrow guarantors. This application can also use some clever cryptography requiring a 2-of-3 multisignature for authorization of fund-transfer transactions.

Another early example of a Bitcoin application was the green address, enabling Bitcoin to be used in retail purchases irrespective of the vendor’s technological abilities.

Imagine a scenario where actor Alice wants to buy a coffee from vendor Bob’s establishment using her Bitcoin. In this case, we assume that Bob’s store would have significant difficulty in observing and verifying a transaction on the Bitcoin blockchain in a timely and efficient manner.

Thus we conclude that Alice cannot transfer her Bitcoin funds directly to Bob to complete the purchase.

Instead, we again introduce a trusted third-party actor Charlie who can verify Alice’s Bitcoin transaction efficiently and forward Bob funds in a colloquially understood format that he can trust.

In this case, Bob trusts Charlie to forward him funds in the local denomination, and Charlie has the separate responsibility of establishing trust with Alice and verifying her transaction. We can again see how Charlie can charge a fee for his services, and a new market emerging from these types of roles.

Generally speaking, these scripts built on top of Bitcoin are quite limited in their functionality because they only have read access from the Bitcoin state with no way to write that state as a result of business outcomes. This is because Bitcoin’s protocol definition restricts it to a table of account balances with a predefined transaction rule set. Many developers began to question this definition to make it more extensible for projects residing in this emerging application layer. Many of these projects took the form of alt-coins: separate blockchains with cryptocurrencies of their own that altered the original bitcoin protocol to add new features or capabilities specific to their application.

In late 2013, Vitalik Buterin (20 years old at the time) proposed that a single blockchain with the capability to be reprogrammed to perform any arbitrarily complex computation could exist as a substrate for these projects. This programmable blockchain would be called Ethereum. In the next installment, we will outline the components of the Ethereum blockchain, discuss implications, and explain how such an ambitious platform is possible.

References

--

--