Bitcoin network

From Wikipedia, the free encyclopedia
Jump to: navigation, search
For a broader coverage related to this topic, see Bitcoin.
A diagram of a bitcoin transfer
A mining farm in Iceland

The bitcoin network is a peer-to-peer payment network that operates on a cryptographic protocol. Users send and receive bitcoins, the units of currency, by broadcasting digitally signed messages to the network using bitcoin wallet software. Transactions are recorded into a distributed, replicated public database known as the blockchain, with consensus achieved by a proof-of-work system called "mining". The protocol was designed in 2008 and released in 2009 as open source software by "Satoshi Nakamoto", the name or pseudonym of the original developer/developer group.

The network requires minimal structure to share transactions. An ad hoc decentralized network of volunteers is sufficient. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will. Upon reconnection, a node downloads and verifies new blocks from other nodes to complete its local copy of the blockchain.[1][2]

Transactions[edit]

The best chain      consists of the longest series of transaction records from the genesis block      to the current block or record. Orphaned records      exist outside of the best chain.

A bitcoin is defined by a sequence of digitally signed transactions that began with the bitcoin's creation, as a block reward. The owner of a bitcoin transfers it by digitally signing it over to the next owner using a bitcoin transaction, much like endorsing a traditional bank check. A payee can examine each previous transaction to verify the chain of ownership. Unlike traditional check endorsements, bitcoin transactions are irreversible, which eliminates risk of chargeback fraud.[3]

Although it is possible to handle bitcoins individually, it would be unwieldy to require a separate transaction for every bitcoin in a transaction. Transactions are therefore allowed to contain multiple inputs and outputs,[4] allowing bitcoins to be split and combined. Common transactions will have either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and one or two outputs: one for the payment, and one returning the change, if any, to the sender. Any difference between the total input and output amounts of a transaction goes to miners as a transaction fee.[1]

Mining[edit]

GPU-based mining rig
Lancelot FPGA-based mining board

To form a distributed timestamp server as a peer-to-peer network, bitcoin uses a proof-of-work system.[2] The work in this system is what is often referred to as bitcoin mining. The signature is discovered rather than provided by knowledge.[5] This process is energy intensive.[6] Electricity can consume more than 90% of operating costs for miners.[7] A data center in China, planned mostly for bitcoin mining, is expected to require up to 135 MW of power.[8]

The rule of requiring a proof-of-work to provide the signature for the blockchain was Satoshi Nakamoto's key innovation.[5] The mining process involves identifying a block that when hashed twice with SHA-256, yields a number smaller than the given difficulty target. While the average work required increases in inverse proportion to the difficulty target, a hash can always be verified by executing a single round of double SHA-256.

For the bitcoin timestamp network, a valid "proof-of-work" is found by incrementing a nonce until a value is found that gives the block's hash the required number of leading zero bits. Once the hashing has produced a valid result, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing the work for each subsequent block.

Majority consensus in bitcoin is represented by the longest chain, which required the greatest amount of effort to produce. If a majority of computing power is controlled by honest nodes, the honest chain will grow fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of that block and all blocks after it and then surpass the work of the honest nodes. The probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added.[2]

Mining difficulty has increased significantly

To compensate for increasing hardware speed and varying interest in running nodes over time, the difficulty of finding a valid hash is adjusted roughly every two weeks. If blocks are generated too quickly, the difficulty increases and more hashes are required to make a block and to generate new bitcoins.[2]

Difficulty[edit]

Bitcoin mining is a competitive endeavor. An "arms race" has been observed through the various hashing technologies that have been used to mine bitcoins: basic CPUs, high-end GPUs common in many gaming computers, FPGAs and ASICs all have been used, each reducing the profitability of the less-specialized technology. Bitcoin-specific ASICs are now available.[9] As bitcoins become more difficult to mine, computer hardware manufacturing companies have seen an increase in sales of high-end products.[10]

Computing power is often bundled together or "pooled" to reduce variance in miner income. Individual mining rigs often have to wait for long periods to confirm a block of transactions and receive payment. In a pool, all participating miners get paid every time a participating server solves a block. This payment is proportional to the amount of work an individual miner contributed to help find that block.[11]

Bitcoin data centers prefer to keep a low profile, are dispersed around the world and tend to cluster around the availability of cheap electricity.[7]

Process[edit]

Avalon ASIC-based mining machine
ASICMINER ASIC-based USB mining device
Butterfly Labs ASIC-based mining machine

A rough overview of the process to mine bitcoins is:[2]

  1. New transactions are broadcast to all nodes.
  2. Each miner node collects new transactions into a block.
  3. Each miner node works on finding a proof-of-work code for its block.
  4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
  5. Receiving nodes validate the transactions it holds and accept only if all are valid.
  6. Nodes express their acceptance by moving to work on the next block, incorporating the hash of the accepted block.

Mined bitcoins[edit]

Diagram showing how bitcoin transactions are verified

By convention, the first transaction in a block is a special transaction that produces new bitcoins owned by the creator of the block. This is the incentive for nodes to support the network.[1] It provides the way to move new bitcoins into circulation. The reward for mining halves every 210,000 blocks. It started at 50 bitcoin, dropped to 25 in late 2012 and to 12.5 bitcoin in 2016.[12] This halving process is programmed to continue for 64 times before new coin creation ceases.[12]

Payment verification[edit]

Each miner can choose which transactions are included in or exempted from a block.[13] A greater number of transactions in a block does not equate to greater computational power required to solve that block.[13]

Upon receiving a new transaction a node must validate it: in particular, verify that none of the transaction's inputs have been previously spent. To carry out that check the node needs to access the blockchain. Any user who does not trust his network neighbors, should keep a full local copy of the blockchain, so that any input can be verified.

As noted in Nakamoto's whitepaper, it is possible to verify bitcoin payments without running a full network node (simplified payment verification, SPV). A user only needs a copy of the block headers of the longest chain, which are available by querying network nodes until it is apparent that the longest chain has been obtained. Then, get the Merkle branch linking the transaction to its block. Linking the transaction to a place in the chain demonstrates that a network node has accepted it, and blocks added after it further establish the confirmation.[1]

See also[edit]

References[edit]

  1. ^ a b c d Nakamoto, Satoshi (24 May 2009). "Bitcoin: A Peer-to-Peer Electronic Cash System" (PDF). Retrieved 20 December 2012. 
  2. ^ a b c d e Barber, Simon; Boyen, Xavier; Shi, Elaine & Uzun, Ersin (2012). "Bitter to Better — how to make Bitcoin a better currency" (PDF). Financial Cryptography and Data Security. Springer Publishing. 
  3. ^ Dean, Andrew (14 August 2014). "Online Gambling Meets Bitcoin". Retrieved 21 August 2014. 
  4. ^ "Block Chain Overview". bitcoin.org/. © Bitcoin Project 2009-2014 Released under the MIT license. 2009–2014. Retrieved 14 August 2014. 
  5. ^ a b "Enabling Blockchain Innovations with Pegged Sidechains" (PDF). Blockstream. 22 October 2014. p. 3. Retrieved 9 January 2017. 
  6. ^ Peter Kelly-Detwiler (21 July 2016). "Mining Bitcoins Is A Surprisingly Energy-Intensive Endeavor". Forbes. Retrieved 7 January 2017. 
  7. ^ a b Lester Coleman (25 July 2016). "As Mining Expands, Will Electricity Consumption Constrain Bitcoin?". cryptocoin news. Retrieved 7 January 2017. 
  8. ^ "Mining Bitcoin With Wind And Solar Power". Energy Matters. 7 November 2016. Retrieved 7 January 2017. 
  9. ^ Tindell, Ken (5 April 2013). "Geeks Love The Bitcoin Phenomenon Like They Loved The Internet In 1995". Business Insider. 
  10. ^ "Bitcoin boom benefiting TSMC: report". Taipei Times. 4 January 2014. 
  11. ^ Biggs, John (8 April 2013). "How To Mine Bitcoins". Techcrunch. 
  12. ^ a b Jacob Donnelly (12 June 2016). "What is the 'Halving'? A Primer to Bitcoin's Big Mining Change". CoinDesk. Retrieved 10 January 2017. 
  13. ^ a b Houy, N. (2016). "The Bitcoin Mining Game". Ledger. 1 (0): 53–68. doi:10.5195/ledger.2016.13. Retrieved 14 January 2017.