Bitcoin design

0 22
Avatar for Mimtiaz
3 years ago

Units and divisibility

The unit of account of the bitcoin system is a bitcoin. Ticker symbols used to represent bitcoin are BTC[b] and XBT.[c][98]:2 Its Unicode character is ₿.[1] Small amounts of bitcoin used as alternative units are millibitcoin (mBTC), and satoshi (sat). Named in homage to bitcoin's creator, a satoshi is the smallest amount within bitcoin representing ​1⁄100000000 bitcoins, one hundred millionth of a bitcoin.[2] A millibitcoin equals ​1⁄1000 bitcoins; one thousandth of a bitcoin or 100,000 satoshis.[99]

Blockchain

Data structure of blocks in the ledger.

Number of bitcoin transactions per month, semilogarithmic plot[100]

Number of unspent transaction outputs[101]

For broader coverage of this topic, see Blockchain.

The bitcoin blockchain is a public ledger that records bitcoin transactions.[102] It is implemented as a chain of blocks, each block containing a hash of the previous block up to the genesis block[d] of the chain. A network of communicating nodes running bitcoin software maintains the blockchain.[34]:215–219 Transactions of the form payer X sends Y bitcoins to payee Z are broadcast to this network using readily available software applications.

Network nodes can validate transactions, add them to their copy of the ledger, and then broadcast these ledger additions to other nodes. To achieve independent verification of the chain of ownership each network node stores its own copy of the blockchain.[103] At varying intervals of time averaging to every 10 minutes, a new group of accepted transactions, called a block, is created, added to the blockchain, and quickly published to all nodes, without requiring central oversight. This allows bitcoin software to determine when a particular bitcoin was spent, which is needed to prevent double-spending. A conventional ledger records the transfers of actual bills or promissory notes that exist apart from it, but the blockchain is the only place that bitcoins can be said to exist in the form of unspent outputs of transactions.[6]:ch. 5

Transactions

See also: Bitcoin network

Transactions are defined using a Forth-like scripting language.[6]:ch. 5 Transactions consist of one or more inputs and one or more outputs. When a user sends bitcoins, the user designates each address and the amount of bitcoin being sent to that address in an output. To prevent double spending, each input must refer to a previous unspent output in the blockchain.[104] The use of multiple inputs corresponds to the use of multiple coins in a cash transaction. Since transactions can have multiple outputs, users can send bitcoins to multiple recipients in one transaction. As in a cash transaction, the sum of inputs (coins used to pay) can exceed the intended sum of payments. In such a case, an additional output is used, returning the change back to the payer.[104] Any input satoshis not accounted for in the transaction outputs become the transaction fee.[104]

Transaction fees

Though transaction fees are optional, miners can choose which transactions to process and prioritize those that pay higher fees.[104] Miners may choose transactions based on the fee paid relative to their storage size, not the absolute amount of money paid as a fee. These fees are generally measured in satoshis per byte (sat/b). The size of transactions is dependent on the number of inputs used to create the transaction, and the number of outputs.[6]:ch. 8

Ownership

Simplified chain of ownership as illustrated in the bitcoin whitepaper.[4] In practice, a transaction can have more than one input and more than one output.[104]

In the blockchain, bitcoins are registered to bitcoin addresses. Creating a bitcoin address requires nothing more than picking a random valid private key and computing the corresponding bitcoin address. This computation can be done in a split second. But the reverse, computing the private key of a given bitcoin address, is practically unfeasible.[6]:ch. 4 Users can tell others or make public a bitcoin address without compromising its corresponding private key. Moreover, the number of valid private keys is so vast that it is extremely unlikely someone will compute a key-pair that is already in use and has funds. The vast number of valid private keys makes it unfeasible that brute force could be used to compromise a private key. To be able to spend their bitcoins, the owner must know the corresponding private key and digitally sign the transaction. The network verifies the signature using the public key; the private key is never revealed.[6]:ch. 5

If the private key is lost, the bitcoin network will not recognize any other evidence of ownership;[34] the coins are then unusable, and effectively lost. For example, in 2013 one user claimed to have lost 7,500 bitcoins, worth $7.5 million at the time, when he accidentally discarded a hard drive containing his private key.[105] About 20% of all bitcoins are believed to be lost -they would have had a market value of about $20 billion at July 2018 prices.[106]

To ensure the security of bitcoins, the private key must be kept secret.[6]:ch. 10 If the private key is revealed to a third party, e.g. through a data breach, the third party can use it to steal any associated bitcoins.[107] As of December 2017, around 980,000 bitcoins have been stolen from cryptocurrency exchanges.[108]

Regarding ownership distribution, as of 16 March 2018, 0.5% of bitcoin wallets own 87% of all bitcoins ever mined.[109]

Mining

See also: Bitcoin network § Mining

Early bitcoin miners used GPUs for mining, as they were better suited to the proof-of-work algorithm than CPUs.[110]

Later amateurs mined bitcoins with specialized FPGA and ASIC chips. The chips pictured have become obsolete due to increasing difficulty.

Today, bitcoin mining companies dedicate facilities to housing and operating large amounts of high-performance mining hardware.[111]

Semi-log plot of relative mining difficulty[e][101]

Mining is a record-keeping service done through the use of computer processing power.[f] Miners keep the blockchain consistent, complete, and unalterable by repeatedly grouping newly broadcast transactions into a block, which is then broadcast to the network and verified by recipient nodes.[102] Each block contains a SHA-256 cryptographic hash of the previous block,[102] thus linking it to the previous block and giving the blockchain its name.[6]:ch. 7[102]

To be accepted by the rest of the network, a new block must contain a proof-of-work (PoW).[102] The system used is based on Adam Back's 1997 anti-spam scheme, Hashcash.[113][failed verification][4] The PoW requires miners to find a number called a nonce, such that when the block content is hashed along with the nonce, the result is numerically smaller than the network's difficulty target.[6]:ch. 8 This proof is easy for any node in the network to verify, but extremely time-consuming to generate, as for a secure cryptographic hash, miners must try many different nonce values (usually the sequence of tested values is the ascending natural numbers: 0, 1, 2, 3, ...[6]:ch. 8) before meeting the difficulty target.

Every 2,016 blocks (approximately 14 days at roughly 10 min per block), the difficulty target is adjusted based on the network's recent performance, with the aim of keeping the average time between new blocks at ten minutes. In this way the system automatically adapts to the total amount of mining power on the network.[6]:ch. 8 Between 1 March 2014 and 1 March 2015, the average number of nonces miners had to try before creating a new block increased from 16.4 quintillion to 200.5 quintillion.[114]

The proof-of-work system, alongside the chaining of blocks, makes modifications of the blockchain extremely hard, as an attacker must modify all subsequent blocks in order for the modifications of one block to be accepted.[115] As new blocks are mined all the time, the difficulty of modifying a block increases as time passes and the number of subsequent blocks (also called confirmations of the given block) increases.[102]

Supply

Total bitcoins in circulation.[101]

The successful miner finding the new block is allowed by the rest of the network to reward themselves with newly created bitcoins and transaction fees.[116] As of 11 May 2020,[117] the reward amounted to 6.25 newly created bitcoins per block added to the blockchain,[118] plus any transaction fees from payments processed by the block. To mine half of the supply of bitcoins took four years but the remainder will take another 120 years, because of an artificial process called "bitcoin halving" according to which miners are compensated by fewer BTC as time goes on.[118] To claim the reward, a special transaction called a coinbase is included with the processed payments.[6]:ch. 8 All bitcoins in existence have been created in such coinbase transactions. The bitcoin protocol specifies that the reward for adding a block will be halved every 210,000 blocks (approximately every four years). Eventually, the reward will decrease to zero, and the limit of 21 million bitcoins[g] will be reached c. 2140; the record keeping will then be rewarded solely by transaction fees.[119]

In other words, Nakamoto set a monetary policy based on artificial scarcity at bitcoin's inception that the total number of bitcoins could never exceed 21 million. New bitcoins are created roughly every ten minutes and the rate at which they are generated drops by half about every four years until all will be in circulation.[120]

Pooled mining

For broader coverage of this topic, see Mining pool.

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 depends on the amount of work an individual miner contributed to help find that block.[121]

Wallets

For broader coverage of this topic, see Cryptocurrency wallet.

Bitcoin Core, a full client

Electrum, a lightweight client

A wallet stores the information necessary to transact bitcoins. While wallets are often described as a place to hold[122] or store bitcoins, due to the nature of the system, bitcoins are inseparable from the blockchain transaction ledger. A wallet is more correctly defined as something that "stores the digital credentials for your bitcoin holdings" and allows one to access (and spend) them.[6]:ch. 1, glossary Bitcoin uses public-key cryptography, in which two cryptographic keys, one public and one private, are generated.[123] At its most basic, a wallet is a collection of these keys.

There are several modes which wallets can operate in. They have an inverse relationship with regards to trustlessness and computational requirements.

Full clients verify transactions directly by downloading a full copy of the blockchain (over 150 GB as of January 2018).[124] They are the most secure and reliable way of using the network, as trust in external parties is not required. Full clients check the validity of mined blocks, preventing them from transacting on a chain that breaks or alters network rules.[6]:ch. 1 Because of its size and complexity, downloading and verifying the entire blockchain is not suitable for all computing devices.

Lightweight clients consult full nodes to send and receive transactions without requiring a local copy of the entire blockchain (see simplified payment verification – SPV). This makes lightweight clients much faster to set up and allows them to be used on low-power, low-bandwidth devices such as smartphones. When using a lightweight wallet, however, the user must trust full nodes, as it can report faulty values back to the user. Lightweight clients follow the longest blockchain and do not ensure it is valid, requiring trust in full nodes.[125]

Third-party internet services called online wallets offer similar functionality but may be easier to use. In this case, credentials to access funds are stored with the online wallet provider rather than on the user's hardware.[126] As a result, the user must have complete trust in the online wallet provider. A malicious provider or a breach in server security may cause entrusted bitcoins to be stolen. An example of such a security breach occurred with Mt. Gox in 2011.[127]

Physical wallets

A paper wallet with a banknote-like design. Both the private key and the address are visible in text form and as 2D barcodes.

A paper wallet with the address visible for adding or checking stored funds. The part of the page containing the private key is folded over and sealed.

A brass token with a private key hidden beneath a tamper-evident security hologram. A part of the address is visible through a transparent part of the hologram.

A hardware wallet peripheral which processes bitcoin payments without exposing any credentials to the computer.

Physical wallets store the credentials necessary to spend bitcoins offline and can be as simple as a paper printout of the private key:[6]:ch. 10 a paper wallet. A paper wallet is created with a keypair generated on a computer with no internet connection; the private key is written or printed onto the paper[h] and then erased from the computer. The paper wallet can then be stored in a safe physical location for later retrieval. Bitcoins stored using a paper wallet are said to be in cold storage.[128]:39

Cameron and Tyler Winklevoss, the founders of the Gemini Trust Co. exchange, reported that they had cut their paper wallets into pieces and stored them in envelopes distributed to safe deposit boxes across the United States.[129] Through this system, the theft of one envelope would neither allow the thief to steal any bitcoins nor deprive the rightful owners of their access to them.[130]

Physical wallets can also take the form of metal token coins[131] with a private key accessible under a security hologram in a recess struck on the reverse side.[132]:38 The security hologram self-destructs when removed from the token, showing that the private key has been accessed.[133] Originally, these tokens were struck in brass and other base metals, but later used precious metals as bitcoin grew in value and popularity.[132]:80 Coins with stored face value as high as ₿1000 have been struck in gold.[132]:102–104 The British Museum's coin collection includes four specimens from the earliest series[132]:83 of funded bitcoin tokens; one is currently on display in the museum's money gallery.[134] In 2013, a Utahn manufacturer of these tokens was ordered by the Financial Crimes Enforcement Network (FinCEN) to register as a money services business before producing any more funded bitcoin tokens.[131][132]:80

Another type of physical wallet called a hardware wallet keeps credentials offline while facilitating transactions.[135] The hardware wallet acts as a computer peripheral and signs transactions as requested by the user, who must press a button on the wallet to confirm that they intended to make the transaction. Hardware wallets never expose their private keys, keeping bitcoins in cold storage even when used with computers that may be compromised by malware.[128]:42–45

Implementations

The first wallet program, simply named Bitcoin, and sometimes referred to as the Satoshi client, was released in 2009 by Satoshi Nakamoto as open-source software.[14] In version 0.5 the client moved from the wxWidgets user interface toolkit to Qt, and the whole bundle was referred to as Bitcoin-Qt.[136] After the release of version 0.9, the software bundle was renamed Bitcoin Core to distinguish itself from the underlying network.[137][138]

Forks

See also: Fork (blockchain) and List of bitcoin forks

Bitcoin Core is, perhaps, the best known implementation or client. Alternative clients (forks of Bitcoin Core) exist, such as Bitcoin XT, Bitcoin Unlimited,[33] and Parity Bitcoin.[139]

On 1 August 2017, Bitcoin Cash was created as result of a hard fork.[140] Bitcoin Cash has a larger block size limit and had an identical blockchain at the time of fork. On 24 October 2017 another hard fork, Bitcoin Gold, was created. Bitcoin Gold changes the proof-of-work algorithm used in mining, as the developers felt that mining had become too specialized.[141]

Decentralization

Bitcoin is decentralized thus:[7]

Bitcoin does not have a central authority.[7]

There is no central server; the bitcoin network is peer-to-peer.[14]

There is no central storage; the bitcoin ledger is distributed.[142]

The ledger is public; anybody can store it on their computer.[6]:ch. 1

There is no single administrator;[7] the ledger is maintained by a network of equally privileged miners.[6]:ch. 1

Anybody can become a miner.[6]:ch. 1

The additions to the ledger are maintained through competition. Until a new block is added to the ledger, it is not known which miner will create the block.[6]:ch. 1

The issuance of bitcoins is decentralized. They are issued as a reward for the creation of a new block.[116]

Anybody can create a new bitcoin address (a bitcoin counterpart of a bank account) without needing any approval.[6]:ch. 1

Anybody can send a transaction to the network without needing any approval; the network merely confirms that the transaction is legitimate.[143]:32

Trend towards centralization

Researchers have pointed out at a "trend towards centralization". Although bitcoin can be sent directly from user to user, in practice intermediaries are widely used.[34]:220–222 Bitcoin miners join large mining pools to minimize the variance of their income.[34]:215, 219–222[144]:3[145] Because transactions on the network are confirmed by miners, decentralization of the network requires that no single miner or mining pool obtains 51% of the hashing power, which would allow them to double-spend coins, prevent certain transactions from being verified and prevent other miners from earning income.[146] As of 2013 just six mining pools controlled 75% of overall bitcoin hashing power.[146] In 2014 mining pool Ghash.io obtained 51% hashing power which raised significant controversies about the safety of the network. The pool has voluntarily capped their hashing power at 39.99% and requested other pools to act responsibly for the benefit of the whole network.[147] c. 2017 over 70% of the hashing power and 90% of transactions were operating from China.[148]

According to researchers, other parts of the ecosystem are also "controlled by a small set of entities", notably the maintenance of the client software, online wallets and simplified payment verification (SPV) clients.[146]

Privacy

Bitcoin is pseudonymous, meaning that funds are not tied to real-world entities but rather bitcoin addresses. Owners of bitcoin addresses are not explicitly identified, but all transactions on the blockchain are public. In addition, transactions can be linked to individuals and companies through "idioms of use" (e.g., transactions that spend coins from multiple inputs indicate that the inputs may have a common owner) and corroborating public transaction data with known information on owners of certain addresses.[149] Additionally, bitcoin exchanges, where bitcoins are traded for traditional currencies, may be required by law to collect personal information.[150] To heighten financial privacy, a new bitcoin address can be generated for each transaction.[151]

Fungibility

Wallets and similar software technically handle all bitcoins as equivalent, establishing the basic level of fungibility. Researchers have pointed out that the history of each bitcoin is registered and publicly available in the blockchain ledger, and that some users may refuse to accept bitcoins coming from controversial transactions, which would harm bitcoin's fungibility.[152] For example, in 2012, Mt. Gox froze accounts of users who deposited bitcoins that were known to have just been stolen.[153]

Scalability

Main article: Bitcoin scalability problem

The blocks in the blockchain were originally limited to 32 megabytes in size. The block size limit of one megabyte was introduced by Satoshi Nakamoto in 2010. Eventually the block size limit of one megabyte created problems for transaction processing, such as increasing transaction fees and delayed processing of transactions.[154] Andreas Antonopoulos has stated Lightning Network is a potential scaling solution and referred to lightning as a second layer routing network.[6]:ch. 8

0
$ 0.00
Avatar for Mimtiaz
3 years ago

Comments