Welcome to the Bitcoin Wiki

Here we aim to provide a correct and up-to date set of information on the Bitcoin network and its features and functionality.

Bitcoin

Bitcoin is a peer to peer electronic cash system created by Satoshi Nakamoto. It was first detailed in the Bitcoin Whitepaper in October 2008, and the source code was released in January 2009. The Bitcoin ledger and Blockchain were established with the generation of the Genesis block on the 3rd of January 2009 and the mining of Block 1 six days later on the 9th of January 2009.

Bitcoin allows electronic payments to be sent directly from one party to another, without requiring a central institution or server to process transactions and/or store funds.

The leaderless structure of the network is viewed as a resolution to The Byzantine Generals Problem allowing disconnected entities to follow a common direction without centralised instruction. This solves several issues previously seen as unsolvable in distributed networks, including the problem of preventing Double-spending of coins.

Applications

Bitcoin is primarily a payment system which supports peer to peer connection and Instant Transactions. Early in the History of Bitcoin payments required users to understand complicated technical details of Bitcoin's technological underpinnings to make transactions. But developments such as Paymail and Simplified Payment Verification are changing the landscape and making it much easier for users to connect and leverage the blockchain for the back-end of their applications.

Bitcoin also supports the development of application layer protocols which make use of Bitcoin Transactions as a transport layer for information exchange. Several Application layer protocols already exist for BitcoinSV - for more detail see Building on Bitcoin. The Metanet fuses Bitcoin's highly secure and instant sub-cent transactions with onchain data storage and transferability enabling efficient and secure web usage. This will bring forth an Internet of Value where Micropayments become a means to both access and monetize data.

Applications which make use of the immutable nature of the Bitcoin Ledger to store and retrieve data are emerging at an increasing rate. False Return scripts and other scripts that use Pushdata Opcodes to push data into Bitcoin transactions are creating new ways of recording data for public consumption. Bitcoin acts as a timestamp server allowing data to be validated and referenced using transactions.

Network

The Bitcoin Network is the network that all peers use to access the ledger. The network forms spontaneously over time as more peers access and use the system. There is no central governance that determines how peers on the network must connect, but the incentive structure that Bitcoin employs to bring enterprise miners into the system results in the formation of a small world network which is simple and resilient.

Once the final restrictions on the protocol are removed in the Chronicle Update (expected early-mid 2021) network users will be able to create partitioned zones which employ specific rulesets particular to their requirements. This will be enabled by creating transactions that use OP_VER to give particular subsets of nodes specialised instructions, and will create the effect of layered network partitions over the core system which are referred to as Bitcoin Layered Networks.

What Are Overlay Networks?

Bitcoin overlay networks are special network layers built on top of the Bitcoin blockchain. These networks interpret transaction data in their own unique ways to provide additional services or functionalities beyond sending and receiving Bitcoin.

The Ledger

The Bitcoin ledger is a record of all valid transactions that have ever been transmitted to the network. The ledger is formed as a Directed Acyclic Graph (DAG) where each transaction is a node. The graph starts at the Coinbase transaction of the first block ever found and via chains of digital signatures maps out the entire history of valid exchange actions, allowing the tracing of all bitcoins back to their creation.

Electronic coins are defined as a chain of digital signatures

Valid transactions that are broadcast on The Bitcoin Network are committed to the ledger by miners in Blocks. A block consists of a header which contains a timestamp, a reference to the block it builds on, a valid Proof of Work and the double SHA-256 hash of the root of a Merkle tree generated with a list of transactions, and the list of transactions. Most nodes use compact block propagation techniques which compress the list of transactions to a much smaller size rather than broadcasting the full block. Receiving Nodes must decompress the block using a list of validated transactions that they have also compacted.

Blocks form a second layer DAG called the Blockchain which is built by network miners in a competitive process. Each block forms a node in the graph with a single incoming edge from the block it is built upon. A block may have more than one outgoing edge in a case where multiple blocks were built upon it, but only one of those edges can become part of the longest chain of proof of work. A block without an edge to the longest chain of proof of work is called an Orphan Block.

A chain of blocks

The structure of the block chain DAG means that there is a clearly traceable path back to the first block mined. Blocks are discovered just under every 10 minutes on average, with miners using a predefined mathematical algorithm to control the difficulty of the proof of work process to maintain that time frame.

Transactions can be exchanged peer to peer using Simplified Payment Verification (SPV) to manage trust. SPV involves sending accompanying information with a transaction input that proves it is from a transaction that has been timestamped on the ledger.

Simplified payment verification

Users can exchange unfinalised transactions without sending them to the network to be mined creating what are called Payment Channels. Payment channels allow users to conduct information exchange within valid Bitcoin transactions, only broadcasting a finalised transaction including the full value exchange to the mining network once the information transfer is complete.

Once a transactions is sent to the network, global consensus can be reached on the validity in less than 2 seconds. If a transaction is not accepted by any miners and added to a block template, it is considered invalid. Transactions can be invalid for a variety of reasons such as being submitted with an invalid scriptSig, not adhering to network or miner rules, or not paying an adequate fee.

Transactions

All Bitcoin Transactions are payments of some kind. Transactions are written in a flexible scripting language that is used to assign custodial control to each transaction output via the creation of arbitrary spending conditions defined by scripts.

Each transaction uses bitcoins stored in 'unspent transaction outputs' as the transaction inputs. The transaction process aggregates the satoshis held in each input and spends them into a new set of unspent transaction outputs. When UTXOs are spent in a transaction they are consumed.

Transaction inputs and outputs

The Bitcoin scripting language is Turing complete, and can be used to create Turing machines that use the Bitcoin ledger as a tape, writing to and reading from the transaction graph as needed.

The scripting language also includes opcodes that allow users to embed arbitrary data in transactions, providing for the creation of application layer protocols that use Bitcoin transactions as a transport layer.

Rewards paid to miners for the creation of a block are inscribed in what is called a Coinbase transaction. This transaction has a specific format and is always the first transaction in the block's Merkle tree.

Nodes and Mining

The ledger is held on a distributed network of nodes who use hash based Proof of Work to compete for the right to extend it and as a means to enforce network rules. The proof of work of each block in the longest chain of work is incorporated into its subsequent block to form the chain structure.

A chain of hash based proof of work

During the mining process, a node gathers transactions from the network on a first seen basis and evaluates whether they are profitable to mine before putting them into a block template. Block templates are created by calculating the root of a Merkle tree containing all of the transactions being mined. The order of transactions in the Merkle tree is not related to their position in the transaction DAG. As new transactions arrive, they are added to the tree, creating a new, updated template. Hash operators continuously request new block templates through the Getminingcandidate interface to ensure they are getting up-to-date block data to hash against. A block is found when a miner successfully discovers a value that generates a hash less than the difficulty target. The miner must then propagate the new block to the rest of the network who must then build an additional 100 blocks on top of it before the winner can claim the block reward.

The structure of a Merkle Tree

Nodes are operated by the Bitcoin mining enterprises who build the network. Bitcoin's economic incentives are structured such that for the nodes to be most profitable at building the ledger they must be as closely connected to other well performing nodes as possible. This leads to miners forming a Small World Network which trends towards a Nearly Complete Graph where each miner is connected to most of the other miners. Miners gather transactions from users who connect in a layered network over the nodes at the core forming something that closely resembles a Mandala Network. Peers operating in these shell-like layers use Simplified Payment Verification to form a much less densely packed structure where information is exchanged in Payment Channels.

As Bitcoin scales, the nodes who comprise the network will be variously compartmentalised into specialised hardware. These clustered systems will be distributed globally, each being placed in a location optimised for its task.

As enterprise organisations, Bitcoin miners must operate as legal entities within a given jurisdiction and as such are bound to the laws and legal processes that exist in that jurisdiction. Through this, miners can be compelled to enact certain rules or perform certain actions in order to comply with the law.

Alert Key

Unit of account

Satoshis are the ledger's native unit of account and 100,000,000 satoshis is abstracted to one bitcoin. Satoshis are held in script puzzles called Unspent Transaction Outputs or UTXOs. These are transaction outputs which are held by miners in a quick access database called the UTXO set. During the spending process, UTXOs being used in a transaction are consumed and the solution to their puzzle script is recorded in the transaction.

Satoshis are distributed by miners to themselves as a subsidy payment during the network establishment phase. As the network matures, the subsidy dissipates forcing the miners to find alternate revenue streams. The payment allows miners to finance their operations through the payment of goods and services in bitcoin, spreading it through the economy.

Network rules

Bitcoin operates on a fixed ruleset. So-called consensus rules include things such as the operation of the opcodes in Bitcoin Script, the rate at which new bitcoins are issued, the mathematical function used to calculate the target for the Difficulty algorithm and more. The protocol is agreed upon by the miners who control network operation.

There are no limits in the Bitcoin protocol. Any limits imposed are put in place by miners who are incentivised to catch the largest profitable pools of transactions they can. Miners compete to offer better service to fee paying users by scaling their own capabilities.

History

Bitcoin has a rich history.

Tools and Building on Bitcoin

Bitcoin has a rich and diverse set of tools which are being added to all the time.