Introduction to Blockchain technology

What concepts is it based on? And most of all, what are the potential applications for Blockchain technology?

Introduction

Blockchain technology, a subject typical of information technology experts, has recently become a quite common discussion topic; not your typical “pub talk”, but several traditional media have often discussed blockchain, although mostly in superficial and distorted ways, always in relation with another hot topic, which is cryptocurrencies and the crazy Bitcoin value growth.

But what are the concepts it’s based on? And most of all, what are the potential concrete Blockchain applications?

Blockchain and real applications

While everyone talks about it, idolising it as the “killer app” that will solve any and all issues connected to every field, the blockchain applications have yet to be tangibly used in real-life fields. Of course we need to keep in mind the fundraising through ICOs (Initial Coin Offering) and the related cryptocurrencies, but besides these, there are many promising options, but very few real applications in most fields.

 

What’s Blockchain tech

First of all, I would like to start from the basic concept: Blockchain is a write-only database in which data can be stored in the form of “transactions”.

The most commonly evident example of this application of the technology is that used for cryptocurrencies, which are a sort of “digital coin” which can be transferred between two “addresses”: person “A” sends a certain amount of it to person “B”.

Transactions

A transaction elaborated by all Blockchain nodes is generated. Once everyone has verified the correct outcome of the transaction – meaning that “A” has sufficient funds to carry out the operation – it will be inserted within a “block” which is then added to the Blockchain. The block has features that distinctively bind it with the previous block, thus creating the concept of “block chain”.

Figura - 1 Struttura Blockchain

Picture 1 — Blockchain structure (CC BY-NC-ND by En3pY)

 

Smart Contract

Another application of the blockchain technology is Smart Contracts, introduced in the Ethereum project [1]. Smart Contract is the possibility to have a “digital contract” developed with a specific language, very similar to JavaScript. The most common one is Solidity.

A Smart Contract can have both variables and functions. The variables of a Smart Contract can be modified by recalling the functions defined within the same Smart Contract, or within another. An example of Smart Contract with this sort of development is CryptoKitties [2], Which we will be talking about later on.

Below is an example of Solidity code [3]

contract mortal {
   /* Define variable owner of the type address */
   address owner;
   /* This function is executed at initialization and sets the owner of the contract */
   function mortal() { owner = msg.sender; }
   /* Function to recover the funds on the contract */
   function kill() { if (msg.sender == owner) selfdestruct(owner); }
}
contract greeter is mortal {
   /* Define variable greeting of the type string */
   string greeting;
   /* This runs when the contract is executed */
   function greeter(string _greeting) public {
       greeting = _greeting;
   }
   /* Main function */
   function greet() constant returns (string) {
       return greeting;
   }
}

 

A Blockchain is forever

First Blockchain rule: once data is written within the Blockchain, it can never be removed.

When thinking of potential applications based on this technology, it’s important to understand whether the data stored within it can stay there forever, or if there is a way to “correct” the information if necessary… only when possible, obviously.

Security

I often heard that Blockchain guarantees the security of the data stored within itself, because they are encoded and anonymous. This is not completely exact, however. It is true that it’s a type of technology that intensively employs crypthographic mechanisms, but it’s also true that the data is accessible and visible to anyone with access to a Blockchain node.

For instance, it’s possible to see when the very first BTC transaction [4] between Satoshi Nakamoto and Hal Finney was executed. At that point, it’s also possible to see all transactions made by either one or the other account. With knowledge of either Nakamoto’s or Finney’s address, it’s possible to find out both their balance and identity. And, again, this is information that once written, can never be deleted.

Hence the main strength of Blockchain – the clarity of transaction history – may also turn into a weakness for certain real-life applications of the technology. Therefore it’s important to keep into consideration all possible limitations and inconvenience of this technology when designing applications for it [5].

Resource consumption

Another aspect to consider is the resource consumption. During the “mining” stage, Blockchain has a rather high resource consumption level, very close to 100% of the available CPU resources. The two points that must be kept into account are:

  1. Setting up a Blockchain node at a cloud services provider (such as VPS, for instance) may be cause for either extra charges for the intensive CPU usage, or the service dismissal, as resources are usually shared between various providers.
  2. From the applicative point of view, it may be necessary to just leave the Blockchain “mining” node to avoid penalising other running applications that would have reduced resources.

Public and private

Last but not least, there is one further aspect to keep into account when talking about Blockchain, which is whether the implementation is public or private.

Public Blockchain

Everyone knows the public Blockchain as that of “Bitcoin” or “Ethereum”. Anyone could become a Blockchain node by installing the specific program and when having either BTC or ETH funds available, they can store data within it. Everyone can also see the content of all transactions within it.

Besides considering all the aforementioned aspects (write-only, immutability, data access), it’s important to remember that any Blockchain transaction has a “cost”.

Releasing a Smart Contact, recalling one of its functions, or transferring funds from an address to another, has a cost in Ether. The correct term would be “Gas”, a unit of measurement that is consequently converted into Ether; but we’ll keep the term “Ether” for convenience, since it doesn’t change the point of the whole topic, despite it being technically imprecise.

In other words, before executing any operation, it is necessary to purchase or acquire Ether. The amount of Ether required for an operation depends on the amount of bytes constituting the transaction: it’ll be higher if we need to release a Smart Contract, but it will be certainly lower when all we need to do is recall a function.

Another aspect to consider is the performance. The Bitcoin Blockchain has a “capacity” between 3.3 and 7 transactions per second, with one block generated every 10 seconds. Ethereum performs slightly better, with around 15 transactions per second, with a block being generated every 15 seconds. From the moment a transaction is inserted within the Blockchain, until the moment it is confirmed, it can take a couple dozen minutes on Bitcoin, or a few minutes on Ethereum. Since it’s a public Blockchain which is accessed by several thousand nodes, there can be cases of overflow, which can end up blocking computational functions.

It happened in December 2017, with “Cryptokitties”, a game based on Blockchain technology. The high transaction volume has caused the whole Blockchain to slow down, creating difficulties even for companies that were raising funds through ICO [6]. It’s obvious that it’s an aspect that could cause serious penalisations for some application environments.

Private Blockchain

There is a possibility to develop applications based on private Blockchains, meaning that their nodes are controlled by one or more entities intending to use the characteristics of this technology. Private Blockchain has the advantage that it can offer functions of “access control”, which allows to regulate who can and can’t access nodes and information.

It also offers the advantage to operate without requiring cryptocurrencies. Last but not least, depending on the “engine” used, it’s possible to reach remarkably higher performances, sometimes even higher than 1000 transactions per second [7]. As  a reference value, Visa has a volume of about 1667 transactions per second, on a network that is capable of handling 56,000 transactions per second, according to their estimations [8].

The characteristics of saved data (they can only be added, not edited nor removed, and fully visible with access to the Blockchain) and the required resources remain unchanged.

 

Conclusions

Blockchain or no Blockchain? Public or private? How important is data reactivity? Can data be public?

Analysing the application of Blockchain technology requires an approach that is not exclusively from the systemic or programming point of view, but also from those of security, performance and general “architecture” of the application, which prevail on the final decision for reasons of importance. Underestimating such aspects make become problematic or even fatal to the success of the project.

 

References

 

Translation of the article originally published by Sebastian Zdrojewski on MokaByte: http://www.mokabyte.it/2018/01/realblockchain-1/

Published on 31/01/2018 00:00

Sebastian Zdrojewski

System, Network and Data Security advisor for over 20 years, in 2017 co-founded Rights Chain, a company aiming the development of copyright and intellectual property protection and enforcement solutions.

Request Information