23
UL CONFERENCE share your knowledge Bitcoin and The Blockchain An Introduction By Brian Driscoll September 29, 2016

UL Conference - An Introduction To Bitcoin And The Blockchain

Embed Size (px)

Citation preview

Page 1: UL Conference - An Introduction To Bitcoin And The Blockchain

UL CONFERENCEshare your knowledge

Bitcoin and The BlockchainAn Introduction

By Brian Driscoll

September 29, 2016

Page 2: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 2

UL CONFERENCE share your knowledgeWhat Is Bitcoin?

Bitcoin is one of many different digital currencies.

The bitcoin network is a decentralized peer to peer payment

network to used to record ownership of bitcoins and send

bitcoin to other bitcoin users.

The bitcoin network operates using the bitcoin protocol.

The bitcoin protocol records transactions into a distributed

replicated public database known as the blockchain.

Page 3: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 3

UL CONFERENCE share your knowledge

Digital Currencies Evolved Like Music File Sharing

First there was Napster. It’s fatal flaw was it had central servers that were operated by

Napster. The music industry attacked Napster, shutdown the central servers, and Napster

was over.

Others centralized music/file sharing systems which came after Napster were similarly

lawyered, sued, bullied into oblivion, i.e. FastTrack, KaZaA, Megaupload, etc.

Next came fully decentralized music/file sharing systems. Nutella is an example of a

popular one. They don’t have a central system that can be shutdown. But they had

companies which supplied the software. One of the biggest companies was

LimeWire. Rather than going after those operating the software, the music industry went

after the companies that provided the software and those company were lawyered, sued,

bullied into oblivion.

Then these decentralized systems became open source, i.e. Gnutella, BitTorrent, etc.

No company controls either the running or developing the software. There is no central

system or entity to attack.

Page 4: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 4

UL CONFERENCE share your knowledgeThe Evolution Of Digital Currencies

There were many digital currencies before bitcoin, i.e. e-gold, Liberty Reserve, b-money,

HashCash, etc. some dating back to the mid 1990s.

The creators of successful digital currencies faced the problems similar to the music/file sharing

industry.

e-gold, Liberty Reserve, and many early successful digital currencies were flawed similar to

Napster, FastTrack, KaZaA, Megaupload, LimeWire, etc. in that they had a central system or

company which could be attacked. Those that did were lawyered, sued, bullied into oblivion.

Others digital currencies were not successful because they were hard to use, had serious

technical flaws, or never reached a critical mass of users.

Bitcoin was introduced to the world in 2008 by a Bitcoin paper published under the name of

Satoshi Nakamoto.

Bitcoin elegantly combined several prior inventions from b-money and HashCash to create a

decentralized peer to peer payment system that did not rely on any central authority.

Bitcoin has spawned the creation many other decentralized peer to peer digital currencies.

Digital currencies will continue to evolve via natural selection.

Page 5: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 5

UL CONFERENCE share your knowledgeWhat’s So Good About The Blockchain?

The blockchain is the concept underlying Bitcoin and most successful digital currencies.

It is a solution the Byzantine Generals Problem. A simplified description of the problem is as

long as more than 50% of the participants are honest, the correct plan of action will be

taken, and this can be done with the participants only communicating to 1 other participant

at a time, without a central authority, and without knowing who is honest and who is not.

The blockchain is a essentially a distributed trust system with no central authority.

A distributed trust system with no central authority could be used to solve many real world

problems …

digital currencies

securities settlement

registry of share ownership

recording contracts

land/deed registries

voting

the list goes on an on

Page 6: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 6

UL CONFERENCE share your knowledgeHow Does Bit Coin Work?

The Bitcoin Network

The bitcoin network runs bitcoin without it there is no bitcoin.

It is a network of 1000s of nodes running bitcoin sever software.

It is one of the largest distributed computer networks in the world.

It has more computing power than the largest supercomputer.

It has more computing power than Google.

It consumes more electricity than many small countries.

Page 7: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 7

UL CONFERENCE share your knowledgeWho Runs The Bitcoin Network?

Bitcoin miners run the nodes in bitcoin network.

The nodes run by miners:

● Each contain a complete transaction ledger of all bitcoin transactions (the

blockchain)

● Use the bitcoin protocol to communicate

● Assemble new bitcoin transactions into a block

● Attempt to solve a complex problem called the “proof of work” on the block

● Once the problem solved, the other nodes verify the “proof of work” solution is

correct and “vote” on which node solved the problem first

● The node that was “voted” as solving the “proof of work” first is

rewarded with a block of newly issued bitcoins, receives any optional

transaction fees, and the block it processed is added to the blockchain

Page 8: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 8

UL CONFERENCE share your knowledgeWho Are Miners?

Bitcoin miners can be anyone (there are legal issues in some jurisdictions).

You must have a machine that can run a full node and connect to the bitcoin

network.

Many miners run hardware specialized for solving the “proof of work”.

Many miners join mining “collectives”.

Mining “collectives” share intermediate steps of the “proof of work” and when

possible “vote” for miners in the collective as solving the problem first.

Miners are compensated when they are “voted” as solving the “proof of work” first.

They receive newly issued bitcoin and an option transition fees paid in the

transactions in the block.

Page 9: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 9

UL CONFERENCE share your knowledgeWhat Is A Bitcoin Transaction?

A bitcoin transaction transfers an amount of bitcoins from one bitcoin

address to another bitcoin address.

Transactions are like double entry bookkeeping entries.

They contain “input” bitcoin address(s) with amounts (debits) and the “output” bitcoin address(s) with

amounts (credits).

Each “input” is an unspent transaction previously transferred to a bitcoin address.

The most common transaction is a payment which involves “change”:

● The input is a transaction is for an amount larger than the payment.

● The output is a transaction transfers the payment amount to the bitcoin address of the payee.

● And another transaction transferring the remaining amount back to the bitcoin address of the payer.

When a transaction is used as input, it can no longer be used, and is considered completely spent.

Any unspent the amount of the inputs is handled as a transaction fee payment to the miner that mined the

block containing this transaction.

Page 10: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 10

UL CONFERENCE share your knowledgeHow Is A Bitcoin Transaction Validated?

It must be signed by the private key of the bitcoin address(s) of the

transaction(s) used as input.

The amounts of input transaction(s) must be less than or equal to the output amount(s).

It must specify valid bitcoin address(s) for the output(s).

The transaction must be properly formatted according to the bitcoin protocol.

Page 11: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 11

UL CONFERENCE share your knowledgeWho “Owns” A Bitcoin?

Bitcoin is “owned” by the entity that controls the private key of the bitcoin

address of unspent transactions recorded on the blockchain.

There aren’t individually identifiable bitcoins.

Bitcoins don’t have serial numbers like US dollars.

The amount of bitcoin owned by a private key is the sum of unspent transactions

recorded on the blockchain for the bitcoin address of that private key.

Anyone with a bitcoin address’s private key can spend the bitcoin.

Page 12: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 12

UL CONFERENCE share your knowledgeBitcoin Address and Private Keys

Bitcoin relies on public key cryptography.

Public key cryptography involves a private key that must be kept secret and a public key that

can be known by all.

Bitcoin uses curve elliptic curve cryptography which is a type of public key cryptography.

The private key is a generated from a random number.

A one way cryptographic function is used to generate a public key from the private key,

It is very extremely hard to calculate the private key of a public key.

A one way cryptographic function is used to generate a bitcoin address from a public key.

The private key(s) associated with the bitcoin address(s) of unspent input transactions is

used to sign a transaction.

Using the public key, others can validate that the signature was generated by the private

key.

Page 13: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 13

UL CONFERENCE share your knowledgeAssembling Transactions Into Blocks

Bitcoin users use wallet (client) software to report transactions they would

like to execute to the bitcoin network.

The nodes in the bitcoin network validate the transactions and distribute them to

other nodes.

A mining node assembles valid outstanding transactions into a block.

The header of the block is generated from the last block recorded on the main

blockchain of that node.

Outstanding transactions are added to the block.

Currently the maximum block size is 1 Megabyte.

Transactions which pay an optional mining fee have a higher probability of being

added to a block.

Outstanding transactions will be added to future blocks.

Page 14: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 14

UL CONFERENCE share your knowledgeMining Blocks – Proof Of Work

The mining node will then attempt solve the “proof of

work” problem using the new block as input data.

The “proof of work” is computationally expensive to solve.

While the solution is very easy to verify.

The bitcoin network nodes takes about 9 minutes to

solve the problem.

The complexity of the “proof of work” problem is periodically

adjusted to be harder to solve. So as nodes increase in

computing power, the problem still take about 9 minutes to

solve.

Page 15: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 15

UL CONFERENCE share your knowledgeMining Blocks – Recording New Blocks

When a new block is mined, the mining node adds the

“proof of work” solution to the block and adds the new

block as the next block in its main blockchain.

A newly mined block added to the blockchain as a child of the

of the previous block on which its header was calculated.

It then communicates new block on the blockchain to the

other nodes.

Page 16: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 16

UL CONFERENCE share your knowledgeMining Blocks – Blockchain Records

The blockchain is a linked list of blocks of transactions.

The first block is the genesis block.

Each block is linked as a child of the parent block in its header.

Nodes maintain 3 sets of blocks:

● Blocks connected to the main blockchain

● Blocks on branches off the main blockchain

● Orphaned blocks

The main blockchain is the chain of blocks with the most “proof of

work”, usually the chain with the most blocks.

All full nodes have a complete blockchain of all transaction ever executed.

Page 17: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 17

UL CONFERENCE share your knowledgeMining Blocks – Voting

When a new valid block is received, a node will try to add it to its

existing blockchain.

It will add the block as a child of the parent block in its header.

Most of the time the block be the tip of the main chain.

Sometimes the new block extends a chain which is a branch off the main

chain.

If branch has more “proof of work” (becomes longer) than the main chain,

then the node will select the branch as its new main chain and make the

old main chain a branch.

If the main chain is extended or changed, the miner will discard the

block it currently mining, and begin mining a new block based on the

tip of the main chain.

Page 18: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 18

UL CONFERENCE share your knowledgeConfirming Transactions

Transactions are unconfirmed until they appear in the main chain of

the blockchain.

Normally this takes about 10 minutes.

However, when the bitcoin network is busy or when the blockchain has

branched it may take longer.

Due to branching, the block containing a confirmed transaction may be

branched and discarded.

The more blocks in the main chain that are on top of the block containing

the transaction, the higher the level of confirmation.

For small transactions 1 level of confirmation is probably sufficient, for

larger transactions multiple levels of confirmation may be warranted.

Page 19: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 19

UL CONFERENCE share your knowledgeMining Blocks – Creation Of New Bitcoin

New bitcoins are added each time a block is successfully mined.

The amount of bitcoins awarded for each block started at 50 bitcoins per

block and is halved every 210,000 blocks (about every 4 years).

In 2009 it was 50 bitcoins per block, in 2012 it was 25 bitcoins, in 2016 it

is 12.5.

This will continue until there are 21 million blocks issued which will

happen around the year 2040.

After this point no new bitcoins will be issued.

Page 20: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 20

UL CONFERENCE share your knowledgeEvolution Will Continue

Bitcoin, digital currencies, and the blockchain will continue to evolve

based on survival of the fittest.

The current crop of digital currencies and technologies is better than their

ancestors, but they have flaws too …

Page 21: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 21

UL CONFERENCE share your knowledgeIssues For Bitcoin and Digital Currencies

The bitcoin network can only handle 10s of transactions per second due

to the block size and mining rate.

If one miner or group of miners controls more than 50% of the compute

power of the bitcoin network, they can subvert the currency.

Software flaws can cripple digital currencies.

The encryption on which digital currencies are based may eventually not

be strong enough.

Will enough miners continue to be sufficiently incentivized to participate in

the bitcoin network.

Page 22: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 22

UL CONFERENCE share your knowledgeBitcoin Has Spawned More Innovation

Bitcoin and the blockchain have spawned an enormous amount of

innovation:

● New digital currencies

● New technologies for digital currencies

● New applications the technologies besides digital currencies

Page 23: UL Conference - An Introduction To Bitcoin And The Blockchain

September 29, 2016© ULLINK 2016 23

UL CONFERENCE share your knowledgeMore Bitcoin and Blockchain Info

For those interested in learning more about bitcoin and the blockchain …

● Read the book Mastering Bitcoin by Andreas M. Antonopoulos, much

of the info in this presentation came from that book.

● Andreas M. Antonopoulos has spoken at many conferences and

forums about bitcoin. Many of those are online in YouTube. The

concept of digital currency evolving like file sharing is something he

spoke about.

● Read the original paper published by Satoshi Nakamoto.

● bitcoin.org