<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CarbonChris</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CarbonChris"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/CarbonChris"/>
	<updated>2026-04-25T01:08:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69050</id>
		<title>File:Bitcointransactions.JPG</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69050"/>
		<updated>2021-12-02T13:40:03Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A sends 6.102 BTC to C and C generates 6.25 BTC. C sends 3.12009 BTC to D, and he needs to send himself some change. D sends the 3.12009 BTC to someone else, but they haven&#039;t redeemed it yet. Only D&#039;s output and C&#039;s change are capable of being spent in the current state.&lt;br /&gt;
&lt;br /&gt;
Original file was created and uploaded by Theymos in Dec. 2010. No changes were made to the original structure of the depicted transactions.&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|Cc-zero}}&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69049</id>
		<title>File:Bitcointransactions.JPG</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69049"/>
		<updated>2021-12-02T13:39:05Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A sends 6.102 BTC to C and C generates 6.25 BTC. C sends 3.12009 BTC to D, and he needs to send himself some change. D sends the 3.12009 BTC to someone else, but they haven&#039;t redeemed it yet. Only D&#039;s output and C&#039;s change are capable of being spent in the current state.&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|Cc-zero}}&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69048</id>
		<title>File:Bitcointransactions.JPG</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69048"/>
		<updated>2021-12-02T13:32:07Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Transactions were ordered chronologically, left to right. Inputs/outputs were moved to left/right. Color was added to differentiate inputs/outputs. Arrow styles were changed to highlight broadcasting. Original file was created and uploaded by Theymos in Dec. 2010. No changes were made to the original structure of the depicted transactions.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|Cc-zero}}&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Transaction&amp;diff=69047</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Transaction&amp;diff=69047"/>
		<updated>2021-12-02T13:30:03Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:TxBinaryMap.png|thumb|right|Byte-map of Transaction with each type of TxIn and TxOut]]&lt;br /&gt;
A &#039;&#039;&#039;transaction&#039;&#039;&#039; is a transfer of Bitcoin value that is broadcast to the [[network]] and collected into [[block|blocks]]. A transaction typically references previous transaction outputs as new transaction inputs and dedicates all input Bitcoin values to new outputs. Transactions are not encrypted, so it is possible to browse and view every transaction ever collected into a block. Once transactions are buried under enough [[Confirmation|confirmations]] they can be considered [[Irreversible Transactions|irreversible]].&lt;br /&gt;
&lt;br /&gt;
This article is about &#039;&#039;&#039;on-chain transactions&#039;&#039;&#039;. See also: [[Off-Chain Transactions]]&lt;br /&gt;
&lt;br /&gt;
Standard transaction outputs nominate [[address|addresses]], and the redemption of any future inputs requires a relevant signature.&lt;br /&gt;
&lt;br /&gt;
All transactions are visible in the [[block chain]], and can be viewed with a hex editor. A [[block chain browser]] is a site where every transaction included within the block chain can be viewed in human-readable terms.  This is useful for seeing the technical details of transactions in action and for verifying payments.&lt;br /&gt;
&lt;br /&gt;
=== General format of a Bitcoin transaction (inside a block) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
|Version no&lt;br /&gt;
|currently 1&lt;br /&gt;
|4 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Flag&lt;br /&gt;
|If present, always 0001, and indicates the presence of witness data&lt;br /&gt;
|optional 2 byte array&lt;br /&gt;
|-&lt;br /&gt;
|In-counter&lt;br /&gt;
| positive integer [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
| 1 - 9 bytes &lt;br /&gt;
|-&lt;br /&gt;
|list of inputs&lt;br /&gt;
|[[Transaction#General_format_.28inside_a_block.29_of_each_input_of_a_transaction_-_Txin|the first input of the first transaction is also called &amp;quot;coinbase&amp;quot; (its content was ignored in earlier versions)]]&lt;br /&gt;
|&amp;lt;in-counter&amp;gt;-many inputs&lt;br /&gt;
|-&lt;br /&gt;
|Out-counter&lt;br /&gt;
| positive integer [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
| 1 - 9 bytes&lt;br /&gt;
|-&lt;br /&gt;
|list of outputs&lt;br /&gt;
|[[Transaction#General_format_.28inside_a_block.29_of_each_output_of_a_transaction_-_Txout|the outputs of the first transaction spend the mined bitcoins for the block]]&lt;br /&gt;
|&amp;lt;out-counter&amp;gt;-many outputs&lt;br /&gt;
|-&lt;br /&gt;
|Witnesses&lt;br /&gt;
|A list of witnesses, 1 for each input, omitted if flag above is missing&lt;br /&gt;
|variable, see [[Segregated_Witness]]&lt;br /&gt;
|-&lt;br /&gt;
|lock_time&lt;br /&gt;
|if non-zero and sequence numbers are &amp;lt; 0xFFFFFFFF: block height or timestamp when transaction is final&lt;br /&gt;
|4 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Principle example of a Bitcoin transaction with 1 input and 1 output only ===&lt;br /&gt;
&lt;br /&gt;
==== Data ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Input:&lt;br /&gt;
Previous tx: f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6&lt;br /&gt;
Index: 0&lt;br /&gt;
scriptSig: 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d10&lt;br /&gt;
90db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
Value: 5000000000&lt;br /&gt;
scriptPubKey: OP_DUP OP_HASH160 404371705fa9bd789a2fcd52d2c580b65d35549d&lt;br /&gt;
OP_EQUALVERIFY OP_CHECKSIG&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Explanation ====&lt;br /&gt;
&lt;br /&gt;
The input in this transaction imports 50 BTC from output #0 in transaction f5d8... Then the output sends 50 BTC to a Bitcoin address (expressed here in hexadecimal 4043... instead of the normal base58). When the recipient wants to spend this money, he will reference output #0 of this transaction in an input of his own transaction.&lt;br /&gt;
&lt;br /&gt;
===== Input =====&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;input&#039;&#039;&#039; is a reference to an output from a previous transaction. Multiple inputs are often listed in a transaction. All of the new transaction&#039;s input values (that is, the total coin value of the previous outputs referenced by the new transaction&#039;s inputs) are added up, and the total (less any transaction fee) is completely used by the outputs of the new transaction. &#039;&#039;&#039;Previous tx&#039;&#039;&#039; is a [[hash]] of a previous transaction. &#039;&#039;&#039;Index&#039;&#039;&#039; is the specific output in the referenced transaction. &#039;&#039;&#039;ScriptSig&#039;&#039;&#039; is the first half of a [[script]] (discussed in more detail later).&lt;br /&gt;
&lt;br /&gt;
The script contains two components, a signature and a public key. The public key must match the hash given in the script of the redeemed output. The public key is used to verify the redeemers signature, which is the second component. More precisely, the second component is an [[ECDSA]] signature over a hash of a simplified version of the transaction. It, combined with the public key, proves the transaction was created by the real owner of the bitcoins in question. Various flags define how the transaction is simplified and can be used to create different types of payment.&lt;br /&gt;
&lt;br /&gt;
===== Output =====&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;output&#039;&#039;&#039; contains instructions for sending bitcoins. &#039;&#039;&#039;Value&#039;&#039;&#039; is the number of Satoshi (1 BTC = 100,000,000 Satoshi) that this output will be worth when claimed. &#039;&#039;&#039;ScriptPubKey&#039;&#039;&#039; is the second half of a script (discussed later). There can be more than one output, and they share the combined value of the inputs. Because each output from one transaction can only ever be referenced once by an input of a subsequent transaction, the entire combined input value needs to be sent in an output if you don&#039;t want to lose it. If the input is worth 50 BTC but you only want to send 25 BTC, Bitcoin will create two outputs worth 25 BTC: one to the destination, and one back to you (known as &amp;quot;[[change]]&amp;quot;, though you send it to yourself). Any input bitcoins not redeemed in an output is considered a [[transaction fee]]; whoever generates the block can claim it by inserting it into the coinbase transaction of that block.&lt;br /&gt;
[[File:bitcointransactions.JPG|thumb|A sends 6.102 BTC to C and C generates 6.25 BTC. C sends 3.12009 BTC to D, and he needs to send himself some change. D sends the 3.12009 BTC to someone else, but they haven&#039;t redeemed it yet. Only D&#039;s output and C&#039;s change are capable of being spent in the current state.]]&lt;br /&gt;
&lt;br /&gt;
===== Verification =====&lt;br /&gt;
&lt;br /&gt;
To verify that inputs are authorized to collect the values of referenced outputs, Bitcoin uses a custom Forth-like [[script|scripting]] system. The input&#039;s scriptSig and the &#039;&#039;referenced&#039;&#039; output&#039;s scriptPubKey are evaluated (in that order), with scriptPubKey using the values left on the stack by scriptSig. The input is authorized if scriptPubKey returns true. Through the scripting system, the sender can create very complex conditions that people have to meet in order to claim the output&#039;s value. For example, it&#039;s possible to create an output that can be claimed by anyone without any authorization. It&#039;s also possible to require that an input be signed by ten different keys, or be redeemable with a password instead of a key.&lt;br /&gt;
&lt;br /&gt;
=== Types of Transaction ===&lt;br /&gt;
Bitcoin currently creates two different scriptSig/scriptPubKey pairs. These are described below.&lt;br /&gt;
&lt;br /&gt;
It is possible to design more complex types of transactions, and link them together into cryptographically enforced agreements. These are known as [[Contracts]].&lt;br /&gt;
&lt;br /&gt;
==== Pay-to-PubkeyHash ====&lt;br /&gt;
&lt;br /&gt;
 scriptPubKey: OP_DUP OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG&lt;br /&gt;
 scriptSig: &amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
A Bitcoin [[address]] is only a hash, so the sender can&#039;t provide a full public key in scriptPubKey. When redeeming coins that have been sent to a Bitcoin address, the recipient provides both the signature and the public key. The script verifies that the provided public key does hash to the hash in scriptPubKey, and then it also checks the signature against the public key.&lt;br /&gt;
&lt;br /&gt;
Checking process:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Stack &lt;br /&gt;
! Script &lt;br /&gt;
! Description &lt;br /&gt;
|-&lt;br /&gt;
|Empty.&lt;br /&gt;
| &amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; OP_DUP OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG &lt;br /&gt;
| scriptSig and scriptPubKey are combined.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
| OP_DUP OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG &lt;br /&gt;
| Constants are added to the stack.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
| OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG &lt;br /&gt;
| Top stack item is duplicated.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; &amp;lt;pubHashA&amp;gt;&lt;br /&gt;
|&amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG&lt;br /&gt;
| Top stack item is hashed.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; &amp;lt;pubHashA&amp;gt; &amp;lt;pubKeyHash&amp;gt;&lt;br /&gt;
|OP_EQUALVERIFY OP_CHECKSIG&lt;br /&gt;
| Constant added.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
|OP_CHECKSIG&lt;br /&gt;
| Equality is checked between the top two stack items.&lt;br /&gt;
|-&lt;br /&gt;
|true&lt;br /&gt;
|Empty.&lt;br /&gt;
|Signature is checked for top two stack items.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Pay-to-Script-Hash ====&lt;br /&gt;
&lt;br /&gt;
 scriptPubKey: OP_HASH160 &amp;lt;scriptHash&amp;gt; OP_EQUAL &lt;br /&gt;
 scriptSig: ..signatures... &amp;lt;serialized script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 m-of-n multi-signature transaction:&lt;br /&gt;
 scriptSig: 0 &amp;lt;sig1&amp;gt; ... &amp;lt;script&amp;gt;&lt;br /&gt;
 script: OP_m &amp;lt;pubKey1&amp;gt; ... OP_n OP_CHECKMULTISIG&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P2SH addresses were created with the motivation of moving &amp;quot;the responsibility for supplying the conditions to redeem a transaction from the sender of the funds to the redeemer. They allow the sender to fund an arbitrary transaction, no matter how complicated, using a 20-byte hash&amp;quot;[https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki#motivation 1]. Pay-to-Pubkey-hash addresses are similarly a 20-byte hash of the public key. &lt;br /&gt;
&lt;br /&gt;
Pay-to-script-hash provides a means for complicated transactions, unlike the Pay-to-pubkey-hash, which has a specific definition for scriptPubKey, and scriptSig. The specification places no limitations on the script, and hence absolutely any contract can be funded using these addresses. &lt;br /&gt;
&lt;br /&gt;
The scriptPubKey in the funding transaction is script which ensures that the script supplied in the redeeming transaction hashes to the script used to create the address. &lt;br /&gt;
&lt;br /&gt;
In the scriptSig above, &#039;signatures&#039; refers to any script which is sufficient to satisfy the following serialized script. &lt;br /&gt;
&lt;br /&gt;
Checking process:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Stack &lt;br /&gt;
! Script &lt;br /&gt;
! Description &lt;br /&gt;
|-&lt;br /&gt;
|Empty.&lt;br /&gt;
| 0 &amp;lt;sig1&amp;gt; &amp;lt;sig2&amp;gt; OP_2 &amp;lt;pubKey1&amp;gt; &amp;lt;pubKey2&amp;gt; &amp;lt;pubKey3&amp;gt; OP_3 OP_CHECKMULTISIG &lt;br /&gt;
| Only the scriptSig is used.&lt;br /&gt;
|-&lt;br /&gt;
| 0 &amp;lt;sig1&amp;gt; &amp;lt;sig2&amp;gt; OP_2 &amp;lt;pubKey1&amp;gt; &amp;lt;pubKey2&amp;gt; &amp;lt;pubKey3&amp;gt; OP_3 &lt;br /&gt;
| OP_CHECKMULTISIG &lt;br /&gt;
| Constants are added to the stack.&lt;br /&gt;
|-&lt;br /&gt;
| true&lt;br /&gt;
| Empty&lt;br /&gt;
| Signatures validated in the order of the keys in the script.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
=== Generation ===&lt;br /&gt;
&lt;br /&gt;
Generations have a single input, and this input has a &amp;quot;[[Coinbase |coinbase]]&amp;quot; parameter instead of a scriptSig. The data in &amp;quot;coinbase&amp;quot; can be anything; it isn&#039;t used. Bitcoin puts the current compact-format [[target]] and the arbitrary-precision &amp;quot;extraNonce&amp;quot; number there, which increments every time the Nonce field in the [[block_hashing_algorithm|block header]] overflows. Outputs can be anything, but Bitcoin creates one exactly like an IP address transaction.&lt;br /&gt;
The extranonce contributes to enlarge the domain for the proof of work function. Miners can easily modify nonce (4byte), timestamp and extranonce (2 to 100bytes).&lt;br /&gt;
&lt;br /&gt;
=== General format (inside a block) of each input of a transaction - Txin ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
|Previous Transaction hash &lt;br /&gt;
| doubled [[Wikipedia:SHA-256|SHA256]]-[[hash|hashed]] of a (previous) to-be-used transaction&lt;br /&gt;
|32 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Previous Txout-index&lt;br /&gt;
| non negative integer indexing an output of the to-be-used transaction&lt;br /&gt;
|4 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Txin-script length&lt;br /&gt;
|non negative integer [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
|1 - 9 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Txin-script / scriptSig&lt;br /&gt;
|[[Script]]&lt;br /&gt;
|&amp;lt;in-script length&amp;gt;-many bytes&lt;br /&gt;
|-&lt;br /&gt;
|sequence_no&lt;br /&gt;
|normally 0xFFFFFFFF; irrelevant unless transaction&#039;s lock_time is &amp;gt; 0&lt;br /&gt;
|4 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The input sufficiently describes where and how to get the bitcoin amout to be redeemed.&lt;br /&gt;
If it is the (only) input of the first transaction of a block, it is called the generation transaction input and its content completely ignored. (Historically the Previous Transaction hash is 0 and the Previous Txout-index is -1.)&lt;br /&gt;
&lt;br /&gt;
=== General format (inside a block) of each output of a transaction - Txout ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
|value&lt;br /&gt;
|non negative integer giving the number of [[FAQ#What_do_I_call_the_various_denominations_of_bitcoins.3F|Satoshis(BTC/10^8)]] to be transfered&lt;br /&gt;
|8 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Txout-script length&lt;br /&gt;
|non negative integer&lt;br /&gt;
|1 - 9 bytes [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
|-&lt;br /&gt;
|Txout-script / scriptPubKey&lt;br /&gt;
|[[Script]]&lt;br /&gt;
|&amp;lt;out-script length&amp;gt;-many bytes&lt;br /&gt;
|}&lt;br /&gt;
The output sets the conditions to release this bitcoin amount later. The sum of the output values of the first transaction is the value of the mined bitcoins for the block plus possible transactions fees of the other transactions in the block.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Script]]&lt;br /&gt;
* [[Protocol rules#&amp;quot;tx&amp;quot; messages|Protocol rules - &amp;quot;tx&amp;quot; messages]]&lt;br /&gt;
* [[Protocol documentation#Transaction Verification|Protocol documentation - Transaction Verification]]&lt;br /&gt;
* [[Raw Transactions]]&lt;br /&gt;
* [[Coin analogy]]&lt;br /&gt;
* [[Transaction Malleability]]&lt;br /&gt;
* [[Transaction broadcasting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Vocabulary]]&lt;br /&gt;
[[de:Transaktion]]&lt;br /&gt;
[[es:Transacción]]&lt;br /&gt;
[[pl:Transakcje]]&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69046</id>
		<title>File:Bitcointransactions.JPG</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcointransactions.JPG&amp;diff=69046"/>
		<updated>2021-12-02T13:28:36Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: Transactions were ordered chronologically, left to right. Inputs/outputs were moved to left/right. Color was added to differentiate inputs/outputs. Arrow styles were changed to highlight broadcasting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Transactions were ordered chronologically, left to right. Inputs/outputs were moved to left/right. Color was added to differentiate inputs/outputs. Arrow styles were changed to highlight broadcasting.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|Cc-zero}}&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Transaction&amp;diff=69044</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Transaction&amp;diff=69044"/>
		<updated>2021-12-02T13:11:26Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: updated transactions image and description of amounts in transaction process.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:TxBinaryMap.png|thumb|right|Byte-map of Transaction with each type of TxIn and TxOut]]&lt;br /&gt;
A &#039;&#039;&#039;transaction&#039;&#039;&#039; is a transfer of Bitcoin value that is broadcast to the [[network]] and collected into [[block|blocks]]. A transaction typically references previous transaction outputs as new transaction inputs and dedicates all input Bitcoin values to new outputs. Transactions are not encrypted, so it is possible to browse and view every transaction ever collected into a block. Once transactions are buried under enough [[Confirmation|confirmations]] they can be considered [[Irreversible Transactions|irreversible]].&lt;br /&gt;
&lt;br /&gt;
This article is about &#039;&#039;&#039;on-chain transactions&#039;&#039;&#039;. See also: [[Off-Chain Transactions]]&lt;br /&gt;
&lt;br /&gt;
Standard transaction outputs nominate [[address|addresses]], and the redemption of any future inputs requires a relevant signature.&lt;br /&gt;
&lt;br /&gt;
All transactions are visible in the [[block chain]], and can be viewed with a hex editor. A [[block chain browser]] is a site where every transaction included within the block chain can be viewed in human-readable terms.  This is useful for seeing the technical details of transactions in action and for verifying payments.&lt;br /&gt;
&lt;br /&gt;
=== General format of a Bitcoin transaction (inside a block) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
|Version no&lt;br /&gt;
|currently 1&lt;br /&gt;
|4 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Flag&lt;br /&gt;
|If present, always 0001, and indicates the presence of witness data&lt;br /&gt;
|optional 2 byte array&lt;br /&gt;
|-&lt;br /&gt;
|In-counter&lt;br /&gt;
| positive integer [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
| 1 - 9 bytes &lt;br /&gt;
|-&lt;br /&gt;
|list of inputs&lt;br /&gt;
|[[Transaction#General_format_.28inside_a_block.29_of_each_input_of_a_transaction_-_Txin|the first input of the first transaction is also called &amp;quot;coinbase&amp;quot; (its content was ignored in earlier versions)]]&lt;br /&gt;
|&amp;lt;in-counter&amp;gt;-many inputs&lt;br /&gt;
|-&lt;br /&gt;
|Out-counter&lt;br /&gt;
| positive integer [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
| 1 - 9 bytes&lt;br /&gt;
|-&lt;br /&gt;
|list of outputs&lt;br /&gt;
|[[Transaction#General_format_.28inside_a_block.29_of_each_output_of_a_transaction_-_Txout|the outputs of the first transaction spend the mined bitcoins for the block]]&lt;br /&gt;
|&amp;lt;out-counter&amp;gt;-many outputs&lt;br /&gt;
|-&lt;br /&gt;
|Witnesses&lt;br /&gt;
|A list of witnesses, 1 for each input, omitted if flag above is missing&lt;br /&gt;
|variable, see [[Segregated_Witness]]&lt;br /&gt;
|-&lt;br /&gt;
|lock_time&lt;br /&gt;
|if non-zero and sequence numbers are &amp;lt; 0xFFFFFFFF: block height or timestamp when transaction is final&lt;br /&gt;
|4 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Principle example of a Bitcoin transaction with 1 input and 1 output only ===&lt;br /&gt;
&lt;br /&gt;
==== Data ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Input:&lt;br /&gt;
Previous tx: f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6&lt;br /&gt;
Index: 0&lt;br /&gt;
scriptSig: 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d10&lt;br /&gt;
90db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
Value: 5000000000&lt;br /&gt;
scriptPubKey: OP_DUP OP_HASH160 404371705fa9bd789a2fcd52d2c580b65d35549d&lt;br /&gt;
OP_EQUALVERIFY OP_CHECKSIG&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Explanation ====&lt;br /&gt;
&lt;br /&gt;
The input in this transaction imports 50 BTC from output #0 in transaction f5d8... Then the output sends 50 BTC to a Bitcoin address (expressed here in hexadecimal 4043... instead of the normal base58). When the recipient wants to spend this money, he will reference output #0 of this transaction in an input of his own transaction.&lt;br /&gt;
&lt;br /&gt;
===== Input =====&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;input&#039;&#039;&#039; is a reference to an output from a previous transaction. Multiple inputs are often listed in a transaction. All of the new transaction&#039;s input values (that is, the total coin value of the previous outputs referenced by the new transaction&#039;s inputs) are added up, and the total (less any transaction fee) is completely used by the outputs of the new transaction. &#039;&#039;&#039;Previous tx&#039;&#039;&#039; is a [[hash]] of a previous transaction. &#039;&#039;&#039;Index&#039;&#039;&#039; is the specific output in the referenced transaction. &#039;&#039;&#039;ScriptSig&#039;&#039;&#039; is the first half of a [[script]] (discussed in more detail later).&lt;br /&gt;
&lt;br /&gt;
The script contains two components, a signature and a public key. The public key must match the hash given in the script of the redeemed output. The public key is used to verify the redeemers signature, which is the second component. More precisely, the second component is an [[ECDSA]] signature over a hash of a simplified version of the transaction. It, combined with the public key, proves the transaction was created by the real owner of the bitcoins in question. Various flags define how the transaction is simplified and can be used to create different types of payment.&lt;br /&gt;
&lt;br /&gt;
===== Output =====&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;output&#039;&#039;&#039; contains instructions for sending bitcoins. &#039;&#039;&#039;Value&#039;&#039;&#039; is the number of Satoshi (1 BTC = 100,000,000 Satoshi) that this output will be worth when claimed. &#039;&#039;&#039;ScriptPubKey&#039;&#039;&#039; is the second half of a script (discussed later). There can be more than one output, and they share the combined value of the inputs. Because each output from one transaction can only ever be referenced once by an input of a subsequent transaction, the entire combined input value needs to be sent in an output if you don&#039;t want to lose it. If the input is worth 50 BTC but you only want to send 25 BTC, Bitcoin will create two outputs worth 25 BTC: one to the destination, and one back to you (known as &amp;quot;[[change]]&amp;quot;, though you send it to yourself). Any input bitcoins not redeemed in an output is considered a [[transaction fee]]; whoever generates the block can claim it by inserting it into the coinbase transaction of that block.&lt;br /&gt;
[[File:transactions.JPG|thumb|A sends 6.102 BTC to C and C generates 6.25 BTC. C sends 3.12009 BTC to D, and he needs to send himself some change. D sends the 3.12009 BTC to someone else, but they haven&#039;t redeemed it yet. Only D&#039;s output and C&#039;s change are capable of being spent in the current state.]]&lt;br /&gt;
&lt;br /&gt;
===== Verification =====&lt;br /&gt;
&lt;br /&gt;
To verify that inputs are authorized to collect the values of referenced outputs, Bitcoin uses a custom Forth-like [[script|scripting]] system. The input&#039;s scriptSig and the &#039;&#039;referenced&#039;&#039; output&#039;s scriptPubKey are evaluated (in that order), with scriptPubKey using the values left on the stack by scriptSig. The input is authorized if scriptPubKey returns true. Through the scripting system, the sender can create very complex conditions that people have to meet in order to claim the output&#039;s value. For example, it&#039;s possible to create an output that can be claimed by anyone without any authorization. It&#039;s also possible to require that an input be signed by ten different keys, or be redeemable with a password instead of a key.&lt;br /&gt;
&lt;br /&gt;
=== Types of Transaction ===&lt;br /&gt;
Bitcoin currently creates two different scriptSig/scriptPubKey pairs. These are described below.&lt;br /&gt;
&lt;br /&gt;
It is possible to design more complex types of transactions, and link them together into cryptographically enforced agreements. These are known as [[Contracts]].&lt;br /&gt;
&lt;br /&gt;
==== Pay-to-PubkeyHash ====&lt;br /&gt;
&lt;br /&gt;
 scriptPubKey: OP_DUP OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG&lt;br /&gt;
 scriptSig: &amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
A Bitcoin [[address]] is only a hash, so the sender can&#039;t provide a full public key in scriptPubKey. When redeeming coins that have been sent to a Bitcoin address, the recipient provides both the signature and the public key. The script verifies that the provided public key does hash to the hash in scriptPubKey, and then it also checks the signature against the public key.&lt;br /&gt;
&lt;br /&gt;
Checking process:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Stack &lt;br /&gt;
! Script &lt;br /&gt;
! Description &lt;br /&gt;
|-&lt;br /&gt;
|Empty.&lt;br /&gt;
| &amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; OP_DUP OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG &lt;br /&gt;
| scriptSig and scriptPubKey are combined.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
| OP_DUP OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG &lt;br /&gt;
| Constants are added to the stack.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
| OP_HASH160 &amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG &lt;br /&gt;
| Top stack item is duplicated.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; &amp;lt;pubHashA&amp;gt;&lt;br /&gt;
|&amp;lt;pubKeyHash&amp;gt; OP_EQUALVERIFY OP_CHECKSIG&lt;br /&gt;
| Top stack item is hashed.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt; &amp;lt;pubHashA&amp;gt; &amp;lt;pubKeyHash&amp;gt;&lt;br /&gt;
|OP_EQUALVERIFY OP_CHECKSIG&lt;br /&gt;
| Constant added.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sig&amp;gt; &amp;lt;pubKey&amp;gt;&lt;br /&gt;
|OP_CHECKSIG&lt;br /&gt;
| Equality is checked between the top two stack items.&lt;br /&gt;
|-&lt;br /&gt;
|true&lt;br /&gt;
|Empty.&lt;br /&gt;
|Signature is checked for top two stack items.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Pay-to-Script-Hash ====&lt;br /&gt;
&lt;br /&gt;
 scriptPubKey: OP_HASH160 &amp;lt;scriptHash&amp;gt; OP_EQUAL &lt;br /&gt;
 scriptSig: ..signatures... &amp;lt;serialized script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 m-of-n multi-signature transaction:&lt;br /&gt;
 scriptSig: 0 &amp;lt;sig1&amp;gt; ... &amp;lt;script&amp;gt;&lt;br /&gt;
 script: OP_m &amp;lt;pubKey1&amp;gt; ... OP_n OP_CHECKMULTISIG&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P2SH addresses were created with the motivation of moving &amp;quot;the responsibility for supplying the conditions to redeem a transaction from the sender of the funds to the redeemer. They allow the sender to fund an arbitrary transaction, no matter how complicated, using a 20-byte hash&amp;quot;[https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki#motivation 1]. Pay-to-Pubkey-hash addresses are similarly a 20-byte hash of the public key. &lt;br /&gt;
&lt;br /&gt;
Pay-to-script-hash provides a means for complicated transactions, unlike the Pay-to-pubkey-hash, which has a specific definition for scriptPubKey, and scriptSig. The specification places no limitations on the script, and hence absolutely any contract can be funded using these addresses. &lt;br /&gt;
&lt;br /&gt;
The scriptPubKey in the funding transaction is script which ensures that the script supplied in the redeeming transaction hashes to the script used to create the address. &lt;br /&gt;
&lt;br /&gt;
In the scriptSig above, &#039;signatures&#039; refers to any script which is sufficient to satisfy the following serialized script. &lt;br /&gt;
&lt;br /&gt;
Checking process:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Stack &lt;br /&gt;
! Script &lt;br /&gt;
! Description &lt;br /&gt;
|-&lt;br /&gt;
|Empty.&lt;br /&gt;
| 0 &amp;lt;sig1&amp;gt; &amp;lt;sig2&amp;gt; OP_2 &amp;lt;pubKey1&amp;gt; &amp;lt;pubKey2&amp;gt; &amp;lt;pubKey3&amp;gt; OP_3 OP_CHECKMULTISIG &lt;br /&gt;
| Only the scriptSig is used.&lt;br /&gt;
|-&lt;br /&gt;
| 0 &amp;lt;sig1&amp;gt; &amp;lt;sig2&amp;gt; OP_2 &amp;lt;pubKey1&amp;gt; &amp;lt;pubKey2&amp;gt; &amp;lt;pubKey3&amp;gt; OP_3 &lt;br /&gt;
| OP_CHECKMULTISIG &lt;br /&gt;
| Constants are added to the stack.&lt;br /&gt;
|-&lt;br /&gt;
| true&lt;br /&gt;
| Empty&lt;br /&gt;
| Signatures validated in the order of the keys in the script.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[BIP 0016]]&lt;br /&gt;
&lt;br /&gt;
=== Generation ===&lt;br /&gt;
&lt;br /&gt;
Generations have a single input, and this input has a &amp;quot;[[Coinbase |coinbase]]&amp;quot; parameter instead of a scriptSig. The data in &amp;quot;coinbase&amp;quot; can be anything; it isn&#039;t used. Bitcoin puts the current compact-format [[target]] and the arbitrary-precision &amp;quot;extraNonce&amp;quot; number there, which increments every time the Nonce field in the [[block_hashing_algorithm|block header]] overflows. Outputs can be anything, but Bitcoin creates one exactly like an IP address transaction.&lt;br /&gt;
The extranonce contributes to enlarge the domain for the proof of work function. Miners can easily modify nonce (4byte), timestamp and extranonce (2 to 100bytes).&lt;br /&gt;
&lt;br /&gt;
=== General format (inside a block) of each input of a transaction - Txin ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
|Previous Transaction hash &lt;br /&gt;
| doubled [[Wikipedia:SHA-256|SHA256]]-[[hash|hashed]] of a (previous) to-be-used transaction&lt;br /&gt;
|32 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Previous Txout-index&lt;br /&gt;
| non negative integer indexing an output of the to-be-used transaction&lt;br /&gt;
|4 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Txin-script length&lt;br /&gt;
|non negative integer [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
|1 - 9 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Txin-script / scriptSig&lt;br /&gt;
|[[Script]]&lt;br /&gt;
|&amp;lt;in-script length&amp;gt;-many bytes&lt;br /&gt;
|-&lt;br /&gt;
|sequence_no&lt;br /&gt;
|normally 0xFFFFFFFF; irrelevant unless transaction&#039;s lock_time is &amp;gt; 0&lt;br /&gt;
|4 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The input sufficiently describes where and how to get the bitcoin amout to be redeemed.&lt;br /&gt;
If it is the (only) input of the first transaction of a block, it is called the generation transaction input and its content completely ignored. (Historically the Previous Transaction hash is 0 and the Previous Txout-index is -1.)&lt;br /&gt;
&lt;br /&gt;
=== General format (inside a block) of each output of a transaction - Txout ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
|value&lt;br /&gt;
|non negative integer giving the number of [[FAQ#What_do_I_call_the_various_denominations_of_bitcoins.3F|Satoshis(BTC/10^8)]] to be transfered&lt;br /&gt;
|8 bytes&lt;br /&gt;
|-&lt;br /&gt;
|Txout-script length&lt;br /&gt;
|non negative integer&lt;br /&gt;
|1 - 9 bytes [[ Protocol_specification#Variable_length_integer|VI = VarInt]]&lt;br /&gt;
|-&lt;br /&gt;
|Txout-script / scriptPubKey&lt;br /&gt;
|[[Script]]&lt;br /&gt;
|&amp;lt;out-script length&amp;gt;-many bytes&lt;br /&gt;
|}&lt;br /&gt;
The output sets the conditions to release this bitcoin amount later. The sum of the output values of the first transaction is the value of the mined bitcoins for the block plus possible transactions fees of the other transactions in the block.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Script]]&lt;br /&gt;
* [[Protocol rules#&amp;quot;tx&amp;quot; messages|Protocol rules - &amp;quot;tx&amp;quot; messages]]&lt;br /&gt;
* [[Protocol documentation#Transaction Verification|Protocol documentation - Transaction Verification]]&lt;br /&gt;
* [[Raw Transactions]]&lt;br /&gt;
* [[Coin analogy]]&lt;br /&gt;
* [[Transaction Malleability]]&lt;br /&gt;
* [[Transaction broadcasting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Vocabulary]]&lt;br /&gt;
[[de:Transaktion]]&lt;br /&gt;
[[es:Transacción]]&lt;br /&gt;
[[pl:Transakcje]]&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Transactions.JPG&amp;diff=69043</id>
		<title>File:Transactions.JPG</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Transactions.JPG&amp;diff=69043"/>
		<updated>2021-12-02T13:05:13Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: CarbonChris uploaded a new version of File:Transactions.JPG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Transactions were ordered chronologically, left to right. Inputs/outputs were moved to left/right. Color was added to differentiate inputs/outputs. Arrow styles were changed to highlight broadcasting.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|Cc-zero}}&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Transactions.JPG&amp;diff=69042</id>
		<title>File:Transactions.JPG</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Transactions.JPG&amp;diff=69042"/>
		<updated>2021-12-02T12:57:47Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: Transactions were ordered chronologically, left to right. Inputs/outputs were moved to left/right. Color was added to differentiate inputs/outputs. Arrow styles were changed to highlight broadcasting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Transactions were ordered chronologically, left to right. Inputs/outputs were moved to left/right. Color was added to differentiate inputs/outputs. Arrow styles were changed to highlight broadcasting.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|Cc-zero}}&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin_Transactions.jpg&amp;diff=69039</id>
		<title>File:Bitcoin Transactions.jpg</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin_Transactions.jpg&amp;diff=69039"/>
		<updated>2021-12-01T13:48:03Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Original diagram posted by Theymos, 21:56, 19 December 2010.&lt;br /&gt;
Revision done by CarbonChris&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:CarbonChris&amp;diff=69038</id>
		<title>User:CarbonChris</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:CarbonChris&amp;diff=69038"/>
		<updated>2021-12-01T12:16:12Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Carbon Chris is a Bitcoin Educator, Co-organizer of the Seoul Bitcoin Meetup, and occasionally freelance writer.&lt;br /&gt;
Twitter: [https://twitter.com/chrispalasz @chrispalasz]&lt;br /&gt;
Website: [http://carbonchris.com/ carbonchris.com]&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:CarbonChris&amp;diff=69037</id>
		<title>User:CarbonChris</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:CarbonChris&amp;diff=69037"/>
		<updated>2021-12-01T12:15:02Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: Created page with &amp;quot;Carbon Chris is a Bitcoin Educator, Co-organizer of the Seoul Bitcoin Meetup, and occasionally freelance writer. Twitter: @chrispalasz Website: carbonchris.com&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Carbon Chris is a Bitcoin Educator, Co-organizer of the Seoul Bitcoin Meetup, and occasionally freelance writer.&lt;br /&gt;
Twitter: @chrispalasz&lt;br /&gt;
Website: carbonchris.com&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=65604</id>
		<title>Weaknesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Weaknesses&amp;diff=65604"/>
		<updated>2018-07-24T08:45:13Z</updated>

		<summary type="html">&lt;p&gt;CarbonChris: I felt the wording in this section did not carry the full weight of the threat and power possessed by an attacker with &amp;#039;majority&amp;#039; hash power. Specifically and most importantly, the attacker can affect an entire coin history with a double spend.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Might be a problem ==&lt;br /&gt;
=== Wallet Vulnerable To Theft ===&lt;br /&gt;
&lt;br /&gt;
The [[wallet]] is stored unencrypted, by default, and thus becomes a valuable target for theft.  Recent releases of the Bitcoin client now supports encryption to protect the wallet data, though the user must opt-in.&lt;br /&gt;
&lt;br /&gt;
==== New wallets vulnerable with old passwords via backups ====&lt;br /&gt;
&lt;br /&gt;
An old copy of a wallet with its old password is often easily retrievable via an existing backup facility (particularly Apple Time-Machine): draining that old wallet, with its old password, drains the current wallet with the current password -- this is contrary to most non-technical users expectation of what &#039;change the password on your wallet&#039; should mean following password compromise.&lt;br /&gt;
&lt;br /&gt;
An initial solution is to mandate (either in code or as expressed policy) that changing a wallet&#039;s password causes (or asks the user to cause) the creation of a new wallet with new addresses, and the sending of existing sums to them. Backed-up copies of the original wallet with the original password would then be empty, should they be compromised. On the downside, the password-changing process would potentially take much longer, cost a transaction fee or more, and - intially at least - the new wallet is no longer backed up. On the upside, non-technical users won&#039;t find their wallets drained from security compromises they believed they had closed, nor be required to locate existing backups of a wallet in order to destroy them.&lt;br /&gt;
&lt;br /&gt;
=== Tracing a coin&#039;s history ===&lt;br /&gt;
Tracing a coin&#039;s history can be used to connect identities to addresses (the [[Anonymity]] article elaborates on this concern in greater detail).&lt;br /&gt;
&lt;br /&gt;
=== Sybil attack ===&lt;br /&gt;
If an attacker attempts to fill the network with clients that they control, you would then be very likely to connect only to attacker nodes.  Although Bitcoin never uses a count of nodes for anything, completely isolating a node from the honest network can be helpful in the execution of other attacks.&lt;br /&gt;
&lt;br /&gt;
This state can be exploited in (at least) the following ways:&lt;br /&gt;
&lt;br /&gt;
* the attacker can refuse to relay blocks and transactions from everyone, effectively disconnecting you from the network&lt;br /&gt;
* the attacker can relay only blocks that they create, effectively putting you on a separate network and then also leaving you open to [[double-spending]] attacks&lt;br /&gt;
* if you rely on transactions with 0 confirmations, the attacker can just filter out certain transactions to execute [[double-spending]] attacks&lt;br /&gt;
* low-latency encryption/anonymization of Bitcoin&#039;s transmissions (with Tor, JAP, etc.) can be defeated relatively easily with a timing attack if you&#039;re connected to several of the attacker&#039;s nodes and the attacker is watching your transmissions at your ISP&lt;br /&gt;
&lt;br /&gt;
Bitcoin makes these attacks more difficult by only making an outbound connection to one IP address per /16 (x.y.0.0).  Incoming connections are unlimited and unregulated, but this is generally only a problem in the anonymity case where you&#039;re probably already unable to accept incoming connections.&lt;br /&gt;
&lt;br /&gt;
Looking for suspiciously-low network hash-rates may help prevent the second one.&lt;br /&gt;
&lt;br /&gt;
=== Packet sniffing ===&lt;br /&gt;
Someone who can see all of your Internet traffic can easily see when you send a transaction that you didn&#039;t receive (which suggests you originated it). Bitcoin-QT has good Tor integration which closes this attack vector if used.&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service (DoS) attacks ===&lt;br /&gt;
Sending lots of data to a node may make it so busy it cannot process normal Bitcoin transactions.  Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
These are the current Bitcoin Satoshi client protections to deter DoS attacks, as of version 0.7.0:&lt;br /&gt;
&lt;br /&gt;
# Does not forward orphan transactions/blocks&lt;br /&gt;
# Does not forward double-spend transactions&lt;br /&gt;
# Does not forward the same block, transaction or alert twice to the same peer.&lt;br /&gt;
# Continuous rate-limit of free transactions to mitigate &#039;penny-flooding&#039;&lt;br /&gt;
# Keeps a DoS score of each connected peer and disconnects from a peer that send messages that fail to comply with the rules.&lt;br /&gt;
# Bans IP addresses that misbehave for a time lapse (24 hours default)&lt;br /&gt;
# Limits the number of stored orphan transactions (10000 by default)&lt;br /&gt;
# Uses a signature cache to prevent attacks that try to continuously trigger the re-verification of stored orphan transactions (protects from https://bitcointalk.org/index.php?topic=136422.0 attack)&lt;br /&gt;
# Limits the number of stored signatures in the signature cache (50000 signatures by default)&lt;br /&gt;
# Tries to catch all possible errors in transactions before the signature verifications take place, to avoid DoS attacks on CPU usage.&lt;br /&gt;
# Penalizes peers that send lots of duplicate/expired/invalid-signature/whatever alerts, so they eventually get banned.&lt;br /&gt;
# In orphan/signature caches, when removing an item, evicts a random entry.&lt;br /&gt;
# Data structures are specially chosen to avoid loops in which the number of iterations can be controlled by an attacker that result in exponential complexity.&lt;br /&gt;
# Ignores big orphan transactions, to avoid a send-big-orphans memory exhaustion attack.&lt;br /&gt;
# In RPC: Only sends a HTTP 403 response if it&#039;s not using SSL to prevent a DoS during the SSL handshake.&lt;br /&gt;
# In RPC: Sleeps some time if authorization fails to deter brute-forcing short passwords.&lt;br /&gt;
# In GUI: Limits URI length to prevent a DoS against the QR-Code dialog&lt;br /&gt;
# Considers non-standard signature scripts with size greater than 500 bytes.&lt;br /&gt;
# Considers non-standard signature scripts that contain operations that are not PUSHs.&lt;br /&gt;
# Does not forward nor process non-standard transactions&lt;br /&gt;
&lt;br /&gt;
These are protocol rules built to prevent DoS:&lt;br /&gt;
&lt;br /&gt;
# Restricts the block size to 1 megabyte.&lt;br /&gt;
# Restricts the maximum number of signature checks a transaction input may request&lt;br /&gt;
# Limits the size of each script (up to 10000 bytes)&lt;br /&gt;
# Limits the size of each value pushed while evaluating a a script (up to 520 bytes)&lt;br /&gt;
# Limits the number of expensive operations in a script (up to 201 operations). All but pushs are considered expensive. Also each key argument of signature checking in multi-signature checking (OP_CHECKMULTISIG) is considered an additional operation.&lt;br /&gt;
# Limits the number of key arguments OP_CHECKMULTISIG can use (up to 20 keys)&lt;br /&gt;
# Limits the number of the stack elements that can be stored simultaneously (up to 1000 elements, in standard and alt stacks together)&lt;br /&gt;
# Limits the number of signature checks a block may request (up to 20000 checks)&lt;br /&gt;
&lt;br /&gt;
These are the Satoshi client protections added in version 0.8.0: &lt;br /&gt;
&lt;br /&gt;
# Transactions greater than 100 Kbytes are considered non-standard (protects from variations of the https://bitcointalk.org/index.php?topic=140078.0 attack).&lt;br /&gt;
# Only the UXTO (Unspent Transaction Output Set) is stored in memory, the remaining data is stored on disk.&lt;br /&gt;
# When processing a transaction, before fetching transaction inputs from disk to memory, the client checks that all the inputs are unspent (protects from the Continuous Hard Disk Seek/Read Activity (https://bitcointalk.org/index.php?topic=144122.0) DoS attack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Satoshi client does not directly limit peer bandwidth nor CPU usage.&lt;br /&gt;
&lt;br /&gt;
=== Forcing clock drift against a target node ===&lt;br /&gt;
&lt;br /&gt;
See [http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html Timejacking] for a description of this attack. It can be fixed by changing how nodes calculate the current time.&lt;br /&gt;
&lt;br /&gt;
=== Illegal content in the block chain ===&lt;br /&gt;
It is illegal in some countries to possess/distribute certain kinds of data. Since arbitrary data can be included in Bitcoin transactions, and full Bitcoin nodes must normally have a copy of all unspent transactions, this could cause legal problems. However, Local node policy generally doesn&#039;t permit arbitrary data (transactions attempting to embed data are non-standard), but steganographic embedding can still be used though this generally limits storage to small amounts.  [http://sourceforge.net/mailarchive/message.php?msg_id=30705609 Various ideas have been proposed] to further limit data storage in the UTXO set (but are not currently being seriously considered for deployment).&lt;br /&gt;
&lt;br /&gt;
=== Security Vulnerabilities and bugs  ===&lt;br /&gt;
It&#039;s possible but unlikely that a newly discovered bug or security vulnerability in the standard client could lead to a block chain split, or the need for every node to upgrade in a short time period. For example, a single malformed message tailored to exploit a specific vulnerability, when spread from node to node, could cause the whole network to shutdown in a few hours. Bugs that break user anonymity, on the contrary, have been found, since the pseudo-anonymity property of Bitcoin has been analyzed less.&lt;br /&gt;
Starting from version 0.7.0, Bitcoin client can be considered a mature project. The security critical sections of the source code are updated less and less frequently and those parts have been reviewed by many computer security experts. Also Bitcoin Satoshi client has passed the test of being on-line for more than 3 years, without a single vulnerability being exploited &#039;&#039;in the wild&#039;&#039;. &lt;br /&gt;
See [[Common Vulnerabilities and Exposures]] for a detailed list of vulnerabilities detected and fixed.&lt;br /&gt;
&lt;br /&gt;
=== Energy Consumption ===&lt;br /&gt;
Energy consumption for mining has a high correlation with bitcoin value (exchange rate). Because variable costs of [[mining]] are dominated by electricity price, the economic equilibrium for the mining rate is reached when global electricity costs for mining approximate the value of [[mining]] reward plus [[transaction_fee | transaction fees]]. &lt;br /&gt;
&lt;br /&gt;
So the higher the value of one bitcoin, the higher the value of mining rewards and transaction fees, the higher the energy consumption of the bitcoin network in the long run.&lt;br /&gt;
&lt;br /&gt;
* more efficient mining gear does not reduce energy use of the bitcoin network. It will only raise the network [[difficulty]]&lt;br /&gt;
* cheaper energy linearly increases mining energy use of the bitcoin network&lt;br /&gt;
* the same conclusions apply to all [[proof of work]] based currencies.&lt;br /&gt;
&lt;br /&gt;
== Probably not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Breaking the cryptography===&lt;br /&gt;
SHA-256 and [[ECDSA]] are considered very strong currently, but they might be broken in the far future. If that happens, Bitcoin can shift to a stronger algorithm. [https://bitcointalk.org/index.php?topic=191.msg1585#msg1585 More info].&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
Bitcoin can easily scale beyond the level of traffic VISA sees globally today. See the discussion on the [[scalability]] page for more information.&lt;br /&gt;
&lt;br /&gt;
===Segmentation===&lt;br /&gt;
If there is even a &amp;quot;trickle&amp;quot; of a connection between two sides of a segmented network, things should still work perfectly. When block chains are combined, all of the non-generation transactions in the shorter chain are re-added to the transaction pool -- they&#039;ll start over at 0/unconfirmed, but they&#039;ll still be valid. No mature transactions will be lost unless the segmentation persists for longer than ~120 blocks. Then generations will start to mature, and any transactions based on those generations will become invalid when recombined with the longer chain. [https://bitcointalk.org/index.php?topic=241.msg2071#msg2071 More info].&lt;br /&gt;
&lt;br /&gt;
=== Attacking all users ===&lt;br /&gt;
The IP addresses of most users are totally public. You can use Tor to hide this, but the network won&#039;t work if everyone does this. Bitcoin requires that &#039;&#039;some&#039;&#039; country is still free.&lt;br /&gt;
&lt;br /&gt;
=== Dropping transactions ===&lt;br /&gt;
Nodes that generate blocks can choose not to include a transaction in their blocks. When this happens, the transaction remains &amp;quot;active&amp;quot; and can be included in a later block. Two things discourage this:&lt;br /&gt;
* Nodes only hash a fixed-size &#039;&#039;header&#039;&#039;, so there is no speed advantage to dropping transactions.&lt;br /&gt;
* [[Satoshi]] has [https://bitcointalk.org/index.php?topic=165.msg1595#msg1595 communicated] that he will write code to stop this kind of thing if it becomes a problem.&lt;br /&gt;
&lt;br /&gt;
=== Attacker has a lot of computing power ===&lt;br /&gt;
An attacker that controls more than 50% of the network&#039;s computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:&lt;br /&gt;
* Reverse transactions that he sends while he&#039;s in control.  This has the potential to [[Double-spending#51.25_attack|double-spend transactions]] that previously had already been seen in the block chain, affecting all coins that share a history with the reversed transaction&lt;br /&gt;
* Reverse confirmations for any transaction that had previously been seen in the block chain while he’s in control. &lt;br /&gt;
* Prevent some or all transactions from gaining any confirmations&lt;br /&gt;
* Prevent some or all other miners from mining any valid blocks&lt;br /&gt;
The attacker &#039;&#039;can&#039;t&#039;&#039;:&lt;br /&gt;
* Reverse other people&#039;s transactions without their cooperation (unless their coin history has been affected by a double-spend)&lt;br /&gt;
* Prevent transactions from being sent at all (they&#039;ll show as 0/unconfirmed)&lt;br /&gt;
* Change the number of coins generated per block&lt;br /&gt;
* Create coins out of thin air&lt;br /&gt;
* Send coins that never belonged to him&lt;br /&gt;
&lt;br /&gt;
Note that the above limitations only apply to the perspective of Bitcoin as seen by [[full node]]s. Some lightweight nodes work by trusting miners absolutely; from the perspective of Bitcoin as seen by lightweight nodes, miners &#039;&#039;can&#039;&#039; steal BTC, etc. This is one of the reasons why lightweight nodes are less secure than full nodes.&lt;br /&gt;
&lt;br /&gt;
With less than 50%, the same kind of attacks are possible, but with less than 100% rate of success.&lt;br /&gt;
For example, someone with only 40% of the network computing power can overcome a 6-deep confirmed transaction with a 50% success rate &amp;lt;ref&amp;gt;https://bitcoil.co.il/Doublespend.pdf&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It&#039;s much more difficult to change historical blocks, and it becomes exponentially more difficult the further back you go. As above, changing historical blocks only allows you to exclude and change the ordering of transactions. If miners rewrite historical blocks too far back, then full nodes with pruning enabled will be unable to continue, and will shut down; the network situation would then probably need to be untangled manually (eg. by updating the software to reject this chain even though it is longer).&lt;br /&gt;
&lt;br /&gt;
Since this attack doesn&#039;t permit all that much power over the network, it is expected that rational miners will not attempt it. A profit-seeking miner should always gain more by just following the rules, and even someone trying to destroy the system might find other attacks more attractive. Probably the most likely scenario where this attack would be employed would be for a government to try to get control over Bitcoin by acquiring a majority of hashing power (either directly or by enforcing rules on private miners within its borders). Then this government could use the transaction-censorship power listed above to do things like:&lt;br /&gt;
&lt;br /&gt;
* Prevent any transactions spending &amp;quot;stolen&amp;quot; coins, effectively destroying those coins. If the coins clearly are stolen, then there is a risk that this action will be accepted by the Bitcoin community, but this would set a very damaging precedent. If it becomes possible for coins to be blacklisted in this way, then it is a slippery slope toward blacklisting of other &amp;quot;suspicious&amp;quot; coins.&lt;br /&gt;
* Prevent all transactions from unknown people, so everyone has to register with the government in order to transact.&lt;br /&gt;
&lt;br /&gt;
The appropriate response to any long-term attack by miners is a [[hardfork]] to change the proof-of-work function. This fires all existing miners, and allows totally new ones to replace them.&lt;br /&gt;
&lt;br /&gt;
See also: [[Majority_attack]]&lt;br /&gt;
&lt;br /&gt;
=== Spamming transactions ===&lt;br /&gt;
{{main|Flood attack}}&lt;br /&gt;
It is easy to send transactions to yourself repeatedly. If these transactions fill blocks to the maximum size (1MB), other transactions would be delayed until the next block.&lt;br /&gt;
&lt;br /&gt;
This is made expensive by the [[transaction fee|fees]] that would be required after the 50KB of free transactions per block are exhausted. An attacker will eventually eliminate free transactions, but Bitcoin fees will always be low because raising fees above 0.01 BTC per KB would require spending transaction fees. An attacker will eventually run out of money. Even if an attacker wants to waste money, transactions are further prioritized by the time since the coins were last spent, so attacks spending the same coins repeatedly are less effective.&lt;br /&gt;
&lt;br /&gt;
=== The [[Double-spending#Finney_attack|Finney attack]] ===&lt;br /&gt;
Named for Hal Finney, who first described this variation of a double-spend attack involving accepting [http://www.bitcointalk.org/index.php?topic=3441.msg48384#msg48384 0-confirmation transactions].  Accepting 0-confirmation large-value transactions is problematic; accepting them for low-value transactions (after waiting several seconds to detect an ordinary double-spend attempt) is probably safe.&lt;br /&gt;
&lt;br /&gt;
===Rival/malicious client code===&lt;br /&gt;
Any rival client must follow Bitcoin&#039;s rules or else all current Bitcoin clients will ignore it. You&#039;d have to actually get people to &#039;&#039;use&#039;&#039; your client. A better client that pretends to follow the same rules, but with an exception known only to the author (possibly by making it closed source), might conceivably be able to gain widespread adoption. At that point, its author could use his exception and go largely unnoticed.&lt;br /&gt;
&lt;br /&gt;
== Definitely not a problem ==&lt;br /&gt;
&lt;br /&gt;
===Coin destruction===&lt;br /&gt;
Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC.&lt;br /&gt;
&lt;br /&gt;
The maximum number of raw units might not be enough if the &#039;&#039;entire world&#039;&#039; starts using BTC, but it would not be too difficult to increase precision in that case. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.&lt;br /&gt;
&lt;br /&gt;
===Generating tons of addresses===&lt;br /&gt;
Generating an address doesn&#039;t touch the network at all. You&#039;d only be wasting your CPU resources and disk space.&lt;br /&gt;
&lt;br /&gt;
Also, a collision is highly unlikely.&lt;br /&gt;
&lt;br /&gt;
Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power)&lt;br /&gt;
Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[http://www.wolframalpha.com/input/?i=2^160+%2F+world+population]&lt;br /&gt;
&lt;br /&gt;
===Everyone calculates at the same rate===&lt;br /&gt;
If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions.  The 256-bit &amp;quot;Merkle tree&amp;quot; hash of this is part of the block header.&lt;br /&gt;
&lt;br /&gt;
So everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).&lt;br /&gt;
&lt;br /&gt;
===Generate &amp;quot;valid&amp;quot; blocks with a lower difficulty than normal===&lt;br /&gt;
Using unmodified Bitcoin code, an attacker could segment himself from the main network and generate a long block chain with a lower difficulty than the real network. These blocks would be totally valid for his network. However, it would be impossible to combine the two networks (and the &amp;quot;false&amp;quot; chain would be destroyed in the process).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Block chain length&amp;quot; is calculated from the combined difficulty of all the blocks, not just the number of blocks in the chain. The one that represents the most computation will win.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Double-spending]]&lt;br /&gt;
* [http://bitcoin.stackexchange.com/questions/10025/where-can-i-find-well-written-criticism-about-bitcoin Stack Exchange]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>CarbonChris</name></author>
	</entry>
</feed>