|
|
<div class="container-fluid bg-grey">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-8">
|
|
|
<h2>A digital currency</h2>
|
|
|
<p>
|
|
|
<small><i>From Wikipedia, the free encyclopedia</i></small><br>
|
|
|
Bitcoin is a cryptocurrency and a digital payment system invented by an unknown programmer, or a group of programmers, under the name Satoshi Nakamoto.It was released as open-source software in 2009.<br>
|
|
|
The system is peer-to-peer, and transactions take place between users directly, without an intermediary.These transactions are verified by network nodes and recorded in a public distributed ledger called a blockchain. Since the system works without a central repository or single administrator, bitcoin is called the first decentralized digital currency.<br>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="col-sm-4 align-middle">
|
|
|
<img src="articles/ARTICLE/images/bitcoin.jpg" width="100%; height: auto"></img>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-4 align-middle">
|
|
|
<img src="articles/ARTICLE/images/wallet.png" height="300px"></img>
|
|
|
</div>
|
|
|
<div class="col-sm-8">
|
|
|
<h2>WALLET</h2>
|
|
|
<p>
|
|
|
You can install a software on your computer or your phone to manage your bitcoins.<br>
|
|
|
As Bitcoin is open source, there is a lot of such software avalaible.<br>
|
|
|
It's called a wallet.<br>
|
|
|
Those softwares are all talking with the same protocol. They are connected to the same network.<br>
|
|
|
But, in fact, your true wallet is your 2 crypt keys : the public and the private one.<br>
|
|
|
Everybody who knows those 2 values can spend your bitcoins.<br>
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid bg-grey">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-8">
|
|
|
<h2>Transaction</h2>
|
|
|
<p>
|
|
|
When Bob is sending 42 <span class="glyphicon glyphicon-bitcoin"></span> to Alice, the bitcoin protocol is creating a transaction.<br>
|
|
|
A transaction is the balance between his Inputs and his Outputs.
|
|
|
<ul>
|
|
|
<li>First the network needs to be sure that Bob has got enough <span class="glyphicon glyphicon-bitcoin"></span> in his wallet.<br>So Bob will include a list of transactions that he has received before.<br>This is the inputs of the transactions.<br>For example, previous transaction's amount are 10, 25 and another 10, so total inputs are 45 <span class="glyphicon glyphicon-bitcoin"></span></li>
|
|
|
<li>As the input's sum is superior to the amount of the transaction, an ouput is added.<br>This output is the change to Bob.<br>In the example, this 3 <span class="glyphicon glyphicon-bitcoin"></span></li>
|
|
|
<li>Fees are took by the network to process the transaction.<br>Let say it will take 0.5<span class="glyphicon glyphicon-bitcoin"></span>.<br>This is another ouput</li>
|
|
|
<li>So Alice will get only a part of the transaction's amount.<br>this the last output, 41.5<span class="glyphicon glyphicon-bitcoin"></span></li>
|
|
|
</ul>
|
|
|
So the transaction is a made with :
|
|
|
<ul>
|
|
|
<li>Inputs : a list of previous transactions that bob has received</li>
|
|
|
<li>Outputs : a list of amounts to send to Alice, Bob, and fees</li>
|
|
|
<li>A timestamp</li>
|
|
|
</ul>
|
|
|
Then the wallet will broadcast the transaction on the network.<br>
|
|
|
It will be sent to the area called "mempool".<br>
|
|
|
Nodes of the network will validate the transaction by verfying the Inputs and the Ouputs.<br>
|
|
|
A hash of the transaction is computed.<br>
|
|
|
So the transaction is sealed.
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="col-sm-4 align-middle">
|
|
|
<img src="articles/ARTICLE/images/bob_to_alice.gif" width="100%; height: auto"></img>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-4">
|
|
|
<img src="articles/ARTICLE/images/tx2block.gif" width="100%; height: auto"></img>
|
|
|
</div>
|
|
|
<div class="col-sm-8">
|
|
|
<h2>Block</h2>
|
|
|
<p>
|
|
|
Then the bitcoin protocol is grouping validated transactions in blocks.<br>
|
|
|
So a block is an array of transactions.<br>
|
|
|
A block is made with :
|
|
|
<ul>
|
|
|
<li>An array of transactions.<br>
|
|
|
That's what my script is drawing.<br>
|
|
|
Running the transactions array, it is computing the sum of each outputs of each transaction.<br>
|
|
|
Then, it draws a rectangle for each sum.<br>
|
|
|
</li>
|
|
|
<li>A "proof of work".<br>The miner is computing a special hash that depends on the array of transaction and that will answer to a constraint.<br>This hash is very difficult to compute. In fact it is not really computed, the miner must test every value until he find the solution.<br>
|
|
|
That why the network will give him a reward.<br>This reward is a special transaction that has no inputs.<br>
|
|
|
As this reward is in bitcoin, this is also a mean to control the money stock.<br>
|
|
|
The more you use the money, the more there is blocks, the more there is money.<br>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid bg-grey">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-8">
|
|
|
<h2>Blockchain</h2>
|
|
|
<p>
|
|
|
Each block has a hash and a reference to the ihash of the previous block.<br>
|
|
|
So blocks are chained together.<br>
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-4">
|
|
|
<img src="articles/ARTICLE/images/blockchain.gif" width="100%; height: auto"></img>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|