Bitcoin

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Gnome-colors-add-files-to-archive.pngThis article is being considered for archiving.Gnome-colors-add-files-to-archive.png

Reason: Due to contemptions in the past, this page had been locked and editable only by the Maintenance Team. None of latter are involved in Bitcoin development, and the page is outdated as a result. Unlocking this article is not an option, so archive it instead. (Discuss in Talk:Bitcoin)

Bitcoin is a decentralized P2P electronic cash system without a central server or trusted parties. Users hold the cryptographic keys to their own money and make transactions directly with each other, with the help of the network to check for double-spending. Bitcoins, usually denoted by BTC (e.g. 0.1 BTC), can also be exchanged for traditional currencies like US dollars.

Introduction

The Bitcoin network runs on peer-to-peer networking, digital signatures and cryptographic proof to make and verify transactions. Nodes broadcast transactions to the network, which records them in a public record of all transactions, called the blockchain. A block is a record of some or all of the most recent Bitcoin transactions that have not yet been recorded in any prior blocks. In order to preserve the integrity of the blockchain, each block in the chain confirms the integrity of the previous one, all the way back to the first one, using hashing.

New bitcoins are generated by the network through the process of mining. Mining involves inserting a new block into the current blockchain, this is difficult because it requires generating a valid hash (in this case a large integer).

A variation in difficulty is achieved by requiring that this integer is below a certain threshold - the data in the block is perturbed by a nonce value, until the data in the block hashes to produce an integer below the threshold - which takes a lot of processing power. The threshold is set by the number of people currently mining for bitcoins so as to achieve a general speed of about 1 block every 10 minutes.

How to get Bitcoins?

Warning: Your private keys are what allows you to spend your Bitcoin under valid consensus rules. They also allow anyone else possessing them to spend your Bitcoin. Keeping your private keys safe is the equivalent of keeping your Bitcoin safe, the two are inseparable. Most important:
  1. Encrypt your wallet with a strong password
  2. Backup your keys and transactions
The Bitcoin Wiki article on storing bitcoins contains further information regarding wallet types and securing them.

There are a variety of ways to acquire bitcoins:

  • Accept bitcoins as payment for goods or services.
  • There are several services where you can trade them for traditional currency.
  • Find someone to trade cash for bitcoins in-person through a local directory. To find traders near you, you can use LocalBitcoins or a bitcoin map.
  • Participate in a mining pool.
  • If you have very good hardware, you can solo mine and attempt to create a new block. See #Mining.

Bitcoin software

Warning: In order to transact or interact with other clients you must be running compatible software. This is currently a complicated and contentious matter in the Bitcoin community. You are advised to very carefully research your choice for installation and continuous usage.

Some points to illustrate above warning:

  • As mentioned earlier, different clients implement different rules on #Consensus. For example:
    • A #Thin client does per se not implement all rules, but only a subset.
    • A #Full node client may be forked to allow customizing options which are incompatible with the network Consensus at large.
    • Another full node may be programmed to validate in Consensus until it has itself reached a majority coverage, in order to leverage majority to implement different rules. The assumption is that the minority will follow suit, see #Nature of consensus failure for examples.
  • A lot of Linux distributions do not officially package bitcoin clients, and one reason are its special requirements to function on the P2P network. Some bitcoin developers even come to the conclusion the clients should not be packaged at all. See a related fedora request for further information. Using a rolling release distribution does pose additional risks in this respect.

The above implies you should also take continuous due care to test related updates.

Note: As a consequence of highly conflicting and non-resolvable opinions of contributors to this article on how the different available packages should be described, it had to be exceptionally decided not to list any individual packages at all.

Thin client

The thin clients are also named Simple Payment Verification (SPV) clients.

Thin clients do not fully validate the blockchain or compute a full Unspent Transaction Output Set (UTXO). They derive their security in proxy by connecting to a fullnode and downloading the blockheaders. They are still able to guarantee the Proof of Work behind a block is valid, and each blockheader contains a merkle root of all the transactions in the block. This allows them to query full node clients for the blockheaders and the data to prove their transaction is in the merkle root in the blockheader. They however must trust that miners are mining valid blocks, and have no way to make sure rules like the issuance rate or cap of Bitcoins are being followed.

Warning: In the event of a consensus failure at large on the network, or one affecting the node(s) an SPV client is connected to, the SPV client is incapable of detecting which partition of the network it is on, or communicating to, or being sent information by. It is extremely insecure to send or receive money with an SPV client in the event of such a consensus failure occurring.

There are several Bitcoin thin client implementations in the official repositories and in the AUR.

Full node

A full node is a bitcoin client which starts with the initial genesis block of the blockchain, and sequentially validates the signature chain of every historical Bitcoin transaction and validity of each historical block to construct upon arriving at the tip of the chain the current Unspent Transaction Output Set (UTXO). This is the current set of unspent coins, and which private keys they are encumbered to. It is called a full node because it obviously verifies the cryptographic integrity of the UTXO set itself. A full node client may or may not also participate in relaying unconfirmed transactions around the network and operate a mempool of all unconfirmed transactions, and may or may not participate in serving the full historical blockchain to new full node clients bootstrapping themselves.

There are several Bitcoin full node implementations in the official repositories and in the AUR.

If you decide to install one: It is possible to run a full node that deletes almost all historical blocks, only keeping the recent history to a certain threshold, but only after having downloaded (260GB as of October 2019) and verified them (which is CPU intensive) in sequence to arrive at the present period it retains. This is to ensure the same guarantee of the cryptographic integrity of the UTXO set. Afterwards, one may reduce storage and limit bandwith.

The initial download of the blockchain can be sped up by increasing the database cache as much as your RAM allows, add dbcache=M to ~/.bitcoin/bitcoin.conf where M is the number of megabytes of RAM to allocate.

Mining

Note: Mining is only really commercially viable with decent hardware, for a comparison of hardware and their performance see the bitcoin.it wiki. To see if your setup is viable use a Profit Calculator.

The concept of Bitcoin mining is based on searching for an input that is hard to find but easy to prove the existence of. Bitcoin miners construct blocks that consist of a set of transactions users are trying to make and link them to the previously solved block. Miners add a random piece of data to this, and hash a summary of the block. If the hash of this summary is below the desired target of the network, the block is considered valid. Since it is easy to reproduce any individual hash, they are impossible to predict, so the miner does not know which piece of data will create a desirable hash.

Mining requires the use of a miner, which is a program used to compute the required hashes and thus create Bitcoins. To learn more about mining please read this article.

There are several Bitcoin miners in the official repositories, as well as in the AUR.

See also

Informational sites

  • Bitcoin Whitepaper - The original whitepaper published by Satoshi Nakamoto before the launch of the live Bitcoin network.
  • bitcoin.org - Today the site is an independent open source project with contributors from around the world. Final publication authority is held by the co-owners, but all regular activity is organized through the public pull request process and managed by the site co-maintainers.
  • bitcoin.it Wiki - Bitcoin Wikipedia.
  • Satoshi Nakamoto Institute - Thoughts and quotes from the designer.
  • Coin Dance - Broad purpose network statistics.
  • Introduction to Bitcoin concepts[dead link 2020-12-20 ⓘ]. - at 21.co

Discussion groups

Blockchain explorers