De git à la blockchain

Post on 15-Feb-2017

185 views 0 download

Transcript of De git à la blockchain

De git àla blockchain

Snowcamp 2017 - @sabativi

Victor SabatierFreelance Web and mobile

developper.

Build stuff using Meteor, React and React native.

Love learning and sharing

victor@reactivic.com

Snowcamp 2017 - @sabativi

Plan :1. Deeper look into git

2. How Blockchain works ?3. Links between the two4. Bonus and conclusion

Snowcamp 2017 - @sabativi

A deeper look into git.Snowcamp 2017 - @sabativi

Some advantages :· Local operations.

· Integrity.· Everyone has a copy of the

entire repo.· Few operations are

destructive.

Snowcamp 2017 - @sabativi

Git is purely functional data structure.

Snowcamp 2017 - @sabativi

A functional data structure is an immutable data structure.

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

CommitingSnowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

AmendingSnowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

BranchingSnowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

RebasingSnowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

BlockchainSnowcamp 2017 - @sabativi

BlockchainBitcoin

Snowcamp 2017 - @sabativi

How is Bitcoin working ?

Snowcamp 2017 - @sabativi

Why Bitcoin ?Snowcamp 2017 - @sabativi

On internet, all trades are done with financial

institutionsSnowcamp 2017 - @sabativi

We have to trust them.Snowcamp 2017 - @sabativi

Exchange money without the need of a central

trusted partySnowcamp 2017 - @sabativi

How it works ?

Snowcamp 2017 - @sabativi

Decentralized ledger.Snowcamp 2017 - @sabativi

How to reach a concensus on a peer to peer Network ?

Snowcamp 2017 - @sabativi

Problems to solve· Identification ?

· Enough money ?· How to avoid double

spending ?

Snowcamp 2017 - @sabativi

Every transaction is signed with a private key.

Snowcamp 2017 - @sabativi

Transactions have inputs that reference

previous outputs transactions.

Snowcamp 2017 - @sabativi

Transaction chainSnowcamp 2017 - @sabativi

How to avoid double spending ?

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Order problem

Snowcamp 2017 - @sabativi

How to agree on an order ?

Snowcamp 2017 - @sabativi

We cannot depend on time as it is easily

falsifiable.Snowcamp 2017 - @sabativi

Blockchain.Snowcamp 2017 - @sabativi

BlockSnowcamp 2017 - @sabativi

Answer to a Mathematical problem

Hard to solve, easy to verify.

Snowcamp 2017 - @sabativi

SHA256(block, nonce) < yProof of work 2

2 Due to SHA256 construction, random guess or brute force is your best choice to find a solution.

Snowcamp 2017 - @sabativi

MinersSnowcamp 2017 - @sabativi

First person to find a solution will broadcast the block to the

networkSnowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

Several possible branches

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

You always switched to the longuest branch.

Snowcamp 2017 - @sabativi

Snowcamp 2017 - @sabativi

We have replace Trust in Finance by trust in Math.

Snowcamp 2017 - @sabativi

Half of nodes must be honnest.

Snowcamp 2017 - @sabativi

Links between blockchain and git

Snowcamp 2017 - @sabativi

Is git a blockchain ?Snowcamp 2017 - @sabativi

· Changes are organized in a chain protected by

cryptographic hashes.· Distributed storage and

integrity checks.· Identification is secure.

· Blocks and commits used Merkle trees internally.

Snowcamp 2017 - @sabativi

· Everyone strives to work on a single branch.

· No merge, no fork in blockchain.

· No proof of work in git.· Limited content on a block.

Snowcamp 2017 - @sabativi

In Git content mattersregardless of the branch,

in Blockchain consensus mattersregardless of the content.

Snowcamp 2017 - @sabativi

Is Bitcoin a git repository ?

Snowcamp 2017 - @sabativi

From Bitcoin to GitcoinOr how to turn a git repository into a blockchain

Snowcamp 2017 - @sabativi

DemoSnowcamp 2017 - @sabativi

ConclusionsSnowcamp 2017 - @sabativi

Thanks folksQ&A

Snowcamp 2017 - @sabativi