Uinspire Blockchain Course {Lesson 1: Foundations of Blockchain Technology}

Alfonso Delgado
Uinspire
Published in
13 min readApr 1, 2018

Blockchain technology first came to prominence as the technology underpinning Bitcoin, a data network introduced by Satoshi Nakamoto in 2008. Over the past year, blockchain technology has featured in every major news publication across the world. This is largely due to the surge in the price of blockchain-based digital assets, which currently have a combined market value of $350 billion. To put this in perspective, this exceeds the market value of Facebook and the GDP of Denmark.

Here’s an overview of the current sentiment towards digital assets:

While blockchain technology has allowed these digital assets to be brought to life, there is a much broader set of applications that we have not yet capitalised on. Data can be described as the oil of the digital era — our most valuable resource. In turn, blockchain technology is a tool that enables us to store, share and monetise our data in a secure manner. Many have compared this technology to the internet, as it is building new digital roads to interconnect people, computers and data. Recognising this potential, the World Economic Forum has predicted that by 2027, 10% of the world’s GDP will emanate from blockchain networks.

We are still at the beginning of this journey and we are yet to unlock the technology’s full potential. To explore new use cases, it is instrumental that we understand the core elements of blockchain technology and the challenges that it aims to address. There is a lot of misinformation being posted online about the technology’s workings. This is a product of the hype that blockchain has amassed, but also indicates that the technology is intricate and interdisciplinary.

The Uinspire Blockchain Course

The goal of this course is to provide you with a solid understanding of how blockchain technology works. We also want to bring you up to speed with the latest developments in the field and to equip you with the tools required to form part of this digital revolution. By the end of this course, you will be ready to embark on your own blockchain project. We hope that you will use the knowledge acquired to teach others about blockchain and leave your footprint in this space.

The course is divided into 5 lessons:

  1. Foundations of blockchain technology
  2. The Bitcoin revolution
  3. Unlocking smart contracts: Ethereum
  4. The distributed economy: ICOs, DApps and DAOs
  5. Permissioned networks and new DLT structures

Each lesson should take approximately 45 minutes to complete, including the exercises and additional material. If you find an area challenging, carry on reading to see if your doubts are clarified at a later stage. It is also helpful if you take notes as you go along and write down any questions that you have at the end. Blockchain is a promising technology with many use cases and we strongly believe that your efforts will be rewarded.

Meet your instructors

Kieran Arasaratnam is the Founder & CEO of Uinspire, a social enterprise that aims to disrupt old models of impact investment. He has a career in investment banking spanning 15 years and has contributed to a number of charitable initiatives around the world. Kieran recently created the Uinspire Digital Academy to educate talented minds on the impact of emerging technologies and drive social change. Kieran has also launched a venture capital firm called Emerchain Capital, which will invest in promising projects within the blockchain ecosystem.

Alfonso Delgado is undertaking a PhD in Computer Science at Imperial College London. His research focuses on the practical applications of smart contracts on the global economy. Alfonso has also given talks on the legal and economic aspects of blockchain and has written various papers to tackle this subject. Prior to this, Alfonso obtained an MSc in Law and Finance from Oxford and worked as a blockchain consultant. Alfonso has joined the Uinspire team to teach young people who are driven to harness the value of emerging technologies.

You can find out more about Uinspire’s team and our shared goals here. You can also join our Telegram chat to discuss these topics with other motivated students and receive updates about the blockchain ecosystem. When you’re ready, scroll down to begin the first lesson of the course!

The perils of centralised databases

For many decades, data has traditionally been stored in centralised databases. A database is simply a structured collection of data. Centralised databases are maintained by a central administrator and stored in a single location. This administrator is an intermediary that is trusted to safeguard data on behalf of its owner. Users who want to access this data must send a request to the administrator’s server, which then decides whether the user is authorised to receive the data requested and the terms of service are being complied with. In other words, users can only read the data, while the administrator and the data owner can each write (ie. add to), alter or delete the data too.

A centralised network architecture: users (clients) request data from a central entity (server)

Most of the data on the internet is stored in this manner —a website’s data is stored on the administrator’s server on behalf of a website owner. If you, as a user, are authorised to browse the website’s data, your request will be approved by the administrator and the data will appear on your screen. The same is true when a computer queries data from a website’s server by using a data channel, known as an Application Programming Interface (API). This traditional model is generally efficient, as it is proven to be fast and scalable.

On the other hand, we cannot guarantee that the administrator will refrain from using its powers to maliciously alter or delete the data. The data is kept in a sort of black box, which data owners cannot directly monitor. Additionally, the administrator could abuse its position by charging high fees for the storage services. Even if the administrator is not malicious, the system gives rise to single point of failure issues. This means that if the server goes down, due to a technical issue or for maintenance purposes, users will not be able to access the server’s data. Further, it is possible for attackers to infiltrate the server and corrupt the data in an irrecoverable manner, as the data is being stored in a single location.

It is precisely this set of issues that motivated Satoshi Nakamoto to pioneer the use of blockchain technology, allowing data to be stored and maintained by network users themselves, without having to rely on a central administrator.

A group of banks is drawing information from a database to conduct their operations. Source: Bits on blocks

Blockchain’s core attributes

Blockchain technology has the capacity to alter the fabric of business and social interactions. Despite its potential for disruption, there is no agreed definition as to the meaning of the term blockchain. The technology is evolving at a very fast rate and new features are being tested on a regular basis, which makes it hard to isolate a set of defining attributes.

As a result, it is helpful to distinguish between the broad and narrow uses of the term. In broad terms, blockchain is used to describe the suite of technologies that allow (i) computers in a peer-to-peer network (ii) to reach agreement over (iii) shared data. Let’s examine each one of these elements in more detail:

(i) In a distributed peer-to-peer (P2P) network, a group of computers is making part of their resources available to perform a range of computing tasks. These computers are commonly referred to as nodes. Importantly, the tasks are not controlled or coordinated by a central node or intermediating party. Rather, these tasks are distributed across the different nodes in the network, which coordinate by passing on messages to one another.

The hands represent control over the network. The big circles show nodes that are trusted to maintain the network’s data, which other nodes (small circles) can access but not control. Source: MaidSafe Blog

(ii) In a distributed P2P network, a consensus mechanism is required for the dispersed nodes to create a record of the shared data. For this purpose, each blockchain network has its own protocol, which consists of rules and procedures that nodes must follow to share and verify the data. In addition, the protocol lays down economic incentives to reward nodes that carry out these activities in a compliant manner and stay synchronised with each other.

(iii) The task of maintaining the agreed data record is distributed amongst the nodes in the network. This shared data record is often described as a ledger (or journal), as it is composed of a series of entries that are linked to accounts and show every transaction that has been confirmed. Given that nodes in the network maintain its own copy of the ledger, they are able to independently audit the ledger entries to identify and reject any inconsistencies.

Though the word blockchain, in its broad sense, is often used to describe these 3 elements, the term distributed ledger technology (DLT) is more accurate in this context. This distinction is relevant because there is a narrower (and more natural) meaning of the word blockchain, which we turn to examine now.

Blockchain as a data structure

In the more narrow sense, blockchain refers to a specific data structure that a network’s shared data usually (though not necessarily) will adopt. A data structure is a way of organising and storing data so that it can be used efficiently. In a blockchain data structure, the data in the ledger is organised into a series of interlinking blocks. These blocks are indexed in a similar way to page numbers. Each block contains a timestamp and a link to the previous block, with the result that a chain of blocks is created.

A miner is a node that creates a new block and receives its reward (Lesson 2)

The blockchain data structure makes it simple for computers to verify the consistency of a long and growing number of ledger entries. Blocks are signed with a “digital fingerprint”, known as a hash value, which takes the form of a string of characters that is fixed in length. Each block also stores the hash of the previous block in the chain.

Hashes are useful because they are data-specific. If an alteration is made to the data within a block, the block’s hash will change and the chain will break. Should a person attempt to distribute a corrupt ledger, for instance by replacing one of the addresses in a previous block for their own, other nodes will identify the misalignment and reject that version of the ledger. Therefore, this simple tool enables nodes in the network to agree on which entries should be rejected.

Minor variations in the input data produce noticeably different hash values

The mechanism for creating a block is laid down in the network’s protocol. For example, the protocol will specify the format that the shared data needs to follow and the maximum size of each block. It will also establish a procedure to allocate the responsibility for the creation of new blocks to particular nodes in the network. In addition, the protocol lays down an economic reward for nodes that are selected to perform this task.

Overview of the block creation process

When users wants to add data to the ledger, they start by sending a transaction to one of the networked nodes. In this context, a transaction refers to a cryptographically signed message that contains some form of data. This data does not necessarily have to relate to the transfer of a digital asset. For instance, in a network where ledger entries relate to the ownership of physical assets (e.g. cars), a transaction could be sent to register the ownership of a particular car.

When nodes receive the new transaction, they will first validate it to ensure that it has been adequately signed. Following this verification process, the nodes will broadcast the data by sending messages to other nodes in the network. This process of propagating data across the network is essential to ensure that the nodes are able to form consensus, as each node maintains and updates their own copy of the network’s ledger.

The transaction will be pending until it is incorporated into a new valid block, at which point it can generally be regarded as settled and confirmed. The user will be able to browse the relevant block to observe that her transaction has been successfully added to the shared ledger.

Source: PwC (adapted)

Public vs permissioned DLT networks

In public networks like Bitcoin and Ethereum, any user can run a node to maintain their own copy of the ledger and form part of the consensus mechanism. Whichever node is selected to add a new block will obtain the right to write a new set of entries in the ledger. Meanwhile, all others nodes will be able to read the data to confirm its validity and detect malicious alterations. The idea is that nodes should not be able to alter or delete the ledger entries once confirmed, as this would cause a break in the chain and destabilise the system.

In permissioned networks like Ripple (ILP) and R3 Corda, only authorised users can maintain a copy of the ledger and participate in the consensus process. Permissioned networks can be divided into fully-private and consortium networks, depending on whether the right to participate in the network is governed by a single entity or a group of nodes. Once a node is accepted into the network, it will be able to read and write data to the ledger. Permissioned networks are typically used in the business-to-business (B2B) sector, as they tend to offer greater privacy and scalability. As the participants in the system are known, it is also easier to attach legal liability to transactions taking place in the network.

Source: Bits on blocks

It is important to emphasise that the choice between DLT and centralised database systems comes down to a series of trade-offs. As Rose Vern states, “if you’re blinded by the hype and deafened by the noise, you’re unlikely to make that choice objectively”. DLT is far from being a solution that is looking for a problem, but in some cases there may there is a wide range of alternatives that merit consideration.

The value added by DLT

DLT is a foundational technology that can be implemented to achieve a wide range of goals, rather than an application in itself. DLT has 5 important advantages:

  1. the blockchain data structure creates a tamper-resistant and transparent data trail that can be audited and monitored by the nodes in the network;
  2. payments conducted in a DLT network can be automated, in so far as they are generally confirmed shortly after transmission;
  3. there is no need to rely on a central authority to validate transactions. Instead, trust is distributed to deter any single user from taking advantage of others by manipulating transactions;
  4. the absence of centralised control (for instance by banks or payment processors) and the standardisation of data can help to reduce transaction costs; and
  5. DLT networks are distributed and have no single point of failure — a node can enter or leave the network at any time without causing disruption.

The limitations of DLT

While we will comment on the limitations of DLT as we go along, here are 5 important ones:

  1. DLT networks are far from trustless or immune to attacks — we still need to ensure that the participants in the system (i.e. users, nodes and developers) refrain from forming cartels to conduct malicious actions;
  2. DLT networks are not fully immutable. While the data in the ledger cannot be directly removed, indirect actions can be taken retrospectively to invalidate or alter the data in the ledger (Lesson 4);
  3. it is usually expensive to send large packages of data into the network, as every node will need to store a copy of that data once it is included in a valid block. This makes DLT networks impractical for storing images and documents;
  4. the process of adding data to the ledger tends to be slower than with centralised databases, as it needs to go through a network-wide confirmation process. This limits the throughput of DLT networks and may cause periods of temporary congestion;
  5. in DLT networks, users are in charge of their own security. They must safeguard their private key to sign transactions and ensure that these are sent in a compliant manner. DLT networks are not user friendly and hackers are constantly taking advantage of users’ mistakes.

Note: some of these advantages and limitations do not apply to permissioned networks — we examine these in detail in Lesson 5. The lists are non-exhaustive.

Lesson recap

In this lesson, we examined the foundational elements of blockchain technology. In particular, we learned that a blockchain is a data structure that allows nodes in a P2P network to reach consensus on shared data. The use of hashes is instrumental in this regard, as it prevents malicious alterations to the agreed data record (or ledger) from going undetected. In combination, this suite of distributed ledger technologies allows data to be maintained without having to trust a central entity to adequately safeguard the data record.

To make the most out of this course, please go through the exercises and materials that follow to build on our discussion.

Consolidation exercises

  1. Generate some hashes by entering your own selection of data:

2. Have a go now at building your own basic blockchain:

Extend your knowledge

Finally, watch this video to prepare for Lesson 2

Don’t worry if you have not yet digested some of the more technical points. If you have any questions, please comment on our Telegram group. We look forward to seeing you in Lesson 2, where we will explore together the components of the most popular blockchain network: Bitcoin!

--

--