Blockchain Technology:

A High Level Primer for Developers

Key Technical Concepts in Building on the Blockchain 

A Knowledge Sharing Session at

ITEX Integrated Technologies Limited

Presenter: Chimezie Chuta, Lead Dev Blockchain Nigeria User Group

The Blockchain Technology: What is it?

A Distributed Digital Record of Transactions, Secure, Immutable, Append-onlyDecentralized, Time-stamped,  Hashed and Transparent.

Demo: http://www.blockchainnigeria.group/blog/explaining-bitcoin-hash-functions-newbie

The Blockchain Technology

In Establishing Trust, the Blockchain provide a simple, paperless way to establish ownership of money, information and objects

An Address, A Public Key, A Private Key (a hash of the address data.)

The Blockchain Technology

WHAT'S A HASH FUNCTION?

In the abstract, a hash function is a mathematical process that takes input data of any size, performs an operation on it, and returns output data of a fixed size.

HASH FUNCTION

Core

The Blockchain Technology

Demo: http://www.blockchainnigeria.group/blog/explaining-bitcoin-hash-functions-newbie

HASH FUNCTION

Core

The Blockchain Technology

Demo: http://www.blockchainnigeria.group/blog/explaining-bitcoin-hash-functions-newbie

ENCRYPTION

Core

The Blockchain Technology

Demo: http://www.blockchainnigeria.group/blog/explaining-bitcoin-hash-functions-newbie

ENCRYPTION

Core

The Blockchain Technology

HASHING VS ENCRYPTION

Core

TWO-WAY

ONE-WAY

The Blockchain Technology

HASHING VS ENCRYPTION

Core

Hashing is used to validate the integrity of the content by detecting all modifications and thereafter changes to a hash output. Encryption encodes data for the primary purpose of maintaining data confidentiality and security. It requires a private key to reverse encrypted text to plain text.

The Blockchain Technology

KEY-PAIR ENCRYPTION FOR WALLET SERVICES

Core

TRANSACTIONS ARE HASHED AND STORED IN BLOCKS

Public/ Private key pairs

The Blockchain Technology

  • DATA LAYER

  • NETWORKING/ GOSSIP LAYER

  • CONSENSUS LAYER

  • APPLICATION LAYER

COMPONENTS

The Blockchain Technology

  • DATA LAYER

COMPONENTS

Data is Hashed

Data is stored in Blocks

Transactions are hashed together to make transaction root (MERKLE)

Transaction Root prove the existence of a transaction. (MERKLE ROOT)

The Blockchain Technology

  • DATA LAYER : Blocks

COMPONENTS

Blocks are time-Stamped

Nonce

Previous block transactions

Merkle Root Transactions

(Merkle Tree is used to cheaply prove the existence of a piece of data without validating the entire data set)

The Blockchain Technology

  • DATA LAYER : Blocks

COMPONENTS

The Blockchain Technology

  • DATA LAYER : Transactions

COMPONENTS

Bitcoin TX contain:

Transaction Input

Transaction Output

Transaction Amount/ Value

"Scripts"

Ethereum TX Additionally contains Smart Contract

 

The Blockchain Technology

A smart contract is a piece of computer code that describes a transaction step by step. It can connect to multiple blockchains, tracking multiple assets, so it can swap those assets as needed to execute the transaction.

Smart Contract

DATA LAYER

The Blockchain Technology

Typically Smart Contracts contain:

Arrays, Triggers, Functions, Variables, "If" statements, Constructs etc.

Smart Contract

DATA LAYER

The Blockchain Technology

https://remix.ethereum.org/#version=soljson-v0.4.11+commit.68ef5810.js

Sample Smart Contract

DATA LAYER

The Blockchain Technology

Bitcoin Networking Protocol

Ethereum DEVP2P

SPV/Light/Thin clients. (Only verify certain information from full nodes, such as block headers etc.)

NETWORKING/ GOSSIP LAYER

Also Known as Protocol Layer

The Blockchain Protocols

The term “protocol” refers to the “cryptoeconomic rules” that are enforced by a blockchain in order to maintain distributed consensus across the blockchain's peer-to-peer network.

Cryptocurrencies/ Tokens

A trustless Peer-to-Peer "Cash System" to prevent double spend!

– Satoshi Nakamoto, 09 January 2009

Decentralized

 

Censorship proof

 

Control Resistant

The Blockchain Technology

Rules on how nodes on a network interact and agree on how to accept and validate transaction.

Network State:

Provides Security and immutability

Block chaining algorithm

Proof -of-Work

Proof-of -Stake

Others.....

CONSENSUS LAYER

How new Cryptocurrencies are Created

Satoshi in Bitcoin, set the rules for "miners".

They need to invest some work (Processing Power) of their computers to qualify for this task.

They have to find a "hash" – a product of a cryptographic function – that connects the new block with its predecessor.

This is called the Proof-of-Work. In Bitcoin, it is based on the SHA 256 Hash algorithm.

Blockchain Demo

https://anders.com/blockchain/

 

https://anders.com/blockchain/hash.html

Hash, Blocks, Blockchain, Distributed, Tokens, Coinbase Transactions

TYPES OF BLOCKCHAIN

 

A true Blockchain has to be Decentralized & Distributed.

TYPES OF BLOCKCHAIN

 

Public, Private, Consortium Blockchains exist.

Section 2

BUILDING BLOCKCHAIN APPLICATIONS

DECIDE WHERE & WHAT TO BUILD

 

BITCOIN NETWORK

 

ETHEREUM NETWORK (EVM)

 

RIPPLE

 

YOUR OWN BLOCKCHAIN PROTOCOL

Section 2

BUILDING BLOCKCHAIN APPLICATIONS

Section 2

BUILDING BITCOIN APPLICATIONS

Bitcoin Application Development requires that the developer should possess
some of the following coding skills:

C++, Java, Objective-C, Python,
Javascript, Java, GO and Ruby

https://github.com/jashmenn/bitcoin-reading-list

Section 2

BUILDING BITCOIN APPLICATIONS

Build apps that issue and verify blockchain-based certificates for academic credentials, professional certifications, workforce development, and civic records.

What can you build on Bitcoin Blockchain

Section 2

BUILDING  ETHEREUM  APPLICATIONS

For Most Developers, learning to use a new platform, language, or framework will be a familiar task repeated dozens of times during their career. But learning to develop for a completely different paradigm is another ball game entirely.

 The decentralised consensus network, the blockchain, and its most well known implementation ‘bitcoin’ are not well understood even amongst the tech community and the subtleties of how this technology is fundamentally different from what we have used before is certainly lost on most of the general public.

Section 2

BUILDING  ETHEREUM  APPLICATIONS

The Ethereum Virtual Machine is the primary innovation of the Ethereum project. This is a virtual machine designed to be run by all participants in a peer to peer network, it can read and write to a blockchain both executable code and data, Verify digital signatures, and is able to run code in a quasi-Turing complete manner. It will only execute code when it receives a message verified by a digital signature, and the information stored on the blockchain tells it is appropriate to do so.

Ethereum Virtual Machine 

Section 2

BUILDING  ETHEREUM  APPLICATIONS

YOU CAN BUILD:

  • A tradeable token with a fixed supply
  • A central bank that can issue money
  • A puzzle-based cryptocurrency
  • A virtual organization where members vote on issues
  • A transparent association based on shareholder voting
  • Your own country with an unchangeable constitution
  • A better delegative democracy

https://ethereum.org/

DAPPs, DAOs

Section 2

BUILDING  ETHEREUM  APPLICATIONS

Setting up your development environment

Option 1: Alethzero, Mist and Mix.

Testrpc is a blockchain simulator.

It is easy to install via:
npm install -g ethereumjs-testrpc

 

Section 2

BUILDING  ETHEREUM  APPLICATIONS

Setting up your development environment

Solidity

Serpent

Development Language 

Section 2

BUILDING  ETHEREUM  APPLICATIONS

Setting up your development environment

Option 2: Truffle or Embark

After contracts are written in solidity, they are then compiled into a script
(bytecode) for the blockchain.

Section 2

BUILDING  ETHEREUM  APPLICATIONS

Setting up your development environment

The Web3 Javascript Ðapp API library provides access to the blockchain
from Javascript.

 

Web3 Javascript Ðapp API library

Section 2

BUILDING  ETHEREUM  APPLICATIONS

Setting up your development environment

Browser Based IDEs

The Solidity real-time compiler (https://remix.ethereum.org)

Sample Ethereum Dapps

https://www.stateofthedapps.com

Helpful Resources

Visit this site to read documentation on how to use Remix IDE.
https://remix.readthedocs.io/en/latest/

You can find a comprehensive Ethereum reading list from this link:
https://github.com/Scanate/EthList

Here is also a Blockchain/ Crypto reading list:
http://startupmanagement.org/2017/06/06/the-ultimate-reading-list-forblockchain-token-and-cryptocurrency-sources/

Wrapping up

Questions?

Get My Book!

http://blockchainnigeria.group/pay

About Me

https://web.facebook.com/chimezie.chuta

 

https://twitter.com/mezie16

 

https://www.linkedin.com/in/chimeziechuta

 

https://slides.com/chuta

Coordinator:  Blockchain Nigeria User Group

http://blockchainnigeria.group


Founder: StartUPBits.fund | Ayori.io | fragcom.com

Thank You!

Blockchain Technology: A High Level Primer for Developers

By Chimezie Chuta

Blockchain Technology: A High Level Primer for Developers

Understanding Key Technical Concepts in Building on the Blockchain. This is a Knowledge Sharing Session at ITEX Integrated Technologies Limited. Presenter: Chimezie Chuta, Lead Dev Blockchain Nigeria User Group

  • 500
Loading comments...

More from Chimezie Chuta