all aboard the blockchain!

36
All aboard the blockchain! whoami: Przemek Nowakowski @ TSH email: [email protected] gh: https://github.com/lapisangularis

Upload: the-software-house

Post on 17-Mar-2018

38 views

Category:

Technology


2 download

TRANSCRIPT

All aboard the blockchain!

whoami: Przemek Nowakowski @ TSHemail: [email protected]: https://github.com/lapisangularis

why such hype?

the history

“The first blockchain was conceptualised by a person (or group of people) known as

Satoshi Nakamoto in 2008. It was implemented the following year by Nakamoto as a core

component of the cryptocurrency bitcoin, where it serves as the public ledger for all

transactions on the network. Through the use of a blockchain, bitcoin became the first

digital currency to solve the double spending problem without requiring a trusted

authority and has been the inspiration for many additional applications.”

blockchain definition

“A blockchain is a ledger of facts, replicated across several computers assembled in a

peer-to-peer network. Facts can be anything from monetary transactions to content

signature. Members of the network are anonymous individuals called nodes. All

communication inside the network takes advantage of cryptography to securely identify

the sender and the receiver. When a node wants to add a fact to the ledger, a consensus

forms in the network to determine where this fact should appear in the ledger; this

consensus is called a block.”

in nutshell

- distributed database- contains history of facts

- splitted into blocks- secured with cryptography- using consensus algorithms to provide integrity across nodes

the beginning - p2p network

double spend problem

consensus algorithms

- proof of work (PoW)

- proof of stake (PoS)

- delegated proof of stake (DPoS)

- proof of importance (PoI)

- proof of: weigth, bandwidth, space, authority, type something and i’m sure it exists…

- byzantine fault tolerance (BFT)

- raft

- paxos

- directed acyclic graphs (DAGs) 

blocks

- previous block hash

- facts/transactions

- merkle root hash (in case of transactions - cryptocurrencies)

- difficulty adjustment bits

- nonce

mining

wait, what?

proof of work - first encounter

- nodes can receive facts in different abbreviations- nodes can receive invalid, fake, or duplicated facts- nodes can spam the network with transactions- without consensus system is open for DoS and Sybil attacks

proof of work - diving deeper

- SHA256 hash contains facts/transactions, previous block hash and nonce

- nonce as only mutable data in block in order to calculate hash without loses

- winning combination should output hash with proper n of zeros in the beginning

cryptocurrency jump off

- adjustable block mining difficulty- facts as transactions- predefined currency amount in system- rewards for miners- fees for transaction senders

contracts!

- executing programs on nodes- conditional transactions- decentralized apps (DApps)- IoT

use cases?

use cases

- digital banking- digital identity- decentralized apps- internet of things- voting systems- decentralized object storage

steemit

Steemit is a social media platform where everyone gets paid for creating and curating content. It leverages a robust digital points system (Steem) for digital rewards.

production usage?

hyperledger & ethereum

- hyperledger fabric

- hyperledger iroha

- hyperledger sawtooth

- ethereum platform

- IBM blockchain

live demo!

what is it?

- blockchain structure based on naivechain

- http api and p2p websocket connection between nodes

- no cryptocurrency

- asset storage and selection with help of consensus

- written in node.js

- very dirty and ugly code… but working!

blockchain class

block class

assets & rewards

message types & constants

mining block

block validation

let’s start

this is the end

thanks for watching and listening!

… questions?