SlideShare ist ein Scribd-Unternehmen logo
1 von 19
by
Topalidis Georgios
under the supervision of
Professor Stefanidis Georgios
12 February 2016
University of Macedonia
Department of Applied Informatics
Bachelor’s Thesis: Analyzing and Programming the
Basic Transactions of Bitcoin System
Purpose of Thesis
 Analyzing the Basic Transactions and executing the
Scripts, in stack which are responsible for their behavior in
Bitcoin system.
 Programming the Basic Transactions with the aid of
BitcoinJ(library of Java).
Contents
 What is Bitcoin?
 Features of Bitcoin
 Node Types and Roles
 The Technology Behind Bitcoin
 The Basic Mechanism
 Structure of an Elliptic Key
 Public Key to Bitcoin Address
 Anatomy of a Transaction
 Inputs and Outputs of a Transaction
 Thinking in Transaction Scripts
 Basic Transactions and Scripting Language
 A Pay-to-Pub-Key-Hash Transaction
 Execution in Stack
 Applications of Bitcoin Scripts
 Facts
What is Bitcoin?
 Is a global currency
 Around since January of 2009
 Peer-to-peer/decentralized
 Trading over the Internet
 Protocol is open source
 Somewhat anonymous
 Protected by strong encryption(cryptocurrency)
Features of Bitcoin
 All-electronic
 Provable value
 Fast transactions
 Low-cost transactions
 No third-party trust required
 Uncontrollable(Decentralized)
 Deflationary (Maximum 21M issued)
 International
 Widely accepted as a currency
Node Types and Roles
Bitcoin System
Wallet
Network
Routing
Node
B
Full
Blockchain
Miner
The Technology Behind Bitcoin
 Cryptographic Hash Functions(SHA256,RIPEMD160)
 Proof-of-Work(hash cash proof) miners must solve the
problem:
H (nonce || prev_hash||tx||tx) <target
 Elliptic curve Digital Signature Algorithm (ECDSA)
 (sk,pk) := generateKeys(keysize)
 sig := sign(sk,message)
 isValid :=verify(pk,message,sig)
 Merkle Tree
S
c
h
e
m
e
The Basic Mechanism
1
TX1 Published
to the P2P
network
2
3TX1 added to my
block
My Block
Coinbase
TX
TX1
.
TXn
N-2
CB TX
Tx1
.
.
Txn
4
N-1
CB TX
Tx1
.
.
Txn
N=My Block
CB TX
Tx1
.
.
Txn
The Blockchain 25
BT
C
Structure of an Elliptic Key
Private Key: k Public Key : K
K=k*G
G: generator point of elliptic
curve
Public Key to Bitcoin Address
Public Key: K
SHA256(K)
RIPEMD(SHA256(K))
Base58Check
Encoding
Bitcoin Address
Anatomy of a Transaction
‘‘hash’’ : 5a425…
 metadata ‘‘vin_sz’’ :1
‘‘vout_sz’’ :1
In : [ ‘‘prev_out’’:{
‘‘hash’’: 3be4a…
 inputs ‘‘n’’ : 0 }
‘‘Unlocking Script’’ : ‘’30440… ‘’
]
Out : [
{
 outputs ‘‘value’’: 10.12286732
‘‘Locking Script’’ : ‘’OP_DUP OP_HASH160 69e….42e
OP_EQUALVERIFY OP_CHECKSIG ‘’ }
]
Inputs and Outputs of a Transaction
 Inputs:
 Value in BTs which is going to be spend if the receiver holds a valid signature in
Unlocking Script.
 This value came from a previous TX which still has unspent outputs (UTXO).
 Outputs from previous TX becoming Inputs of present TX.
 Outputs:
 Set the conditions, in the Locking Script, which have to be fulfilled in order the
receiver to be able to redeem the BTs.
Thinking in Transaction Scripts
 A new transaction is valid if the transaction scripts of its
input field and the transaction script of its preceding
validates to true.
Input TX Unlocking
Script
Output TX Locking
Script
Validation Script
[Unlocking Script, Locking Script
Basic Transactions and Scripting Language
Basic Transactions
1) Pay-to-Public-Key-Hash Transaction (P2PKH)
2) Pay-to-Public-Key Transaction (Coinbase
Transactions)
3) Multi-Signature Transaction
4) Pay-to-Script-Hash Transaction (P2SH)
5) Data Output Transaction (OP_RETURN)
Scripting Language
 Stack-based
 Every instruction is executed exactly once, in a linear
Example
follows
A Pay-to-Pub-Key-Hash Transaction
Therefore the Validation script looks like:
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
Unlocking Script
<sig>
<pubKey>
Locking
Script(from the
previous UTXO)
OP_DUP
OP_HASH160
<pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
Execution in Stack
STACK
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY
OP_CHECKSIG
<sig>
<pubKey>
<pubKey><pubKeyHash>
<pubKeyHash>
True
Applications of Bitcoin Scripts
 Escrow Transactions
Introduce a third party and implement a MULTISIG(2-of-3)
Transaction.
 Green Addresses
Being able to send BTs without the recipient being able to
access the Blockchain. Example: Mt.Gox(Bitcoin Exchange
company)bankruptcy
 Efficient Micro-Payments
Being able to pay small amounts of money for some
provided service
Facts
 Current Bitcoin Price: 1BT=376.95 euros (11/2/2016)
 Reward for finding blocks: 25BT
every 4 years this price is divided by 2 (200950BT,
201225BT)
 Hash Rate=1,031,625,717 GH/s, 1GH/s=109 H/s
(7/2/2016)
every 10 minutes a new block is going to be mined
 Number of blocks so far: 397933 (11/2/2016)
every block can include maximum 4000 transactions
Thank you
description of Java projects is following…

Weitere ähnliche Inhalte

Was ist angesagt?

Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Svetlin Nakov
 
Hello world contract
Hello world contractHello world contract
Hello world contractGene Leybzon
 
The Bitcoin Rocketship @ BTC Miami 2015
The Bitcoin Rocketship @ BTC Miami 2015The Bitcoin Rocketship @ BTC Miami 2015
The Bitcoin Rocketship @ BTC Miami 2015Jeff Garzik
 
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Alex Chepurnoy
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in BlockchainsAlex Chepurnoy
 
Tutorial s crypto api session keys
Tutorial   s crypto api session keysTutorial   s crypto api session keys
Tutorial s crypto api session keysDr. Edwin Hernandez
 
Scorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkScorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkAlex Chepurnoy
 
Blockchain For Developers
Blockchain For DevelopersBlockchain For Developers
Blockchain For DevelopersAlex Chepurnoy
 
Blockchain Тechnology - Introduction
Blockchain Тechnology - IntroductionBlockchain Тechnology - Introduction
Blockchain Тechnology - IntroductionGalin Dinkov
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12Aludirk Wong
 
Blockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoinBlockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoinAludirk Wong
 
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)Svetlin Nakov
 
Smart contracts in Solidity
Smart contracts in SoliditySmart contracts in Solidity
Smart contracts in SolidityFelix Crisan
 
Bitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfestBitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfestAlberto Gomez Toribio
 
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)Svetlin Nakov
 

Was ist angesagt? (19)

Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
 
Blockchain Properties
Blockchain PropertiesBlockchain Properties
Blockchain Properties
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
Hello world contract
Hello world contractHello world contract
Hello world contract
 
Oracles
OraclesOracles
Oracles
 
The Bitcoin Rocketship @ BTC Miami 2015
The Bitcoin Rocketship @ BTC Miami 2015The Bitcoin Rocketship @ BTC Miami 2015
The Bitcoin Rocketship @ BTC Miami 2015
 
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in Blockchains
 
Tutorial s crypto api session keys
Tutorial   s crypto api session keysTutorial   s crypto api session keys
Tutorial s crypto api session keys
 
Scorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkScorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain Framework
 
Introduction solidity
Introduction solidityIntroduction solidity
Introduction solidity
 
Blockchain For Developers
Blockchain For DevelopersBlockchain For Developers
Blockchain For Developers
 
Blockchain Тechnology - Introduction
Blockchain Тechnology - IntroductionBlockchain Тechnology - Introduction
Blockchain Тechnology - Introduction
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12
 
Blockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoinBlockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoin
 
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018)
 
Smart contracts in Solidity
Smart contracts in SoliditySmart contracts in Solidity
Smart contracts in Solidity
 
Bitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfestBitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfest
 
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
 

Ähnlich wie Presentation_Topalidis_Giorgos

“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...Dace Barone
 
Bitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currencyBitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currencyShivek Khurana
 
NaPoleonX : introducing the world first blockchained index publisher
NaPoleonX : introducing the world first blockchained index publisherNaPoleonX : introducing the world first blockchained index publisher
NaPoleonX : introducing the world first blockchained index publisherNaPoleonX
 
LINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer Tools
LINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer ToolsLINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer Tools
LINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer ToolsICON Foundation
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodGalin Dinkov
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introductionSander Demeester
 
J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6Jesse Burke
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computingYongraeJo
 
Blockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentationBlockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentationPaperchain
 
Bitcoin and Blockchain
Bitcoin and BlockchainBitcoin and Blockchain
Bitcoin and BlockchainChen Wu
 
Introduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractIntroduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractThanh Nguyen
 
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital DisruptionWSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital DisruptionWSO2
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroTal Shmueli
 
Bitcoin developer guide
Bitcoin developer guideBitcoin developer guide
Bitcoin developer guide承翰 蔡
 
Mining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoinMining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoinDeepu S Nath
 
Switcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo
 
Through the looking glass (of the blockchain)
Through the looking glass (of the blockchain)Through the looking glass (of the blockchain)
Through the looking glass (of the blockchain)Alessandro Confetti
 

Ähnlich wie Presentation_Topalidis_Giorgos (20)

“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
 
Bitcoin.pdf
Bitcoin.pdfBitcoin.pdf
Bitcoin.pdf
 
Bitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currencyBitcoin : A fierce Decentralized internet currency
Bitcoin : A fierce Decentralized internet currency
 
NaPoleonX : introducing the world first blockchained index publisher
NaPoleonX : introducing the world first blockchained index publisherNaPoleonX : introducing the world first blockchained index publisher
NaPoleonX : introducing the world first blockchained index publisher
 
LINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer Tools
LINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer ToolsLINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer Tools
LINE+LINK-DEV 2018 - ICON’s Interchain Technology and Developer Tools
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
Tribeflow on bitcoin data
Tribeflow on bitcoin dataTribeflow on bitcoin data
Tribeflow on bitcoin data
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introduction
 
J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6
 
Blockchain Corporate Style
Blockchain Corporate StyleBlockchain Corporate Style
Blockchain Corporate Style
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computing
 
Blockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentationBlockchain, cryptography and tokens — NYC Bar presentation
Blockchain, cryptography and tokens — NYC Bar presentation
 
Bitcoin and Blockchain
Bitcoin and BlockchainBitcoin and Blockchain
Bitcoin and Blockchain
 
Introduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractIntroduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart Contract
 
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital DisruptionWSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
Bitcoin developer guide
Bitcoin developer guideBitcoin developer guide
Bitcoin developer guide
 
Mining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoinMining Opportunities of Block Chain and BitCoin
Mining Opportunities of Block Chain and BitCoin
 
Switcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart Contracts
 
Through the looking glass (of the blockchain)
Through the looking glass (of the blockchain)Through the looking glass (of the blockchain)
Through the looking glass (of the blockchain)
 

Presentation_Topalidis_Giorgos

  • 1. by Topalidis Georgios under the supervision of Professor Stefanidis Georgios 12 February 2016 University of Macedonia Department of Applied Informatics Bachelor’s Thesis: Analyzing and Programming the Basic Transactions of Bitcoin System
  • 2. Purpose of Thesis  Analyzing the Basic Transactions and executing the Scripts, in stack which are responsible for their behavior in Bitcoin system.  Programming the Basic Transactions with the aid of BitcoinJ(library of Java).
  • 3. Contents  What is Bitcoin?  Features of Bitcoin  Node Types and Roles  The Technology Behind Bitcoin  The Basic Mechanism  Structure of an Elliptic Key  Public Key to Bitcoin Address  Anatomy of a Transaction  Inputs and Outputs of a Transaction  Thinking in Transaction Scripts  Basic Transactions and Scripting Language  A Pay-to-Pub-Key-Hash Transaction  Execution in Stack  Applications of Bitcoin Scripts  Facts
  • 4. What is Bitcoin?  Is a global currency  Around since January of 2009  Peer-to-peer/decentralized  Trading over the Internet  Protocol is open source  Somewhat anonymous  Protected by strong encryption(cryptocurrency)
  • 5. Features of Bitcoin  All-electronic  Provable value  Fast transactions  Low-cost transactions  No third-party trust required  Uncontrollable(Decentralized)  Deflationary (Maximum 21M issued)  International  Widely accepted as a currency
  • 6. Node Types and Roles Bitcoin System Wallet Network Routing Node B Full Blockchain Miner
  • 7. The Technology Behind Bitcoin  Cryptographic Hash Functions(SHA256,RIPEMD160)  Proof-of-Work(hash cash proof) miners must solve the problem: H (nonce || prev_hash||tx||tx) <target  Elliptic curve Digital Signature Algorithm (ECDSA)  (sk,pk) := generateKeys(keysize)  sig := sign(sk,message)  isValid :=verify(pk,message,sig)  Merkle Tree S c h e m e
  • 8. The Basic Mechanism 1 TX1 Published to the P2P network 2 3TX1 added to my block My Block Coinbase TX TX1 . TXn N-2 CB TX Tx1 . . Txn 4 N-1 CB TX Tx1 . . Txn N=My Block CB TX Tx1 . . Txn The Blockchain 25 BT C
  • 9. Structure of an Elliptic Key Private Key: k Public Key : K K=k*G G: generator point of elliptic curve
  • 10. Public Key to Bitcoin Address Public Key: K SHA256(K) RIPEMD(SHA256(K)) Base58Check Encoding Bitcoin Address
  • 11. Anatomy of a Transaction ‘‘hash’’ : 5a425…  metadata ‘‘vin_sz’’ :1 ‘‘vout_sz’’ :1 In : [ ‘‘prev_out’’:{ ‘‘hash’’: 3be4a…  inputs ‘‘n’’ : 0 } ‘‘Unlocking Script’’ : ‘’30440… ‘’ ] Out : [ {  outputs ‘‘value’’: 10.12286732 ‘‘Locking Script’’ : ‘’OP_DUP OP_HASH160 69e….42e OP_EQUALVERIFY OP_CHECKSIG ‘’ } ]
  • 12. Inputs and Outputs of a Transaction  Inputs:  Value in BTs which is going to be spend if the receiver holds a valid signature in Unlocking Script.  This value came from a previous TX which still has unspent outputs (UTXO).  Outputs from previous TX becoming Inputs of present TX.  Outputs:  Set the conditions, in the Locking Script, which have to be fulfilled in order the receiver to be able to redeem the BTs.
  • 13. Thinking in Transaction Scripts  A new transaction is valid if the transaction scripts of its input field and the transaction script of its preceding validates to true. Input TX Unlocking Script Output TX Locking Script Validation Script [Unlocking Script, Locking Script
  • 14. Basic Transactions and Scripting Language Basic Transactions 1) Pay-to-Public-Key-Hash Transaction (P2PKH) 2) Pay-to-Public-Key Transaction (Coinbase Transactions) 3) Multi-Signature Transaction 4) Pay-to-Script-Hash Transaction (P2SH) 5) Data Output Transaction (OP_RETURN) Scripting Language  Stack-based  Every instruction is executed exactly once, in a linear Example follows
  • 15. A Pay-to-Pub-Key-Hash Transaction Therefore the Validation script looks like: <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG Unlocking Script <sig> <pubKey> Locking Script(from the previous UTXO) OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
  • 16. Execution in Stack STACK <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey> <pubKey><pubKeyHash> <pubKeyHash> True
  • 17. Applications of Bitcoin Scripts  Escrow Transactions Introduce a third party and implement a MULTISIG(2-of-3) Transaction.  Green Addresses Being able to send BTs without the recipient being able to access the Blockchain. Example: Mt.Gox(Bitcoin Exchange company)bankruptcy  Efficient Micro-Payments Being able to pay small amounts of money for some provided service
  • 18. Facts  Current Bitcoin Price: 1BT=376.95 euros (11/2/2016)  Reward for finding blocks: 25BT every 4 years this price is divided by 2 (200950BT, 201225BT)  Hash Rate=1,031,625,717 GH/s, 1GH/s=109 H/s (7/2/2016) every 10 minutes a new block is going to be mined  Number of blocks so far: 397933 (11/2/2016) every block can include maximum 4000 transactions
  • 19. Thank you description of Java projects is following…