Bitcoin - ArchWiki

# Bitcoin

This article or section needs language, wiki syntax or style improvements.

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Bitcoin#)

Related articles

- List of applications/Internet#Bitcoin
- Vcash

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. 150 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 block chain. 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 block chain, 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 block chain, 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.

## Installation

Install bitcoin-qt, bitcoin-daemon and bitcoin-cli.

Note: Bitcoin Core requires syncing the blockchain (current size is about 90GB as of Sept. 2016); each transaction in a block gets verified by verifying the ECDSA signatures that spend each transaction, which is a time-consuming mathematical operation, so having a good CPU, sufficient storage and bandwidth is highly recommended.

Some good practices to consider:

1. Encrypt your wallet with a strong password.
2. Backup your wallet.dat file using bitcoin-qt.
3. See the official Bitcoin wiki for additional guidance.

Lighter software includes multibit and electrum, available in the official repositories too.

You can use this systemd service file for bitcoin-daemon

(You will probably need to change `User=` or create a bitcoin user.)

    /etc/systemd/system/bitcoind.service

    [Unit]
    Description=Bitcoin daemon service
    After=network.target

    [Service]
    Type=simple
    User=bitcoin
    ExecStart=/usr/bin/bitcoind

    [Install]
    WantedBy=multi-user.target

## How to get Bitcoins?

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 (currently yields 12.5 BTC plus fees).

### 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:

- bfgminer — Bitcoin miner featuring overclocking, monitoring, fan speed control and remote management. For FPGA/GPU/CPU Bitcoin mining.

  http://bfgminer.org/ || bfgminer

- CGMiner — Multi-threaded multi-pool CPU miner.

  https://github.com/ckolivas/cgminer || cgminer (Note: use cgminer-gpuAUR for GPU mining as its version was the last to support it).

## Configuration

bitcoin-qt should run fine with minimal or no configuration file. For a list of configuration parameters that can be added to your `~/.bitcoin/bitcoin.conf`, see: `bitcoind --help`.

## See also

- Official Bitcoin website
- Bitcoin.it wiki
- Bitcoin forum
- IRC Channels on Freenode:
  - #bitcoin - General Bitcoin-related.
  - ##bitcoin - Price talk discussion, etc.
  - #bitcoin-dev - Development and technical.
  - #bitcoin-otc - Over The Counter exchange.
  - #bitcoin-market - Live quotes from markets.
  - #bitcoin-mining - Mining discussion.
- blockparser — Fast, quick and dirty bitcoin blockchain parser.

Category:

- Internet applications

Hidden category:

- Pages or sections flagged with Template:Style