Session 3 introduction blockchain by franco 22 januari
1. AGENDA
The Trust Paradigm Shift
Evolution of Blockchain & Smart Contracts
Blockchain What is it & How it works
Classification of Blockchains
Smart Contract What is it & How it works
Use cases
--------------------ADDENDUM--------------------
Consensus & Hash pointers
Introduction to
Blockchain
&
Smart Contracts
Franco De Vita 22 January 2021
5. Evolution of Blockchain & Smart Contracts
1994 2009 2012 2013 2014 2015 2016 2017 2018 2019 2020
rise testing maturity mass adoption
Nick
Szabo
Bitcoin Satoshi Nakamoto
Bitcoin
basic smart contract
proof of concept early adopters
law
&
regulations
applications of new
services
in various sectors
1991
Cryptographically secured chain of blocks
1998
Bit Gold Decentralized digital currency
Permissioned Blockchains
6.
7. Blockchain What is it
A transparent and distributed append-only
repository, implemented as a P2P network
Note: some blockchains are not transparent,on a
permissioned blockchain data is shared on a need
to know basis
Fault
tolerant
8. Blockchain What is it
Properties:
Linked list of blocks
Each block contains a set of transactions
Each block is timestamped
List of blocks is shared across nodes
Immutable
9. Blockchain How it works
Each transaction is digital signed Each transaction is validated by a selected
group of nodes and grouped together in a
temporary block. A node is selected (in
accordance with the used consensus
protocol) to forge the next block on the
chain.
The next block is broadcasted and
arithmetically linked to the chain of each
node as a permanent and immutable record
of transactions.
SIGNATURE VALIDATION DISTRIBUTION
3
12. Smart Contract What is it
Software procedures that execute the terms of
a set of rules, which are agreed upon by the
involved parties. The code of a smart contract
is stored on a blockchain, therefore it is
immutable.
The code is executed on multiple nodes. As a
result of which, smart contract needs to be:
Deterministic
Terminable
Isolated
13. Micro insurance
contract Micro {
function Micro() { // initialisation @ deployment
// constant fee= € x,-
// ...
}
function confirmInsurance() { // initiated by user
// confirmation conditions agreed
// payment has been made
// registration
}
function confirmDelay() { // initiated by backend
// Schiphol
// confirmation delay > 2 hours
// payment of agreed fee
}
}
14. Smart Contract How it works
contract Micro { … }
Micro.confirmInsurance()
Micro.confirmDelay()
Deployment Initiated by user
(browser)
Initiated by
backend Schiphol
t0 t1 t2
15. 1. Create 2. Deployment 3. Execution
Coding
(Defining conditions
between parties)
Smart Contract is stored in a
block
&
execution of the
initialisation function
An event (condition) triggers
a specific function of the Smart
Contract
Execution ends when all
conditions, as agreed in step 1,
are met
or
the smart Contract is aborted
Central authority
and
third parties
compliancy and reporting
Smart Contract Lifecycle
27. one way cryptographic hash function
One way cryptographic hash function
input hash()
9014b4cd68f8bce3f2d15e8c8727cbeb22444d5d62e8f9a45dd0b8dd174ef788
302fd87968d492ee0d53c71ddb21eaad86740e2382cbaef230bac879b19fd16c
digest | hash
Possible inputs
Possible
outputs
Hash function
29. Pointer to previous transaction
CA -> B
Pay CoinA to pkB
SignatureA
Hash pointer
PrevTrans
A
30. What is consensus
Agreement on the state of the ledger
When is a transaction valid?
Which transactions have taken place?
When did a transaction take place?
When is a block (set of transactions) valid?
3
31. When is a transaction valid?
CA -> B
CA -> X
Pay CoinA to pkB
SignatureA
Hash pointer
Pay CoinA to pkX
SignatureA
Hash pointer
PrevTran
sA
Double-
spend
attempt
32. Which transactions have taken place?
CA -> B
CA -> X
1 2 3
Nr. of
confirmations
Double-
spend
attempt
33. When did a transaction take place?
coinbase transaction
merkle root
timestamp
nonce
nBits | target threshold
previous block hash
version