https://tests.bitcoin.it/w/api.php?action=feedcontributions&user=Dooglus&feedformat=atomBitcoin Wiki - User contributions [en]2021-07-23T22:29:13ZUser contributionsMediaWiki 1.30.0https://tests.bitcoin.it/w/index.php?title=Bitcoin_Market&diff=61766Bitcoin Market2016-11-01T08:43:21Z<p>Dooglus: fix forum URLs</p>
<hr />
<div>The '''Bitcoin Market''' is a former [[bitcoin]] [[currency exchange]] site owned and operated by dwdollar. <br />
<br />
==History==<br />
<br />
Trading on the site began February 6th, 2010<ref>[https://bitcointalk.org/index.php?topic=20.msg265#msg265 Announcement by dwdollar]</ref><br />
<br />
A major update to the site occurred in March, 2011. Among the changes were: smaller minimum trade size, 24 X 7 trading, and some steps to help ensure that payment will be made for trades that execute.<br />
<br />
Though the site at one time was used for trading using PayPal as payment method, fraud caused the exchange to discontinue PayPal trading on June 4, 2011<ref>[https://bitcointalk.org/index.php?topic=12678 Recent Events At Bitcoin Market]</ref>.<br />
<br />
Important information can also be gained from the Bitcoin Market website homepage which shows a graph of the Bitcoin exchange rate (to US Dollars). This data is also offered in the JSON format.<br />
<br />
==See Also==<br />
<br />
* [[Buying bitcoins]]<br />
<br />
==External Links==<br />
<br />
* [http://darknetmarkets.co/ Darknet Bitcoin Markets list]<br />
* [https://www.bitcoinmarket.com/ Bitcoin Market]<br />
<br />
==References==<br />
<References /></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Brainwallet&diff=61314Brainwallet2016-07-18T15:02:16Z<p>Dooglus: Correct spelling errors</p>
<hr />
<div>A '''brainwallet''' refers to the concept of storing Bitcoins in one's own mind by memorizing a mnemonic recovery seed. If the mnemonic is not recorded anywhere, the Bitcoins can be thought of as being held only in the mind of the owner. If a brainwallet is forgotten or the person dies or is permanently incapacitated, the Bitcoins are lost forever. Using techniques like memory pegging allow them to be memorized and recalled easily.<br />
<br />
To create a brainwallet, use Bitcoin wallet software to generate a mnemonic seed and then memorize it. Such seeds are generated by wallets like [[Electrum]], [[Armory]] and [[Mycelium]].<br />
<br />
=Worked Example=<br />
<br />
# On a computer with no malware, run [[Electrum]] and generate the 13-word recovery seed.<br />
# Memorize the seed using http://en.wikipedia.org/wiki/Mnemonic_peg_system<br />
# When spending or saving, restore the wallet from memory using the seed.<br />
# Use the master public key to create an online watch-only wallet, where you can send to but not spend.<br />
# Spend from the wallet in the manner of [[Cold_storage|deep cold storage]]. Transferring the unsigned transaction to the cold storage computer, signing it and broadcasting to the network.<br />
<br />
==Example Mnemonic Peg==<br />
To memorize a mnemonic seed with this method you must invent a story which hits the words as "keynotes". Try to make it like a fairy tale story, use imagery. Make it somehow striking and emotionally resonant. When remembering you just remember the key words, not all the other words - the other can be remembered more as images and thoughts (which are hard to write down)<br />
<br />
Let's say we have this seed:<br />
<br />
witch collapse practice feed shame open despair creek road again ice least<br />
<br />
You'd imagine walking through a building familiar to you, maybe your own home or workplace or school.<br />
<br />
* You imagine looking in the first room and seeing your mother dressed as a '''witch''', playing the jenga boardgame until the tower '''collapses'''.<br />
* You walk to the next room and see your father '''practising''' with a longbow, he shoots a chicken to '''feeds''' himself.<br />
* In the next room you see your brother naked in '''shame''' attempting to cover himself, he's looking through a window that's '''open''' and flapping in the wind.<br />
* Now you reach the kitchen, girlfriend is looking at Picasso's [https://en.wikipedia.org/wiki/Guernica_%28Picasso%29 Guernica] on the wall. She is in '''despair''' from it. Next to it is a television playing the show Dawson's '''Creek'''.<br />
* Next you're in the garage, your childhood friend is working on his car. He plans to go on a '''road''' trip for the 5th time this month, he's going '''again'''.<br />
* Finally to go outside to the garden. It's early spring and the ground is covered in melting '''ice'''. Two of your other friends are there, one friend has a huge basket of apples, the other has a smaller basket but you're holding only some apples. You've got the '''least''' apples.<br />
<br />
Repeat this story in your head several times over a short period - the first few days. It will sink in, deep, after that. You'll only have to revisit it very occasionally. After a while you can ignore it for months and it'll still come back, not that I'd recommend relying on that.<br />
<br />
==Video Example of Mnemonic Peg Method==<br />
<br />
From the BBC documentary The Human Mind (2003) by Professor Robert Winston. Approximately 31 minutes in. Memorizing a list of 30 random words.<br />
<br />
https://www.youtube.com/watch?v=lRhfQCW1f68&t=1867<br />
<br />
==Fallible Memory==<br />
Despite the memory aids, human memory can be very fallible. So if your only storage is memory you may find that it just vanished one day. Keeping a copy stored on paper somewhere could be a useful backup, depending on circumstances.<br />
<br />
=Obsolete Brainwallet Style=<br />
<br />
An early old-style brainwallet was created by by memorization of a passphrase and converting it a [[private key]] with a hashing or key derivation algorithm (example: SHA256). That private key is then used to compute a Bitcoin address. This method was found to be very insecure and '''should not be used'''. Humans are not a good source of entropy. Using a single address also has problems associated with [[address reuse]].<br />
<br />
==Low Entropy from Human-Generated Passphrases==<br />
<br />
Practically everyone who knows about or cares loudly yells at people DO NOT USE BRAINWALLETS [GENERATED BY HUMANS]. We've seen pretty concrete evidence that users are resistant to good advice in this space, and they are shocked when their favorite quotation is cracked and they lose their coins (But it was 60 characters long! I even added a special character! how is this possible?!), the existing sites promoting this stuff won't use a KDF stronger than SHA256*1 because "users are stupid if they use weak passwords". <ref>[https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309 Re: hardening brain-wallets with a useful blind proof of work ]</ref><br />
<br />
==Ryan Castellucci DEFCON Talk==<br />
<br />
Ryan Castellucci gave a talk at DEFCON23 about cracking brainwallet passphrases. Although brainwallet passphrases were being exploited for years by this point, the talk helped bring the issues to more popular consciousness.<ref>[https://rya.nc/cracking_cryptocurrency_brainwallets.pdf Ryan Castellucci DEFCON Talk]</ref><ref>[https://www.reddit.com/r/Bitcoin/comments/3g9f1s/why_im_releasing_a_brainwallet_cracker_at_defcon/ Reddit thread on Ryan's talk]</ref><ref>[https://www.youtube.com/watch?v=foil0hzl4Pg a video of Ryan's talk]</ref><br />
<br />
==Legacy Code==<br />
<br />
If you have coins in an old-style brainwallet, the website http://www.bitaddress.org/ contains a GUI for generating the private key using the sha256(passphrase) algorithm.<br />
<br />
=References=<br />
<references><br />
</references></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Zero_Knowledge_Contingent_Payment&diff=60497Zero Knowledge Contingent Payment2016-02-27T04:06:44Z<p>Dooglus: /* Further mproving privacy */ typos</p>
<hr />
<div><br />
It's possible to make payments using Bitcoin which are released if and only if some knowledge is disclosed by the payee and to do this in a trustless manner where neither the payer or payee can cheat. This is accomplished using the combination of a hash-locked transaction and a bitcoin-external protocol to set things up so that the data revealed in the hashlock release is the data they need.<br />
<br />
==Protocol outline==<br />
===Hash locked transactions===<br />
<br />
Its possible to author a payment in the existing Bitcoin system that requires the redeemer to provide a "secret" which hashes to a specified value. [https://blockexplorer.com/tx/9969603dca74d14d29d1d5f56b94c7872551607f8c2d6837ab9715c60721b50e The 0.01 output here with the SHA256 opcode] is an example of such a transaction. "To collect these funds your transaction must provide a value that hashes to this other value."<br />
<br />
Used directly, like in the above example, this is insecure: Once you've published the spending transaction another node could just drop your transaction and use the password in a new transaction that pays him instead.<br />
<br />
So— the advice is that you shouldn't use a password alone, you should require a signature and a password. But then what is the use of that?<br />
<br />
There are a couple uses but I'll give an example here of one of the more impressive and far-out ones:<br />
<br />
===Zero knowledge proof to binding=== <br />
<br />
Let H() be a complicated computer program. For some H(X)=Y you want to know some X that gives you a particular Y.<br />
<br />
Say I happen to _know_ some X that answers your question... and I'd like to sell it to you. But we don't trust each other at all, and because we're computer geeks we have no friends who can act as trusted mediators. Can we make this exchange using Bitcoin with zero trust? The answer turns out to be yes.<br />
<br />
Here are some examples of what H() could be:<br />
<br />
* H() could be a password hashing algorithm and you're looking for the password that gives you a particular hash in order to crack it.<br />
* Perhaps H() is a complicated program that decides if a piece of music is one you would find beautiful (i.e. Y is a true/false output)<br />
* H() could be a program that verifies possession of a valid [http://en.wikipedia.org/wiki/Biometric_passport machine readable travel document] issued to a particular person. In this case, you would be able to define a payment to someone based on some arbitrary attributes about them, such as their name + date of birth, or perhaps by providing a photo of their face that's then matched against the travel document using the Eigenfaces algorithm. There would be no need to obtain a public key from them ahead of time meaning that, for example, you could send money to someone who was only just born and doesn't yet have a wallet.<br />
* H() could be a program that interprets another program on some secret input and yields true if the input data manages to put the program into a corrupted state. This would allow security researchers to sell exploits to software developers so they can be fixed, but in an anonymous and low trust way.<br />
<br />
A [https://en.wikipedia.org/wiki/Zero-knowledge_proof zero-knowledge proof] lets someone prove a mathematical fact to another person without teaching them anything about the fact itself. It has been proven that you can convert any computer program into a zero-knowledge proof (this is referred to mathematically as [http://en.wikipedia.org/wiki/IP_%28complexity%29#PSPACE_is_a_subset_of_IP PSPACE⊂IP] <!-- IIRC there is a better more direct statement about this someplace but I forget what to look for, please provide a better link -->). So, using a zero-knowledge proof I could prove to you that I know some X such that H(X)=Y ... which is helpful but it's not enough because you could pay me and I could not tell you the answer (or I could tell you and then you don't pay). Here is where the password locked transactions come in.<br />
<br />
First I encrypt X with random key K, Ex=AES(X,K).<br />
then I construct the program:<br />
<br />
<pre><br />
Program(K,Ex,H()) => [Ex,Hk,Y] {<br />
Hk=SHA256(K);<br />
Y=H(UNAES(Ex,K));<br />
return [Ex,Hk,Y];<br />
}<br />
</pre><br />
<br />
In English: The program takes the encrypted solution and the key to decrypt it, and outputs the encrypted solution, the hash of the decryption key, and the result of running the program on the solution.<br />
<br />
I convert that program into a zero knowledge proof. Externally to Bitcoin I tell you Ex,Hk,Y and then prove that I executed the program faithfully.<br />
<br />
You then form a Bitcoin payment which requires both my public key and password K. In order to redeem this transaction I must disclose K, the key you need to decrypt Ex and give you your solution. So neither of us can cheat, so no trust is required.<br />
<br />
The [https://bitcoincore.org/en/2016/02/26/zero-knowledge-contingent-payments-announcement/ first ZKCP] was performed on the Bitcoin network in 2016, after waiting almost 5 years for sufficiently powerful general purpose ZKPs to become practically available.<br />
<br />
==But what if they're just anti-social and don't redeem the txn?==<br />
<br />
If you're concerned that they might rather leave the funds unspent rather than disclose their password, perhaps an effort to extort you, you could construct the payment so that it can alternatively be spent by a "refund transaction" which has a signature from both you and the other party.<br />
<br />
You first create the ZKP payment transaction which requires (Password+Their_signature) OR (Their signature plus Your signature). You keep this transaction private. You then write a new transaction, the refund transaction, which spends the payment back to you but has an nlocktime set in the future (e.g. 1000 blocks from now). You sign it, and give it to the other party to sign. He is able to sign it without actually seeing the payment transaction (he only sees its hash). When he returns it, you then release the payment transaction. If he does not redeem the payment transaction before the locktime expires you transmit the refund and recover it yourself. Because of the locktime you are unable to steal the payment back right after sending it to him.<br />
<br />
Alternatively, you could construct the payment as an anyone can pay transaction where the output is greater than the input you provide. You would give him this transaction, then he would add funds of his own and announce it and wait for it to be mined before announcing the key in the transaction spending it. This way he could not lock up your funds without locking up funds of his own.<br />
<br />
==Further improving privacy==<br />
Many other transaction types also use the same hash locked pattern, but privacy can be further improved:<br />
A ZK-payment can be transformed using the [https://bitcointalk.org/index.php?topic=321228.0 CoinSwap] approach where the payer first pays into an ordinary 2-of-2 escrow+refund with the payee. They then would perform the ZK-payment transactions described above externally to the Bitcoin network, and if everything goes through without cheating the payer just signs a 2-of-2 release to pay the payee directly, without disclosing to the network that a hashlocked transaction was used. If the payer fails to release the escrow directly, the payee can just release it by announcing the hashlock and hashlock redeem.</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Zero_Knowledge_Contingent_Payment&diff=60496Zero Knowledge Contingent Payment2016-02-27T03:59:16Z<p>Dooglus: /* Hash locked transactions */ typo</p>
<hr />
<div><br />
It's possible to make payments using Bitcoin which are released if and only if some knowledge is disclosed by the payee and to do this in a trustless manner where neither the payer or payee can cheat. This is accomplished using the combination of a hash-locked transaction and a bitcoin-external protocol to set things up so that the data revealed in the hashlock release is the data they need.<br />
<br />
==Protocol outline==<br />
===Hash locked transactions===<br />
<br />
Its possible to author a payment in the existing Bitcoin system that requires the redeemer to provide a "secret" which hashes to a specified value. [https://blockexplorer.com/tx/9969603dca74d14d29d1d5f56b94c7872551607f8c2d6837ab9715c60721b50e The 0.01 output here with the SHA256 opcode] is an example of such a transaction. "To collect these funds your transaction must provide a value that hashes to this other value."<br />
<br />
Used directly, like in the above example, this is insecure: Once you've published the spending transaction another node could just drop your transaction and use the password in a new transaction that pays him instead.<br />
<br />
So— the advice is that you shouldn't use a password alone, you should require a signature and a password. But then what is the use of that?<br />
<br />
There are a couple uses but I'll give an example here of one of the more impressive and far-out ones:<br />
<br />
===Zero knowledge proof to binding=== <br />
<br />
Let H() be a complicated computer program. For some H(X)=Y you want to know some X that gives you a particular Y.<br />
<br />
Say I happen to _know_ some X that answers your question... and I'd like to sell it to you. But we don't trust each other at all, and because we're computer geeks we have no friends who can act as trusted mediators. Can we make this exchange using Bitcoin with zero trust? The answer turns out to be yes.<br />
<br />
Here are some examples of what H() could be:<br />
<br />
* H() could be a password hashing algorithm and you're looking for the password that gives you a particular hash in order to crack it.<br />
* Perhaps H() is a complicated program that decides if a piece of music is one you would find beautiful (i.e. Y is a true/false output)<br />
* H() could be a program that verifies possession of a valid [http://en.wikipedia.org/wiki/Biometric_passport machine readable travel document] issued to a particular person. In this case, you would be able to define a payment to someone based on some arbitrary attributes about them, such as their name + date of birth, or perhaps by providing a photo of their face that's then matched against the travel document using the Eigenfaces algorithm. There would be no need to obtain a public key from them ahead of time meaning that, for example, you could send money to someone who was only just born and doesn't yet have a wallet.<br />
* H() could be a program that interprets another program on some secret input and yields true if the input data manages to put the program into a corrupted state. This would allow security researchers to sell exploits to software developers so they can be fixed, but in an anonymous and low trust way.<br />
<br />
A [https://en.wikipedia.org/wiki/Zero-knowledge_proof zero-knowledge proof] lets someone prove a mathematical fact to another person without teaching them anything about the fact itself. It has been proven that you can convert any computer program into a zero-knowledge proof (this is referred to mathematically as [http://en.wikipedia.org/wiki/IP_%28complexity%29#PSPACE_is_a_subset_of_IP PSPACE⊂IP] <!-- IIRC there is a better more direct statement about this someplace but I forget what to look for, please provide a better link -->). So, using a zero-knowledge proof I could prove to you that I know some X such that H(X)=Y ... which is helpful but it's not enough because you could pay me and I could not tell you the answer (or I could tell you and then you don't pay). Here is where the password locked transactions come in.<br />
<br />
First I encrypt X with random key K, Ex=AES(X,K).<br />
then I construct the program:<br />
<br />
<pre><br />
Program(K,Ex,H()) => [Ex,Hk,Y] {<br />
Hk=SHA256(K);<br />
Y=H(UNAES(Ex,K));<br />
return [Ex,Hk,Y];<br />
}<br />
</pre><br />
<br />
In English: The program takes the encrypted solution and the key to decrypt it, and outputs the encrypted solution, the hash of the decryption key, and the result of running the program on the solution.<br />
<br />
I convert that program into a zero knowledge proof. Externally to Bitcoin I tell you Ex,Hk,Y and then prove that I executed the program faithfully.<br />
<br />
You then form a Bitcoin payment which requires both my public key and password K. In order to redeem this transaction I must disclose K, the key you need to decrypt Ex and give you your solution. So neither of us can cheat, so no trust is required.<br />
<br />
The [https://bitcoincore.org/en/2016/02/26/zero-knowledge-contingent-payments-announcement/ first ZKCP] was performed on the Bitcoin network in 2016, after waiting almost 5 years for sufficiently powerful general purpose ZKPs to become practically available.<br />
<br />
==But what if they're just anti-social and don't redeem the txn?==<br />
<br />
If you're concerned that they might rather leave the funds unspent rather than disclose their password, perhaps an effort to extort you, you could construct the payment so that it can alternatively be spent by a "refund transaction" which has a signature from both you and the other party.<br />
<br />
You first create the ZKP payment transaction which requires (Password+Their_signature) OR (Their signature plus Your signature). You keep this transaction private. You then write a new transaction, the refund transaction, which spends the payment back to you but has an nlocktime set in the future (e.g. 1000 blocks from now). You sign it, and give it to the other party to sign. He is able to sign it without actually seeing the payment transaction (he only sees its hash). When he returns it, you then release the payment transaction. If he does not redeem the payment transaction before the locktime expires you transmit the refund and recover it yourself. Because of the locktime you are unable to steal the payment back right after sending it to him.<br />
<br />
Alternatively, you could construct the payment as an anyone can pay transaction where the output is greater than the input you provide. You would give him this transaction, then he would add funds of his own and announce it and wait for it to be mined before announcing the key in the transaction spending it. This way he could not lock up your funds without locking up funds of his own.<br />
<br />
==Further mproving privacy==<br />
Many other transaction types also use the same hash locked pattern, but privacy can be further improved:<br />
A ZK-payment can be transformed using the [https://bitcointalk.org/index.php?topic=321228.0 CoinSwap] approach where they payer first pays into an ordinary 2-of-2 escrow+refund with the payee. The then would perform the ZK-payment transactions described above externally to the Bitcoin network, and if everything goes through without cheating the payer just signs a 2-of-2 release to pay the payee directly, without disclosing to the network that a hashlocked transaction was used. If the payer fails to release the escrow directly, the payee can just release it by announcing the hashlock and hashlock redeem.</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Scalability_FAQ&diff=60159Scalability FAQ2016-01-24T02:32:51Z<p>Dooglus: /* Does it reduce the risk of a hard fork? */ fix typo</p>
<hr />
<div>Answers to commonly-asked questions and concerns about scaling Bitcoin, including “level 1” solutions such as increasing the block size and “level 2” solutions such as the proposed Lightning network.<br />
<br />
== Background ==<br />
<br />
Questions about how Bitcoin currently works (related to scaling) as well as questions about the technical terminology related to the scaling discussion.<br />
<br />
=== What is the short history of the block size limit? ===<br />
<br />
''Note: the software now called Bitcoin Core was previously simply called “Bitcoin”.<ref>[https://bitcoin.org/en/release/v0.9.0#rebranding-to-bitcoin-core Bitcoin Core 0.9.0 release notes], Bitcoin.org, 19 March 2014</ref> To avoid confusion with the Bitcoin system, we’ll use the Bitcoin Core name.''<br />
<br />
Bitcoin Core was initially released without an explicit block size limit. However, the code did limit network messages to a maximum of 32 MiB, setting an effective upper bound on block size.<ref>[https://bitcointalk.org/index.php?topic=68121 Earliest known Bitcoin code], <code>src/main.h:17</code></ref><br />
<br />
Around 15 July 2010, Satoshi Nakamoto changed Bitcoin Core’s mining code so that it wouldn’t create any blocks larger than 990,000 bytes.<ref>[https://github.com/bitcoin/bitcoin/commit/a30b56ebe76ffff9f9cc8a6667186179413c6349 Bitcoin Core commit a30b56e], Satoshi Nakamoto, 15 July 2010</ref><br />
<br />
Two months later on 7 September 2010, Nakamoto changed Bitcoin Core’s consensus rules to reject blocks larger than 1,000,000 bytes (1 megabyte) if their block height was higher than 79,400.<ref>[https://github.com/bitcoin/bitcoin/commit/8c9479c6bbbc38b897dc97de9d04e4d5a5a36730 Bitcoin Core commit 8c9479c], Satoshi Nakamoto, 7 September 2010</ref> (Block 79,400 was later produced on 12 September 2010.<ref>[https://www.biteasy.com/blockchain/blocks/000000000021d821ec06be7173f413690bc5c4bc648dfa70b3b6763236f055b7 Block height 79400], dated 12 September 2010</ref>)<br />
<br />
Neither the July nor the September commit message explains the reason for the limit, although the careful attempt to prevent a fork may indicate Nakamoto didn’t consider it an emergency.<br />
<br />
Nakamoto’s subsequent statements supported raising the block size at a later time<ref>[https://bitcointalk.org/index.php?topic=1347.msg15139#msg15139 Increasing the block size when needed], Satoshi Nakamoto, 3 October 2010</ref>, but he never publicly specified a date or set of conditions for the raise.<br />
<br />
=== What is this Transactions Per Second (TPS) limit? ===<br />
<br />
The current block size limit is 1,000,000 bytes (1 megabyte)<ref>[https://github.com/bitcoin/bitcoin/blob/41076aad0cbdfa4c4cf376e345114a5c29086f81/src/consensus/consensus.h#L10 <code>MAX_BLOCK_SIZE</code>], retrieved 2 July 2015</ref>, although a small amount of that space (such as the block header) is not available to store transactions.<ref>[https://bitcoin.org/en/developer-reference#serialized-blocks Block serialization description], Bitcoin.org Developer Reference</ref><br />
<br />
Bitcoin transactions vary in size depending on multiple factors, such as whether they’re spending single-signature inputs or a multiple signature inputs, and how many inputs and outputs they have.<br />
<br />
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks (600). For example, if you assume average transactions are 250 bytes,<br />
<br />
<pre>6.6 TPS = 1,000,000 / 250 / 600</pre><br />
<br />
There seems to be general agreement that Bitcoin in 2015 can handle about 3 TPS with the current average size of transactions.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/007986.html Max TPS based on current average transaction size], Mike Hearn, 8 May 2015</ref><ref name="maxwell_not_proposing">[https://www.reddit.com/r/Bitcoin/comments/39yaod/bitcoinorg_position_on_hard_forks/cs7qz5c "No one proposing 3 TPS forever"], Gregory Maxwell, 15 June 2015</ref><br />
<br />
Both old estimates<ref>[[Scalability]], Bitcoin Wiki, retrieved 7 July<br />
2015</ref> and new estimates<ref name="garzik_bip" /> place the<br />
theoretical maximum at 7 TPS with current Bitcoin consensus rules<br />
(including the 1MB block size limit).<br />
<br />
=== What do devs mean by the scaling expressions O(1), O(n), O(n<sup>2</sup>), etc…? ===<br />
<br />
[https://en.wikipedia.org/wiki/Big_O_notation Big O notation] is a shorthand used by computer scientists to describe how well a system scales. Such descriptions are rough approximations meant to help predict potential problems and evaluate potential solutions; they are not usually expected to fully capture all variables.<br />
<br />
* '''O(1)''' means a system has roughly the same properties no matter how big it gets.<br />
* '''O(n)''' means that a system scales linearly: doubling the number of things (users, transactions, etc.) doubles the amount of work.<br />
* '''O(n<sup>2</sup>)''' means that a system scales quadratically : doubling (2x) the number of things quadruples (4x) the amount of work. Often written O(n^2) is places without convenient superscripts.<br />
* Additional examples may be found in the [https://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions Wikipedia article]<br />
<br />
The following subsections show cases where big O notation has been applied to the scaling Bitcoin transaction volume.<br />
<br />
==== O(1) block propagation ====<br />
<br />
Bitcoin Core currently relays unconfirmed transactions and then later relays blocks containing many of the same transactions. This redundant relay can be eliminated to allow miners to propagate large blocks very quickly to active network nodes, and would also significantly reduce miner need for peak bandwidth. Currently most miners use a network<ref name="block_relay_net">[http://bitcoinrelaynetwork.org/ Matt Corallo's block relay network]</ref> that is about 25x more efficient than stock Bitcoin Core<ref>[https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2#i-know-that-you-know IBLT design document], Gavin Andresen, 11 August 2014</ref> and almost equally as effective as O(1) block propagation for current block sizes.<br />
<br />
==== O(n<sup>2</sup>) network total validation resource requirements ====<br />
<br />
[[File:On2_scaling_illustrated.png|thumb|right|visualization of O(n<sup>2</sup>) scaling]]<br />
<br />
Each on-chain Bitcoin transaction needs to be processed by each full node. If we assume that a certain percentage of users run full nodes (''n'') and that each user creates a certain number of transactions on average (''n'' again), then the network’s total resource requirements are <code>n<sup>2</sup> = n * n</code>. In short, this means that the aggregate cost of keeping all transactions on-chain quadruples each time the number of users doubles.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009199.html Total system cost], Dr. Adam Back, 28 June 2015</ref> For example,<br />
<br />
* Imagine a network starts with 100 users and 2 total nodes (a 2% ratio).<br />
* The network doubles in users to 200. The number of nodes also doubles to 4 (maintaining a 2% ratio of decentralized low-trust security). However, double the number of users means double the number of transactions, and each node needs to process ''every'' transaction---so each node now does double work with its bandwidth and its CPU. With double the number of nodes and double the amount of work per node, total work increases by four times.<br />
* The network doubles again: 400 users, 8 nodes (still 2% of total), and 4 times the original workload per node for a total of 16 times as much aggregate work as the original.<br />
* Another doubling: 800 users, 16 nodes (still 2%), and 8 times the original workload per node for a total of 64 times aggregate work as the original.<br />
* Another doubling: 1,600 users—sixteen times the original---with 32 nodes (still 2%), and 16 times the original workload per node. The aggregate total work done by nodes is 256 times higher than it was originally.<br />
<br />
=== What’s the difference between on-chain and off-chain transactions? ===<br />
<br />
On-chain Bitcoin transactions are those that appear in the Bitcoin block chain. Off-chain transactions are those that transfer ownership of bitcoins without putting a transaction on the block chain.<br />
<br />
Common and proposed off-chain transactions include:<br />
<br />
* '''Exchange transactions:''' when you buy or sell bitcoins, the exchange tracks ownership in a database without putting data in the block chain. Only when you deposit or withdraw bitcoins does the transaction appear on the block chain.<br />
* '''Web wallet internal payments:''' many web wallets allow users of the service to pay other users of the same service using off-chain payments. For example, when one Coinbase user pays another Coinbase user.<br />
* '''Tipping services:''' most tipping services today, such as ChangeTip, use off-chain transactions for everything except deposits and withdrawals.<ref>[https://www.changetip.com/fees ChangeTip fees], retrieved 3 July 2015</ref><br />
* '''Payment channels:''' channels are started using one on-chain transaction and ended using a second on-chain transaction.<ref>[https://bitcoin.org/en/developer-guide#micropayment-channel Micropayment channels], Bitcoin.org Developer Guide</ref> In between can be an essentially unlimited number of off-chain transactions as small as a single satoshi (1/100,000,000th of a bitcoin). Payment channels include those that [https://bitcoinj.github.io/working-with-micropayments exist today] as well as proposed hub-and-spoke channels and the more advanced [http://lightning.network/ Lightning network].<br />
<br />
Approximately 90% to 99% of all bitcoin-denominated payments today are made off-chain.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008844.html Pure off-chain is a weak form of layer 2], Dr. Adam Back, 19 June 2015</ref><br />
<br />
=== What is a fee market? ===<br />
<br />
When you create a Bitcoin transaction, you have the option to pay a [[transaction fee]]. If your software is flexible, you can pay anything from zero fees (a free transaction) to 100% of the value of the transaction (spend-to-fees).<br />
<br />
Miners who have more transactions available to them than they have room in the blocks they choose to make, typically choose to maximize their revenue by including the transactions that pay the most fees per kilobyte of data.<ref name="fee_pri">[https://bitcointalk.org/index.php?topic=95837.0 Fee prioritization patch], Gavin Andresen, 26 July 2012</ref> This confirms higher-fee transactions before lower-fee transactions.<br />
<br />
If blocks become full on a regular basis, users who pay the minimum fee will have to wait a longer and longer time for their transactions to confirm. At this point, a fee market may arise where transactions that pay higher fees get confirmed significantly faster than transactions that pay low fees.<ref name="todd_coinwallet">[https://gist.github.com/petertodd/8e87c782bdf342ef18fb Comments on the CoinWallet.eu tx-flood stress-test], Peter Todd, 22 June 2015</ref><ref name="garzik_bip" /><br />
<br />
=== What is the most efficient way to scale Bitcoin? ===<br />
<br />
Remove its decentralization properties, specifically decentralized mining and decentralized full nodes. Mining wastes enormous amounts of electricity to provide a decentralized ledger and full nodes waste an enormous amount of bandwidth and CPU time keeping miners honest.<br />
<br />
If users instead decided to hand authority over to someone they trusted, mining and keeping miners honest wouldn’t be needed. This is how Visa, MasterCard, PayPal, and the rest of the centralized payment systems works—users trust them, and they have no special difficulty scaling to [[scalability|millions of transactions an hour]]. It’s very efficient; it isn’t decentralized.<br />
<br />
=== What is a hard fork, and how does it differ from other types of forks? ===<br />
<br />
The word fork is badly overloaded in Bitcoin development.<br />
<br />
* '''[[hardfork|Hard fork]]:''' a change to the system which is not backwards compatible. Everyone needs to upgrade or things can go wrong.<br />
* '''[[softfork|Soft fork]]:''' a change to the system which is backwards compatible as long as a majority of miners enforce it. Full nodes that don’t upgrade have their security reduced.<br />
* '''Chain fork:''' when there are two are more blocks at the same height on a block chain. This typically happens a few times a week by accident, but it can also indicate more severe problems.<br />
* '''[https://en.wikipedia.org/wiki/Fork_%28software_development%29 Software fork]:''' using the code from an open source project to create a different project.<br />
* '''[https://help.github.com/articles/fork-a-repo/ Git/GitHub fork]:''' a way for developers to write and test new features before contributing them to a project.<br />
<br />
(There are other types of software-related forks, but they don’t tend to cause as much confusion.)<br />
<br />
=== What are the block size soft limits? ===<br />
<br />
Bitcoin Core has historically come pre-configured to limit blocks it mines to certain sizes.<ref name="fee_pri" /> These “limits” aren’t restrictions placed on miners by other miners or nodes, but rather configuration options that help miners produce reasonably-sized blocks.<br />
<br />
Miners can change their soft limit size (up to 1 MB) using <code>-blockmaxsize=&lt;size&gt;</code><br />
<br />
Default soft limits at various times:<br />
<br />
* '''July 2012:''' <code>-blockmaxsize</code> option created and set to default 250 KB soft limit<ref>[https://github.com/bitcoin/bitcoin/commit/c555400ca134991e39d5e3a565fcd2215abe56f6 Bitcoin Core commit c555400], Gavin Andresen, 12 July 2012</ref><br />
* '''November 2013:''' Raised to 750KB<ref>[https://github.com/bitcoin/bitcoin/commit/ad898b40aaf06c1cc7ac12e953805720fc9217c0 Bitcoin Core commit ad898b40], Gavin Andresen, 27 November 2013</ref><br />
* '''June 2015:''' Raise to 1 MB suggested<ref>[https://github.com/bitcoin/bitcoin/pull/6231 Bitcoin Core pull #6231], Chris Wheeler, 4 June 2015</ref><br />
<br />
== General Block Size Increase Theory ==<br />
<br />
Questions about increasing the block size in general, not related to any<br />
specific proposal.<br />
<br />
==== Why are some people in favor of keeping the block size at 1 MB forever? ====<br />
<br />
It is commonly claimed<ref name="garzik_bip" /><ref>[https://epicenterbitcoin.com/podcast/082/ Epicenter Bitcoin podcast #82], Mike Hearn (interviewed), 8 June 2015</ref> that there are people opposed to ever raising the maximum block size limit, but no Bitcoin developers have suggested keeping the maximum block size at one megabyte forever.<ref name="maxwell_not_proposing" /><br />
<br />
All developers support raising the maximum size at some point<ref>[https://www.reddit.com/r/Bitcoin/comments/39kqzs/how_about_a_softfork_optin_blocksize_increase/cs5hj8l Nothing magic about 1MB], Dr. Adam Back, 13 June 2015</ref><ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008328.html Regarding size-independent new block propagation], Pieter Wuille, 28 May 2015</ref>—they just disagree about whether now is the correct time.<br />
<br />
==== Should miners be allowed to decide the block size? ====<br />
<br />
A block may include as little as a single transaction, so miners can always restrict block size. Letting miners choose the maximum block size is more problematic for several reasons:<br />
<br />
# '''Miners profit, others pay the cost:''' bigger blocks earn miners more fees, but miners don’t need to store those blocks for more than a few days.<ref>[https://github.com/bitcoin/bitcoin/pull/5863 Bitcoin Core pull #5863 adding pruning functionality], Suhas Daftuar et al., 6 March 2015</ref> Other users who want full validation security, or who provide services to lightweight wallets, pay the costs of downloading and storing those larger blocks.<br />
# '''Bigger miners can afford more bandwidth:''' each miner needs to download every transaction that will be included in block,<ref name="maxwell_correcting_assumptions" /> which means that they all need to pay for high-speed connections. However, a miner with 8.3% of total hash rate can take that cost out of the about 300 BTC they make a day, while a miner with only 0.7% of total hash rate has to take that cost out of only 25 BTC a day. This means bigger miners may logically choose to make bigger blocks even though it may further centralize mining.<br />
# '''Centralized hardware production:''' only a few companies in the world produce efficient mining equipment, and many of them have chosen to stop selling to the public.<ref>[http://blogs.wsj.com/venturecapital/2014/09/05/for-kncminer-time-to-forget-selling-bitcoin-machines-to-at-home-miners/ KnCMiner to stop selling to home miners], Wall Street Journal, Yuliya Chernova, 5 September 2014</ref> This prevents ordinary Bitcoin users from participating in the process even if they were willing to pay for mining equipment.<br />
# '''Voting by hash rate favors larger miners:''' voting based on hash rate allows the current hash rate majority (or super-majority) to enforce conditions on the minority. This is similar to a lobby of large businesses being able to get laws passed that may hurt smaller businesses.<ref>[https://www.reddit.com/r/Bitcoin/comments/39kzyt/draft_bip_100_soft_fork_block_size_increase/cs5gvak Miners choosing the block size limit is ill-advised], Meni Rosenfeld, 13 June 2015</ref><br />
# '''Miners may not care about users:''' this was demonstrated during the [[July 2015 Forks]] where even after miners lost over $50,000 USD in income from mining invalid chains, and even after they were told that long forks harm users, they continued to mine improperly.<ref>[https://bitcointalk.org/index.php?topic=700411.msg11790734#msg11790734 Intention to continue SPV mining], Wang Chun, 4 July 2015</ref><br />
<br />
However, there are also possible justifications for letting miners choose the block size:<br />
<br />
# '''Authenticated participants:''' miners are active participants in Bitcoin, and they can prove it by adding data to the blocks they create.<ref>[https://bitcoin.org/en/developer-reference#term-coinbase-field Coinbase field], Bitcoin.org Developer Reference</ref> It is much harder to prove people on Reddit, BitcoinTalk, and elsewhere are real people with an active stake in Bitcoin.<br />
# '''Bigger blocks may cost miners:''' small miners and poorly-connected miners are at a disadvantage if larger blocks are produced<ref name="wuille_centralization" />, and even large and well-connected miners may find that large blocks reduce their profit percentage if the cost of bandwidth rises too high or their stale rate increases.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008355.html F2Pool block size concerns], Chun Wang, 29 May 2015</ref><br />
<br />
==== How could a block size increase affect user security? ====<br />
<br />
Bitcoin’s security is highly dependent on the number of active users who protect their bitcoins with a full node like Bitcoin Core. The more active users of full nodes, the harder it is for miners to trick users into accepting fake bitcoins or other frauds.<ref>[https://medium.com/@lopp/bitcoin-nodes-how-many-is-enough-9b8e8f6fd2cf Bitcoin nodes: how many is enough?], Jameson Lopp, 7 June 2015</ref><br />
<br />
Full nodes need to download and verify every block, and most nodes also store blocks plus relay transactions, full blocks, and filtered blocks to other users on the network. The bigger blocks become, the more difficult it becomes to do all this, so it is expected that bigger blocks will both reduce the number of users who currently run full nodes and suppress the number of users who decide to start running a full node later.<ref>[https://www.reddit.com/r/Bitcoin/comments/3bae2d/amir_taaki_on_raising_the_block_size_a_lot_of/cslcgmw Block size increases-only will create problems], Dr. Adam Back, 28 June 2015</ref><br />
<br />
In addition, full blocks may increase mining centralization<ref name="wuille_centralization" /> at a time when mining is already so centralized that it makes it easy to reverse transactions which have been confirmed multiple times.<ref>[http://bitcoin.stackexchange.com/questions/32562/when-to-worry-about-1-confirmation-payments/32564#32564 When to worry about one-confirmation payments], David A. Harding, 17 November 2014</ref><br />
<br />
==== How could larger blocks affect proof-of-work (POW) security? ====<br />
<br />
Proof of work security is dependent on how much money miners spend on mining equipment. However, to effectively mine blocks, miners also need to spend money on bandwidth to receive new transactions and blocks created by other miners; CPUs to validate received transactions and blocks; and bandwidth to upload new blocks. These additional costs don’t directly contribute to POW security.<ref name="maxwell_correcting_assumptions">[https://www.reddit.com/r/Bitcoin/comments/39tgno/letting_miners_vote_on_the_maximum_block_size_is/cs6rek5 Correcting wrong assumptions about mining], Gregory Maxwell, 15 June 2015</ref><br />
<br />
As block sizes increase, the amount of bandwidth and CPU required also increases. If block sizes increase faster than the costs of bandwidth and CPU decrease, miners will have less money for POW security relative to the gross income they earn.<br />
<br />
In addition, larger blocks have a higher risk of becoming stale (orphaned)<ref name="rusty_dsl" />, which directly correlates to lost POW security. For example, if the network average stale rate is 10%, then 10% of POW performed isn't protecting transactions on the block chain.<br />
<br />
=== What happens if blocks aren't big enough to include all pending transactions? ===<br />
<br />
This is already the case more often than not<ref>[http://statoshi.info/dashboard/db/transactions?from=1433297061121&to=1435889061123 Statoshi.info mempool queue June to July 2015]</ref>, so we know that miners will simply queue transactions. The transactions eligible for block inclusion that pay the highest fee per kilobyte will be confirmed earlier than transactions that pay comparatively lower fees.<ref name="fee_pri" /><br />
<br />
What happens from there is debated:<br />
<br />
* BitcoinJ lead developer Mike Hearn believes there would be “crashing nodes, a swelling transaction backlog, a sudden spike in double spending, [and] skyrocketing fees.”<ref>[https://medium.com/@octskyward/crash-landing-f5cc19908e32 Crash Landing], Mike Hearn, 7 May 2015</ref><br />
* Bitcoin Foundation chief scientist Gavin Andresen believes that the “average transaction fee paid will rise, people or applications unwilling or unable to pay the rising fees will stop submitting transactions, [and] people and businesses will shelve plans to use Bitcoin, stunting growth and adoption.” <ref>[https://github.com/bitcoin/bitcoin/pull/6341 Bitcoin Core pull #6341], Gavin Andresen, 26 June 2015</ref><br />
* Bitcoin Core developer Pieter Wuille replies to Andresen’s comment above: “Is it fair to summarize this as ‘Some use cases won’t fit any more, people will decide to no longer use the blockchain for these purposes, and the fees will adapt.’? I think that is already happening […] I don’t think we should be afraid of this change or try to stop it.” <ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009098.html The need for larger blocks], Pieter Wuille, 26 June 2015</ref><br />
* Bitcoin Core developer Jeff Garzik writes, "as blocks get full and the bidding war ensues, the bitcoin user experience rapidly degrades to poor. In part due to bitcoin wallet software’s relative immaturity, and in part due to bitcoin’s settlement based design, the end user experience of their transaction competing for block size results in erratic, and unpredictably extended validation times."<ref name="garzik_bip" /><br />
<br />
== Specific Scaling Proposals ==<br />
<br />
=== Andresen-Hearn Block Size Increase Proposals ===<br />
<br />
Questions about the series of related proposals by Gavin Andresen and Mike Hearn to use a hard fork to raise the maximum block size, thereby allowing miners to include more on-chain transactions. As of July 2015, the current focus is [https://github.com/bitcoin/bips/pull/163 BIP101].<br />
<br />
==== What is the major advantage of this proposal? ====<br />
<br />
''Bitcoin can support many more users.'' Assuming earliest possible adoption, 250 bytes per on-chain transaction, 144 blocks per day, and 2 transaction a day per user, Bitcoin can support about,<br />
<br />
* 288,000 users in 2015<br />
* 2,304,000 users in 2016 (800% increase)<br />
* 4,608,000 in 2018 (1,600%)<br />
* 9,216,000 in 2020 (3,200%)<br />
* 18,432,000 in 2022 (6,400%)<br />
* 36,864,000 in 2024 (12,800%)<br />
* 73,728,000 in 2026 (25,600%)<br />
* 147,456,000 in 2028 (51,200%)<br />
* 294,912,000 in 2030 (102,400%)<br />
* 589,824,000 in 2032 (204,800%)<br />
* 1,179,648,000 in 2034 (409,600%<br />
* 2,359,296,000 in 2036 (819,200%)<br />
<br />
==== What is the major disadvantage of this proposal? ====<br />
<br />
''The total cost of remaining decentralized will be high.'' Assuming earliest possible adoption and that the ratio of total users to full node operators remains the same as today, the total estimated amount of work necessary to maintain the decentralized system under the [[#O.28n2.29_network_total_validation_resource_requirements|O(<sup>2</sup>) scaling model]] will be,<br />
<br />
* 100% of today’s work in 2015<br />
* 6,400% in 2016<br />
* 25,600% in 2018<br />
* 102,400% in 2020<br />
* 409,600% in 2022<br />
* 1,638,400% in 2024<br />
* 6,553,600% in 2026<br />
* 26,214,400% in 2028<br />
* 104,857,600% in 2030<br />
* 419,430,400% in 2032<br />
* 1,677,721,600% in 2034<br />
* 6,710,886,400% in 2036<br />
<br />
For example, if the total amount spent on running full nodes today (not counting mining) is $100 thousand per year, the estimated cost for the same level of decentralization in 2036 will be $6.7 trillion per year if validation costs stay the same. (They'll certainly go down, but algorithmic and hardware improvements probably won't eliminate an approximate 6,710,886,400% cost increase.)<br />
<br />
==== What are the dangers of the proposed hard fork? ====<br />
<br />
Under the current proposal, 75% of miners must indicate that they agree to accept blocks up to 8 MB in size.<ref name="bip101">[https://github.com/bitcoin/bips/pull/163 BIP101], Gavin Andresen, 24 June 2016</ref> After the change goes into effect, if any miner creates a block larger than 1 MB, all nodes which have not upgraded yet will reject the block.<ref>[https://bitcoin.org/en/developer-guide#consensus-rule-changes Consensus rule changes], Bitcoin.org Developer Guide</ref><br />
<br />
If all full nodes have upgraded, or very close to all nodes, there should be no practical effect. If a significant number of full nodes have not upgraded, they will continue using a different block chain than the upgraded users, with the following consequences:<br />
<br />
* Bitcoins received from before the fork can be spent twice, once on both sides of the fork. This creates a high double spend risk.<br />
* Bitcoins received after the fork are only guaranteed to be spendable on the side of the fork they were received on. This means some users will have to lose money to restore Bitcoin to a single chain.<br />
<br />
Users of hosted wallets (Coinbase, BlockChain.info, etc.) will use whatever block chain their host chooses. Users of lightweight P2P SPV wallets will use the [[Thin Client Security|longest chain they know of]], which may not be the actual longest chain if they only connect to nodes on the shorter chain. Users of non-P2P SPV wallets, like Electrum, will use whatever chain is used by the server they connect to.<br />
<br />
If a bad hard fork like this happens, it will likely cause large-scale confusion and make Bitcoin very hard to use until the situation is resolved.<br />
<br />
==== What is the deployment schedule for BIP 101? ====<br />
<br />
* The patch needs to be accepted into Bitcoin Core, Bitcoin XT, or both.<br />
* If accepted into Bitcoin Core, miners using that software will need to upgrade (this probably requires a new released version of Bitcoin Core). If accepted only into Bitcoin XT, miners will need to switch to using XT.<br />
* After 75% of miners have upgraded, 8MB blocks will become allowed at the the latest of (1) 11 January 2016 or (2) two weeks after the 75% upgrade threshold.<ref name="bip101" /><br />
* After the effective date has passed, any miner may create a block larger than 8MB. When a miner does this, upgraded full nodes will accept that block and non-upgraded full nodes will reject it, forking the network.<ref name="bip101" /> See [[#What_are_the_dangers_of_the_proposed_hard_fork.3F|hard fork dangers]] for what his might mean.<br />
<br />
==== Will miners go straight from 1 MB blocks to 8 MB blocks? ====<br />
<br />
That would be highly unlikely. Uploading an 8 MB block currently takes significantly more time than uploading a 1 MB block<ref name="rusty_dsl">[http://rusty.ozlabs.org/?p=509 Mining on a home DSL connection test results], Rusty Russell, 19 June 2015</ref>, even with the roughly 25x reduction in size available from use of Matt Corallo’s block relay network.<ref name="block_relay_net" /><br />
<br />
The longer it takes to upload a block, the higher the risk it will become a stale block—meaning the miner who created it will not receive the block subsidy or transaction fees (currently about 25 BTC per block).<br />
<br />
However, if technology like Invertible Bloom Lookup Tables (IBLTs) is deployed and found to work as expected<ref name="iblt">[https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2 O(1) block propagation], Gavin Andresen, 8 August 2014</ref>, or if mining [[#What_is_the_most_efficient_way_to_scale_Bitcoin.3F|centralizes further]], adding additional transactions may not have a significant enough cost to discourage miners from creating full blocks. In that case, blocks will be filled as soon as there are enough people wanting to make transactions paying the default relay fee<ref>[https://github.com/bitcoin/bitcoin/pull/3305 Bitcoin Core pull #3305 dropping default fees], Mike Hearn, 22 November 2013</ref> of 0.00001000 BTC/kilobyte.<br />
<br />
==== What tests have been performed related to this proposal? ====<br />
<br />
* '''20MB block processing''' (Gavin Andresen) “if we increased the maximum block size to 20 megabytes tomorrow, and every single miner decided to start creating 20MB blocks and there was a sudden increase in the number of transactions on the network to fill up those blocks… the 0.10.0 version of [Bitcoin Core] would run just fine.”<ref>[http://gavintech.blogspot.com/2015/01/twenty-megabytes-testing-results.html Twenty megabyte block testing], Gavin Andresen, 20 January 2015</ref> (ellipses in original)<br />
* '''Mining &amp; relay simulation''' (Gavin Andresen) “if blocks take 20 seconds to propagate, a network with a miner that has 30% of the hashing power will get 30.3% of the blocks.”<ref>[http://gavinandresen.ninja/are-bigger-blocks-better-for-bigger-miners Are bigger blocks better for bigger miners?], Gavin Andresen, 22 May 2015</ref><br />
* '''Mining on a home DSL connection''' (Rusty Russell) “Using the rough formula of 1-exp(-t/600), I would expect orphan rates of 10.5% generating 1MB blocks, and 56.6% with 8MB blocks; that’s a huge cut in expected profits.”<ref name="rusty_dsl" /><br />
* '''Mining centralization pressure''' (Pieter Wuille) “[This] does very clearly show the effects of larger blocks on centralization pressure of the system.”<ref name="wuille_centralization">[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008581.html Mining centralization pressure from non-uniform propagation speed], Pieter Wuille, 12 June 2015</ref><br />
<br />
<br />
=== Garzik Miner Block Size Voting Proposal (AKA BIP100) ===<br />
<br />
''Note, BIP 100 is the marketing name for this proposal. No BIP number<br />
has yet been publicly requested, and the number assigned is unlikely to<br />
be 100.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2014-May/005756.html<br />
Prenumbered BIP naming], Gregory Maxwell, 12 May 2014</ref>''<br />
<br />
Questions related to Jeff Garzik's proposal<ref name="garzik_bip">[http://gtf.org/garzik/bitcoin/BIP100-blocksizechangeproposal.pdf Draft BIP: decentralized economic policy], Jeff Garzik, 12 June 2015 (revised 15 June 2015)</ref> to allow miners to vote on raising and lowering the maximum block size.<br />
<br />
==== What does this proposal do? ====<br />
<br />
# It creates a one-time hard fork that does not automatically change the maximum block size.<br />
<br />
# It allows miners to vote to increase or decrease the maximum block size within the range of 1MB to 32MB. These changes are neither hard forks nor soft forks, but simply rules that all nodes should know about after the initial hard fork.<br />
<br />
==== Does it reduce the risk of a hard fork? ====<br />
<br />
Hard forks are most dangerous when they're done without strong<br />
consensus.<ref name="garzik_bip" /><ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008779.html Consensus changes are not about making a change to the software],<br />
Pieter Wuille, 18 June 2015</ref><br />
<br />
If Garzik's proposal gains strong consensus, it will be as safe as possible<br />
for a hard fork and it will allow increasing the block size up to 32 MB<br />
without any additional risk of a fork.<br />
<br />
==== Why is it limited to 32 megabytes? ====<br />
<br />
According to the draft BIP, "the 32 MB hard fork is largely coincidental -- a whole network upgrade at 32 MB was likely needed anyway."<br />
<br />
=== Lightning Network ===<br />
<br />
Questions related to using the proposed [http://lightning.network/ Lightning network] as a way to scale the number of users Bitcoin can support.<br />
<br />
==== How does transaction security differ from that of Bitcoin? ====<br />
<br />
Transactions on the proposed Lightning network use Bitcoin transactions exclusively to transfer bitcoins<ref name="russell_lightning1">[http://rusty.ozlabs.org/?p=450 Lightning Networks: Part I], Rusty Russell, 30 March 2015</ref>, and so the same security as regular Bitcoin transactions is provided when both a Lightning hub and client are cooperating.<br />
<br />
When a Lightning hub or client refuses to cooperate with the other (maybe because they accidentally went offline), the other party can still receive their full 100% bitcoin balance by closing the payment channel—but they must first wait for a defined amount of time mutually chosen by both the hub and client.<ref>[http://rusty.ozlabs.org/?p=462 Lightning Networks: Part II], Rusty Russell, 1 April 2015</ref><br />
<br />
If one party waits too long to close the payment channel, the other party may be able to steal bitcoins. However, it is possible to delegate the task of closing the channel in an emergency to an unlimited number of hubs around the Internet, so closing the channel on time should be easy.<ref name="russell_lightning4">[http://rusty.ozlabs.org/?p=477 Lightning Networks: Part IV], Rusty Russell, 8 April 2015</ref><br />
<br />
In summary, provided that payment channels are closed on time, the worst that can happen to users is that they may have to wait a few weeks for a channel to fully close before spending the bitcoins they received from it. Their security is otherwise the same as with regular Bitcoin.<br />
<br />
For Lightning hubs, security is slightly worse in the sense that they need to keep a potentially-large amount of funds in a hot wallet<ref name="lightning_paper">[http://lightning.network/lightning-network-paper-DRAFT-0.5.pdf Lightning Network (Draft 0.5)], Section 6.3: Coin Theft via Hacking, Joseph Poon and Thaddeus Dryja</ref>, so they can’t take advantage of the anti-hacking protection offered by cold wallets. Otherwise, Lightning hubs have the same security as clients.<br />
<br />
==== When will Lightning be ready for use? ====<br />
<br />
Lightning requires a basic test implementation (work underway<ref>[https://lists.blockstream.com/pipermail/lightning-dev/2015-June/000018.html Lightning first steps], Rusty Russell, 13 June 2015</ref>), several soft-fork changes to the Bitcoin protocol (work underway<ref>[https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki BIP65: CheckLockTimeVerify], Peter Todd, 1 October 2014</ref><ref>[https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki BIP68: Consensus-enforced transaction replacement], Mark Friedenbach, 28 May 2015</ref>, and wallets need to be updated to support the Lightning network protocol.<ref name="russell_lightning4" /><br />
<br />
Dr. Adam Back has said, "I expect we can get something running inside a year."<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009242.html Reply to Andresen regarding Lightning], Dr. Adam Back, 28 June 2015</ref><br />
<br />
==== Doesn’t Lightning require bigger blocks anyway? ====<br />
<br />
Lightning is block-size neutral. It requires one on-chain transaction to open a channel between a hub and a client, and one on-chain transaction to close a channel.<ref name="russell_lightning1" /> In between it can support an unlimited number of transactions between anyone on the Lightning network.<ref name="lightning_paper" /><br />
<br />
Using the numbers from the Lightning presentation<ref name="lightning_slides">[http://lightning.network/lightning-network.pdf Lightning presentation], Joseph Poon, 23 February 2015</ref>, if people open and close a plausible two channels a year, Lightning can support about 52 million users with the current one-megabyte limit—and each user can make an unlimited number of transactions. Currently, assuming people make an average of only two Bitcoin transactions a day, basic Bitcoin can support only 288,000 users.<br />
<br />
Under these assumptions, Lightning is 180 times (17,900%) more efficient than basic Bitcoin.<br />
<br />
Presumably, if around 30 million people are using Bitcoin via Lightning so that capacity is called into question, it will not be difficult to find consensus to double the block size to two megabytes and bring user capacity up to 105 million. The same goes for later increases to 200 million (4MB), 400 million (8MB), 800 million (16MB), 1.6 billion (32 MB), 3.2 billion (64MB), and all 7 billion living humans (133MB). In each case, all Lightning network participants get unlimited transactions to the other participants.<br />
<br />
For basic Bitcoin to scale to just 2 transactions a day for 7 billion people would require 24-gigabyte blocks.<ref name="lightning_slides" /><br />
<br />
=== Sidechains ===<br />
<br />
==== Real quick, what are sidechains? ====<br />
<br />
Block chains that are separate from Bitcoin’s block chain, but which allow you to receive and spend bitcoins using a two-way peg (2WP).<ref name="sidechains_paper">[https://www.blockstream.com/sidechains.pdf Sidechains paper], Adam Back et al., 22 October 2014</ref> (Although a sidechain can never be more secure than the Bitcoin block chain.<ref>[https://www.reddit.com/r/Bitcoin/comments/39r85g/sidechain_hate/cs5spbg Security limitations of pegged chains], Gregory Maxwell, 14 June 2015</ref>)<br />
<br />
==== Are sidechains a scaling option? ====<br />
<br />
No. Sidechains have the same fundamental scaling problems as Bitcoin does. Moving some transactions to sidechains simply moves some problems elsewhere on the network—the total difficulty of the problem remains the same.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008617.html Sidechains not a direct means for solving any of the scaling problems Bitcoin has], Pieter Wuille, 13 June 2015</ref><br />
<br />
==== But couldn’t I create a sidechain that had 100 GB blocks? ====<br />
<br />
Certainly, sidechain code is open source<ref>[https://github.com/ElementsProject/elements Elements Project]</ref>—so you can create your own sidechain. But you’d still have the difficulty of finding people who are willing to validate 100 GB blocks with their own full nodes.<br />
<br />
==== Do sidechains require a hard fork? ====<br />
<br />
No. Federated sidechains, such as have already been implemented<ref>[https://github.com/ElementsProject/elements/tree/alpha Elements Alpha]</ref>, don’t require any changes to the Bitcoin consensus rules. Merged-mined sidechains, which have not been implemented yet, do require a backwards-compatible soft fork in order to transfer funds between Bitcoin and the sidechain.<ref name="sidechains_paper" /><br />
<br />
== References ==<br />
<references /></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Scalability_FAQ&diff=60158Scalability FAQ2016-01-24T02:16:55Z<p>Dooglus: /* Should miners be allowed to decide the block size? */ fix typo</p>
<hr />
<div>Answers to commonly-asked questions and concerns about scaling Bitcoin, including “level 1” solutions such as increasing the block size and “level 2” solutions such as the proposed Lightning network.<br />
<br />
== Background ==<br />
<br />
Questions about how Bitcoin currently works (related to scaling) as well as questions about the technical terminology related to the scaling discussion.<br />
<br />
=== What is the short history of the block size limit? ===<br />
<br />
''Note: the software now called Bitcoin Core was previously simply called “Bitcoin”.<ref>[https://bitcoin.org/en/release/v0.9.0#rebranding-to-bitcoin-core Bitcoin Core 0.9.0 release notes], Bitcoin.org, 19 March 2014</ref> To avoid confusion with the Bitcoin system, we’ll use the Bitcoin Core name.''<br />
<br />
Bitcoin Core was initially released without an explicit block size limit. However, the code did limit network messages to a maximum of 32 MiB, setting an effective upper bound on block size.<ref>[https://bitcointalk.org/index.php?topic=68121 Earliest known Bitcoin code], <code>src/main.h:17</code></ref><br />
<br />
Around 15 July 2010, Satoshi Nakamoto changed Bitcoin Core’s mining code so that it wouldn’t create any blocks larger than 990,000 bytes.<ref>[https://github.com/bitcoin/bitcoin/commit/a30b56ebe76ffff9f9cc8a6667186179413c6349 Bitcoin Core commit a30b56e], Satoshi Nakamoto, 15 July 2010</ref><br />
<br />
Two months later on 7 September 2010, Nakamoto changed Bitcoin Core’s consensus rules to reject blocks larger than 1,000,000 bytes (1 megabyte) if their block height was higher than 79,400.<ref>[https://github.com/bitcoin/bitcoin/commit/8c9479c6bbbc38b897dc97de9d04e4d5a5a36730 Bitcoin Core commit 8c9479c], Satoshi Nakamoto, 7 September 2010</ref> (Block 79,400 was later produced on 12 September 2010.<ref>[https://www.biteasy.com/blockchain/blocks/000000000021d821ec06be7173f413690bc5c4bc648dfa70b3b6763236f055b7 Block height 79400], dated 12 September 2010</ref>)<br />
<br />
Neither the July nor the September commit message explains the reason for the limit, although the careful attempt to prevent a fork may indicate Nakamoto didn’t consider it an emergency.<br />
<br />
Nakamoto’s subsequent statements supported raising the block size at a later time<ref>[https://bitcointalk.org/index.php?topic=1347.msg15139#msg15139 Increasing the block size when needed], Satoshi Nakamoto, 3 October 2010</ref>, but he never publicly specified a date or set of conditions for the raise.<br />
<br />
=== What is this Transactions Per Second (TPS) limit? ===<br />
<br />
The current block size limit is 1,000,000 bytes (1 megabyte)<ref>[https://github.com/bitcoin/bitcoin/blob/41076aad0cbdfa4c4cf376e345114a5c29086f81/src/consensus/consensus.h#L10 <code>MAX_BLOCK_SIZE</code>], retrieved 2 July 2015</ref>, although a small amount of that space (such as the block header) is not available to store transactions.<ref>[https://bitcoin.org/en/developer-reference#serialized-blocks Block serialization description], Bitcoin.org Developer Reference</ref><br />
<br />
Bitcoin transactions vary in size depending on multiple factors, such as whether they’re spending single-signature inputs or a multiple signature inputs, and how many inputs and outputs they have.<br />
<br />
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks (600). For example, if you assume average transactions are 250 bytes,<br />
<br />
<pre>6.6 TPS = 1,000,000 / 250 / 600</pre><br />
<br />
There seems to be general agreement that Bitcoin in 2015 can handle about 3 TPS with the current average size of transactions.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/007986.html Max TPS based on current average transaction size], Mike Hearn, 8 May 2015</ref><ref name="maxwell_not_proposing">[https://www.reddit.com/r/Bitcoin/comments/39yaod/bitcoinorg_position_on_hard_forks/cs7qz5c "No one proposing 3 TPS forever"], Gregory Maxwell, 15 June 2015</ref><br />
<br />
Both old estimates<ref>[[Scalability]], Bitcoin Wiki, retrieved 7 July<br />
2015</ref> and new estimates<ref name="garzik_bip" /> place the<br />
theoretical maximum at 7 TPS with current Bitcoin consensus rules<br />
(including the 1MB block size limit).<br />
<br />
=== What do devs mean by the scaling expressions O(1), O(n), O(n<sup>2</sup>), etc…? ===<br />
<br />
[https://en.wikipedia.org/wiki/Big_O_notation Big O notation] is a shorthand used by computer scientists to describe how well a system scales. Such descriptions are rough approximations meant to help predict potential problems and evaluate potential solutions; they are not usually expected to fully capture all variables.<br />
<br />
* '''O(1)''' means a system has roughly the same properties no matter how big it gets.<br />
* '''O(n)''' means that a system scales linearly: doubling the number of things (users, transactions, etc.) doubles the amount of work.<br />
* '''O(n<sup>2</sup>)''' means that a system scales quadratically : doubling (2x) the number of things quadruples (4x) the amount of work. Often written O(n^2) is places without convenient superscripts.<br />
* Additional examples may be found in the [https://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions Wikipedia article]<br />
<br />
The following subsections show cases where big O notation has been applied to the scaling Bitcoin transaction volume.<br />
<br />
==== O(1) block propagation ====<br />
<br />
Bitcoin Core currently relays unconfirmed transactions and then later relays blocks containing many of the same transactions. This redundant relay can be eliminated to allow miners to propagate large blocks very quickly to active network nodes, and would also significantly reduce miner need for peak bandwidth. Currently most miners use a network<ref name="block_relay_net">[http://bitcoinrelaynetwork.org/ Matt Corallo's block relay network]</ref> that is about 25x more efficient than stock Bitcoin Core<ref>[https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2#i-know-that-you-know IBLT design document], Gavin Andresen, 11 August 2014</ref> and almost equally as effective as O(1) block propagation for current block sizes.<br />
<br />
==== O(n<sup>2</sup>) network total validation resource requirements ====<br />
<br />
[[File:On2_scaling_illustrated.png|thumb|right|visualization of O(n<sup>2</sup>) scaling]]<br />
<br />
Each on-chain Bitcoin transaction needs to be processed by each full node. If we assume that a certain percentage of users run full nodes (''n'') and that each user creates a certain number of transactions on average (''n'' again), then the network’s total resource requirements are <code>n<sup>2</sup> = n * n</code>. In short, this means that the aggregate cost of keeping all transactions on-chain quadruples each time the number of users doubles.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009199.html Total system cost], Dr. Adam Back, 28 June 2015</ref> For example,<br />
<br />
* Imagine a network starts with 100 users and 2 total nodes (a 2% ratio).<br />
* The network doubles in users to 200. The number of nodes also doubles to 4 (maintaining a 2% ratio of decentralized low-trust security). However, double the number of users means double the number of transactions, and each node needs to process ''every'' transaction---so each node now does double work with its bandwidth and its CPU. With double the number of nodes and double the amount of work per node, total work increases by four times.<br />
* The network doubles again: 400 users, 8 nodes (still 2% of total), and 4 times the original workload per node for a total of 16 times as much aggregate work as the original.<br />
* Another doubling: 800 users, 16 nodes (still 2%), and 8 times the original workload per node for a total of 64 times aggregate work as the original.<br />
* Another doubling: 1,600 users—sixteen times the original---with 32 nodes (still 2%), and 16 times the original workload per node. The aggregate total work done by nodes is 256 times higher than it was originally.<br />
<br />
=== What’s the difference between on-chain and off-chain transactions? ===<br />
<br />
On-chain Bitcoin transactions are those that appear in the Bitcoin block chain. Off-chain transactions are those that transfer ownership of bitcoins without putting a transaction on the block chain.<br />
<br />
Common and proposed off-chain transactions include:<br />
<br />
* '''Exchange transactions:''' when you buy or sell bitcoins, the exchange tracks ownership in a database without putting data in the block chain. Only when you deposit or withdraw bitcoins does the transaction appear on the block chain.<br />
* '''Web wallet internal payments:''' many web wallets allow users of the service to pay other users of the same service using off-chain payments. For example, when one Coinbase user pays another Coinbase user.<br />
* '''Tipping services:''' most tipping services today, such as ChangeTip, use off-chain transactions for everything except deposits and withdrawals.<ref>[https://www.changetip.com/fees ChangeTip fees], retrieved 3 July 2015</ref><br />
* '''Payment channels:''' channels are started using one on-chain transaction and ended using a second on-chain transaction.<ref>[https://bitcoin.org/en/developer-guide#micropayment-channel Micropayment channels], Bitcoin.org Developer Guide</ref> In between can be an essentially unlimited number of off-chain transactions as small as a single satoshi (1/100,000,000th of a bitcoin). Payment channels include those that [https://bitcoinj.github.io/working-with-micropayments exist today] as well as proposed hub-and-spoke channels and the more advanced [http://lightning.network/ Lightning network].<br />
<br />
Approximately 90% to 99% of all bitcoin-denominated payments today are made off-chain.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008844.html Pure off-chain is a weak form of layer 2], Dr. Adam Back, 19 June 2015</ref><br />
<br />
=== What is a fee market? ===<br />
<br />
When you create a Bitcoin transaction, you have the option to pay a [[transaction fee]]. If your software is flexible, you can pay anything from zero fees (a free transaction) to 100% of the value of the transaction (spend-to-fees).<br />
<br />
Miners who have more transactions available to them than they have room in the blocks they choose to make, typically choose to maximize their revenue by including the transactions that pay the most fees per kilobyte of data.<ref name="fee_pri">[https://bitcointalk.org/index.php?topic=95837.0 Fee prioritization patch], Gavin Andresen, 26 July 2012</ref> This confirms higher-fee transactions before lower-fee transactions.<br />
<br />
If blocks become full on a regular basis, users who pay the minimum fee will have to wait a longer and longer time for their transactions to confirm. At this point, a fee market may arise where transactions that pay higher fees get confirmed significantly faster than transactions that pay low fees.<ref name="todd_coinwallet">[https://gist.github.com/petertodd/8e87c782bdf342ef18fb Comments on the CoinWallet.eu tx-flood stress-test], Peter Todd, 22 June 2015</ref><ref name="garzik_bip" /><br />
<br />
=== What is the most efficient way to scale Bitcoin? ===<br />
<br />
Remove its decentralization properties, specifically decentralized mining and decentralized full nodes. Mining wastes enormous amounts of electricity to provide a decentralized ledger and full nodes waste an enormous amount of bandwidth and CPU time keeping miners honest.<br />
<br />
If users instead decided to hand authority over to someone they trusted, mining and keeping miners honest wouldn’t be needed. This is how Visa, MasterCard, PayPal, and the rest of the centralized payment systems works—users trust them, and they have no special difficulty scaling to [[scalability|millions of transactions an hour]]. It’s very efficient; it isn’t decentralized.<br />
<br />
=== What is a hard fork, and how does it differ from other types of forks? ===<br />
<br />
The word fork is badly overloaded in Bitcoin development.<br />
<br />
* '''[[hardfork|Hard fork]]:''' a change to the system which is not backwards compatible. Everyone needs to upgrade or things can go wrong.<br />
* '''[[softfork|Soft fork]]:''' a change to the system which is backwards compatible as long as a majority of miners enforce it. Full nodes that don’t upgrade have their security reduced.<br />
* '''Chain fork:''' when there are two are more blocks at the same height on a block chain. This typically happens a few times a week by accident, but it can also indicate more severe problems.<br />
* '''[https://en.wikipedia.org/wiki/Fork_%28software_development%29 Software fork]:''' using the code from an open source project to create a different project.<br />
* '''[https://help.github.com/articles/fork-a-repo/ Git/GitHub fork]:''' a way for developers to write and test new features before contributing them to a project.<br />
<br />
(There are other types of software-related forks, but they don’t tend to cause as much confusion.)<br />
<br />
=== What are the block size soft limits? ===<br />
<br />
Bitcoin Core has historically come pre-configured to limit blocks it mines to certain sizes.<ref name="fee_pri" /> These “limits” aren’t restrictions placed on miners by other miners or nodes, but rather configuration options that help miners produce reasonably-sized blocks.<br />
<br />
Miners can change their soft limit size (up to 1 MB) using <code>-blockmaxsize=&lt;size&gt;</code><br />
<br />
Default soft limits at various times:<br />
<br />
* '''July 2012:''' <code>-blockmaxsize</code> option created and set to default 250 KB soft limit<ref>[https://github.com/bitcoin/bitcoin/commit/c555400ca134991e39d5e3a565fcd2215abe56f6 Bitcoin Core commit c555400], Gavin Andresen, 12 July 2012</ref><br />
* '''November 2013:''' Raised to 750KB<ref>[https://github.com/bitcoin/bitcoin/commit/ad898b40aaf06c1cc7ac12e953805720fc9217c0 Bitcoin Core commit ad898b40], Gavin Andresen, 27 November 2013</ref><br />
* '''June 2015:''' Raise to 1 MB suggested<ref>[https://github.com/bitcoin/bitcoin/pull/6231 Bitcoin Core pull #6231], Chris Wheeler, 4 June 2015</ref><br />
<br />
== General Block Size Increase Theory ==<br />
<br />
Questions about increasing the block size in general, not related to any<br />
specific proposal.<br />
<br />
==== Why are some people in favor of keeping the block size at 1 MB forever? ====<br />
<br />
It is commonly claimed<ref name="garzik_bip" /><ref>[https://epicenterbitcoin.com/podcast/082/ Epicenter Bitcoin podcast #82], Mike Hearn (interviewed), 8 June 2015</ref> that there are people opposed to ever raising the maximum block size limit, but no Bitcoin developers have suggested keeping the maximum block size at one megabyte forever.<ref name="maxwell_not_proposing" /><br />
<br />
All developers support raising the maximum size at some point<ref>[https://www.reddit.com/r/Bitcoin/comments/39kqzs/how_about_a_softfork_optin_blocksize_increase/cs5hj8l Nothing magic about 1MB], Dr. Adam Back, 13 June 2015</ref><ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008328.html Regarding size-independent new block propagation], Pieter Wuille, 28 May 2015</ref>—they just disagree about whether now is the correct time.<br />
<br />
==== Should miners be allowed to decide the block size? ====<br />
<br />
A block may include as little as a single transaction, so miners can always restrict block size. Letting miners choose the maximum block size is more problematic for several reasons:<br />
<br />
# '''Miners profit, others pay the cost:''' bigger blocks earn miners more fees, but miners don’t need to store those blocks for more than a few days.<ref>[https://github.com/bitcoin/bitcoin/pull/5863 Bitcoin Core pull #5863 adding pruning functionality], Suhas Daftuar et al., 6 March 2015</ref> Other users who want full validation security, or who provide services to lightweight wallets, pay the costs of downloading and storing those larger blocks.<br />
# '''Bigger miners can afford more bandwidth:''' each miner needs to download every transaction that will be included in block,<ref name="maxwell_correcting_assumptions" /> which means that they all need to pay for high-speed connections. However, a miner with 8.3% of total hash rate can take that cost out of the about 300 BTC they make a day, while a miner with only 0.7% of total hash rate has to take that cost out of only 25 BTC a day. This means bigger miners may logically choose to make bigger blocks even though it may further centralize mining.<br />
# '''Centralized hardware production:''' only a few companies in the world produce efficient mining equipment, and many of them have chosen to stop selling to the public.<ref>[http://blogs.wsj.com/venturecapital/2014/09/05/for-kncminer-time-to-forget-selling-bitcoin-machines-to-at-home-miners/ KnCMiner to stop selling to home miners], Wall Street Journal, Yuliya Chernova, 5 September 2014</ref> This prevents ordinary Bitcoin users from participating in the process even if they were willing to pay for mining equipment.<br />
# '''Voting by hash rate favors larger miners:''' voting based on hash rate allows the current hash rate majority (or super-majority) to enforce conditions on the minority. This is similar to a lobby of large businesses being able to get laws passed that may hurt smaller businesses.<ref>[https://www.reddit.com/r/Bitcoin/comments/39kzyt/draft_bip_100_soft_fork_block_size_increase/cs5gvak Miners choosing the block size limit is ill-advised], Meni Rosenfeld, 13 June 2015</ref><br />
# '''Miners may not care about users:''' this was demonstrated during the [[July 2015 Forks]] where even after miners lost over $50,000 USD in income from mining invalid chains, and even after they were told that long forks harm users, they continued to mine improperly.<ref>[https://bitcointalk.org/index.php?topic=700411.msg11790734#msg11790734 Intention to continue SPV mining], Wang Chun, 4 July 2015</ref><br />
<br />
However, there are also possible justifications for letting miners choose the block size:<br />
<br />
# '''Authenticated participants:''' miners are active participants in Bitcoin, and they can prove it by adding data to the blocks they create.<ref>[https://bitcoin.org/en/developer-reference#term-coinbase-field Coinbase field], Bitcoin.org Developer Reference</ref> It is much harder to prove people on Reddit, BitcoinTalk, and elsewhere are real people with an active stake in Bitcoin.<br />
# '''Bigger blocks may cost miners:''' small miners and poorly-connected miners are at a disadvantage if larger blocks are produced<ref name="wuille_centralization" />, and even large and well-connected miners may find that large blocks reduce their profit percentage if the cost of bandwidth rises too high or their stale rate increases.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008355.html F2Pool block size concerns], Chun Wang, 29 May 2015</ref><br />
<br />
==== How could a block size increase affect user security? ====<br />
<br />
Bitcoin’s security is highly dependent on the number of active users who protect their bitcoins with a full node like Bitcoin Core. The more active users of full nodes, the harder it is for miners to trick users into accepting fake bitcoins or other frauds.<ref>[https://medium.com/@lopp/bitcoin-nodes-how-many-is-enough-9b8e8f6fd2cf Bitcoin nodes: how many is enough?], Jameson Lopp, 7 June 2015</ref><br />
<br />
Full nodes need to download and verify every block, and most nodes also store blocks plus relay transactions, full blocks, and filtered blocks to other users on the network. The bigger blocks become, the more difficult it becomes to do all this, so it is expected that bigger blocks will both reduce the number of users who currently run full nodes and suppress the number of users who decide to start running a full node later.<ref>[https://www.reddit.com/r/Bitcoin/comments/3bae2d/amir_taaki_on_raising_the_block_size_a_lot_of/cslcgmw Block size increases-only will create problems], Dr. Adam Back, 28 June 2015</ref><br />
<br />
In addition, full blocks may increase mining centralization<ref name="wuille_centralization" /> at a time when mining is already so centralized that it makes it easy to reverse transactions which have been confirmed multiple times.<ref>[http://bitcoin.stackexchange.com/questions/32562/when-to-worry-about-1-confirmation-payments/32564#32564 When to worry about one-confirmation payments], David A. Harding, 17 November 2014</ref><br />
<br />
==== How could larger blocks affect proof-of-work (POW) security? ====<br />
<br />
Proof of work security is dependent on how much money miners spend on mining equipment. However, to effectively mine blocks, miners also need to spend money on bandwidth to receive new transactions and blocks created by other miners; CPUs to validate received transactions and blocks; and bandwidth to upload new blocks. These additional costs don’t directly contribute to POW security.<ref name="maxwell_correcting_assumptions">[https://www.reddit.com/r/Bitcoin/comments/39tgno/letting_miners_vote_on_the_maximum_block_size_is/cs6rek5 Correcting wrong assumptions about mining], Gregory Maxwell, 15 June 2015</ref><br />
<br />
As block sizes increase, the amount of bandwidth and CPU required also increases. If block sizes increase faster than the costs of bandwidth and CPU decrease, miners will have less money for POW security relative to the gross income they earn.<br />
<br />
In addition, larger blocks have a higher risk of becoming stale (orphaned)<ref name="rusty_dsl" />, which directly correlates to lost POW security. For example, if the network average stale rate is 10%, then 10% of POW performed isn't protecting transactions on the block chain.<br />
<br />
=== What happens if blocks aren't big enough to include all pending transactions? ===<br />
<br />
This is already the case more often than not<ref>[http://statoshi.info/dashboard/db/transactions?from=1433297061121&to=1435889061123 Statoshi.info mempool queue June to July 2015]</ref>, so we know that miners will simply queue transactions. The transactions eligible for block inclusion that pay the highest fee per kilobyte will be confirmed earlier than transactions that pay comparatively lower fees.<ref name="fee_pri" /><br />
<br />
What happens from there is debated:<br />
<br />
* BitcoinJ lead developer Mike Hearn believes there would be “crashing nodes, a swelling transaction backlog, a sudden spike in double spending, [and] skyrocketing fees.”<ref>[https://medium.com/@octskyward/crash-landing-f5cc19908e32 Crash Landing], Mike Hearn, 7 May 2015</ref><br />
* Bitcoin Foundation chief scientist Gavin Andresen believes that the “average transaction fee paid will rise, people or applications unwilling or unable to pay the rising fees will stop submitting transactions, [and] people and businesses will shelve plans to use Bitcoin, stunting growth and adoption.” <ref>[https://github.com/bitcoin/bitcoin/pull/6341 Bitcoin Core pull #6341], Gavin Andresen, 26 June 2015</ref><br />
* Bitcoin Core developer Pieter Wuille replies to Andresen’s comment above: “Is it fair to summarize this as ‘Some use cases won’t fit any more, people will decide to no longer use the blockchain for these purposes, and the fees will adapt.’? I think that is already happening […] I don’t think we should be afraid of this change or try to stop it.” <ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009098.html The need for larger blocks], Pieter Wuille, 26 June 2015</ref><br />
* Bitcoin Core developer Jeff Garzik writes, "as blocks get full and the bidding war ensues, the bitcoin user experience rapidly degrades to poor. In part due to bitcoin wallet software’s relative immaturity, and in part due to bitcoin’s settlement based design, the end user experience of their transaction competing for block size results in erratic, and unpredictably extended validation times."<ref name="garzik_bip" /><br />
<br />
== Specific Scaling Proposals ==<br />
<br />
=== Andresen-Hearn Block Size Increase Proposals ===<br />
<br />
Questions about the series of related proposals by Gavin Andresen and Mike Hearn to use a hard fork to raise the maximum block size, thereby allowing miners to include more on-chain transactions. As of July 2015, the current focus is [https://github.com/bitcoin/bips/pull/163 BIP101].<br />
<br />
==== What is the major advantage of this proposal? ====<br />
<br />
''Bitcoin can support many more users.'' Assuming earliest possible adoption, 250 bytes per on-chain transaction, 144 blocks per day, and 2 transaction a day per user, Bitcoin can support about,<br />
<br />
* 288,000 users in 2015<br />
* 2,304,000 users in 2016 (800% increase)<br />
* 4,608,000 in 2018 (1,600%)<br />
* 9,216,000 in 2020 (3,200%)<br />
* 18,432,000 in 2022 (6,400%)<br />
* 36,864,000 in 2024 (12,800%)<br />
* 73,728,000 in 2026 (25,600%)<br />
* 147,456,000 in 2028 (51,200%)<br />
* 294,912,000 in 2030 (102,400%)<br />
* 589,824,000 in 2032 (204,800%)<br />
* 1,179,648,000 in 2034 (409,600%<br />
* 2,359,296,000 in 2036 (819,200%)<br />
<br />
==== What is the major disadvantage of this proposal? ====<br />
<br />
''The total cost of remaining decentralized will be high.'' Assuming earliest possible adoption and that the ratio of total users to full node operators remains the same as today, the total estimated amount of work necessary to maintain the decentralized system under the [[#O.28n2.29_network_total_validation_resource_requirements|O(<sup>2</sup>) scaling model]] will be,<br />
<br />
* 100% of today’s work in 2015<br />
* 6,400% in 2016<br />
* 25,600% in 2018<br />
* 102,400% in 2020<br />
* 409,600% in 2022<br />
* 1,638,400% in 2024<br />
* 6,553,600% in 2026<br />
* 26,214,400% in 2028<br />
* 104,857,600% in 2030<br />
* 419,430,400% in 2032<br />
* 1,677,721,600% in 2034<br />
* 6,710,886,400% in 2036<br />
<br />
For example, if the total amount spent on running full nodes today (not counting mining) is $100 thousand per year, the estimated cost for the same level of decentralization in 2036 will be $6.7 trillion per year if validation costs stay the same. (They'll certainly go down, but algorithmic and hardware improvements probably won't eliminate an approximate 6,710,886,400% cost increase.)<br />
<br />
==== What are the dangers of the proposed hard fork? ====<br />
<br />
Under the current proposal, 75% of miners must indicate that they agree to accept blocks up to 8 MB in size.<ref name="bip101">[https://github.com/bitcoin/bips/pull/163 BIP101], Gavin Andresen, 24 June 2016</ref> After the change goes into effect, if any miner creates a block larger than 1 MB, all nodes which have not upgraded yet will reject the block.<ref>[https://bitcoin.org/en/developer-guide#consensus-rule-changes Consensus rule changes], Bitcoin.org Developer Guide</ref><br />
<br />
If all full nodes have upgraded, or very close to all nodes, there should be no practical effect. If a significant number of full nodes have not upgraded, they will continue using a different block chain than the upgraded users, with the following consequences:<br />
<br />
* Bitcoins received from before the fork can be spent twice, once on both sides of the fork. This creates a high double spend risk.<br />
* Bitcoins received after the fork are only guaranteed to be spendable on the side of the fork they were received on. This means some users will have to lose money to restore Bitcoin to a single chain.<br />
<br />
Users of hosted wallets (Coinbase, BlockChain.info, etc.) will use whatever block chain their host chooses. Users of lightweight P2P SPV wallets will use the [[Thin Client Security|longest chain they know of]], which may not be the actual longest chain if they only connect to nodes on the shorter chain. Users of non-P2P SPV wallets, like Electrum, will use whatever chain is used by the server they connect to.<br />
<br />
If a bad hard fork like this happens, it will likely cause large-scale confusion and make Bitcoin very hard to use until the situation is resolved.<br />
<br />
==== What is the deployment schedule for BIP 101? ====<br />
<br />
* The patch needs to be accepted into Bitcoin Core, Bitcoin XT, or both.<br />
* If accepted into Bitcoin Core, miners using that software will need to upgrade (this probably requires a new released version of Bitcoin Core). If accepted only into Bitcoin XT, miners will need to switch to using XT.<br />
* After 75% of miners have upgraded, 8MB blocks will become allowed at the the latest of (1) 11 January 2016 or (2) two weeks after the 75% upgrade threshold.<ref name="bip101" /><br />
* After the effective date has passed, any miner may create a block larger than 8MB. When a miner does this, upgraded full nodes will accept that block and non-upgraded full nodes will reject it, forking the network.<ref name="bip101" /> See [[#What_are_the_dangers_of_the_proposed_hard_fork.3F|hard fork dangers]] for what his might mean.<br />
<br />
==== Will miners go straight from 1 MB blocks to 8 MB blocks? ====<br />
<br />
That would be highly unlikely. Uploading an 8 MB block currently takes significantly more time than uploading a 1 MB block<ref name="rusty_dsl">[http://rusty.ozlabs.org/?p=509 Mining on a home DSL connection test results], Rusty Russell, 19 June 2015</ref>, even with the roughly 25x reduction in size available from use of Matt Corallo’s block relay network.<ref name="block_relay_net" /><br />
<br />
The longer it takes to upload a block, the higher the risk it will become a stale block—meaning the miner who created it will not receive the block subsidy or transaction fees (currently about 25 BTC per block).<br />
<br />
However, if technology like Invertible Bloom Lookup Tables (IBLTs) is deployed and found to work as expected<ref name="iblt">[https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2 O(1) block propagation], Gavin Andresen, 8 August 2014</ref>, or if mining [[#What_is_the_most_efficient_way_to_scale_Bitcoin.3F|centralizes further]], adding additional transactions may not have a significant enough cost to discourage miners from creating full blocks. In that case, blocks will be filled as soon as there are enough people wanting to make transactions paying the default relay fee<ref>[https://github.com/bitcoin/bitcoin/pull/3305 Bitcoin Core pull #3305 dropping default fees], Mike Hearn, 22 November 2013</ref> of 0.00001000 BTC/kilobyte.<br />
<br />
==== What tests have been performed related to this proposal? ====<br />
<br />
* '''20MB block processing''' (Gavin Andresen) “if we increased the maximum block size to 20 megabytes tomorrow, and every single miner decided to start creating 20MB blocks and there was a sudden increase in the number of transactions on the network to fill up those blocks… the 0.10.0 version of [Bitcoin Core] would run just fine.”<ref>[http://gavintech.blogspot.com/2015/01/twenty-megabytes-testing-results.html Twenty megabyte block testing], Gavin Andresen, 20 January 2015</ref> (ellipses in original)<br />
* '''Mining &amp; relay simulation''' (Gavin Andresen) “if blocks take 20 seconds to propagate, a network with a miner that has 30% of the hashing power will get 30.3% of the blocks.”<ref>[http://gavinandresen.ninja/are-bigger-blocks-better-for-bigger-miners Are bigger blocks better for bigger miners?], Gavin Andresen, 22 May 2015</ref><br />
* '''Mining on a home DSL connection''' (Rusty Russell) “Using the rough formula of 1-exp(-t/600), I would expect orphan rates of 10.5% generating 1MB blocks, and 56.6% with 8MB blocks; that’s a huge cut in expected profits.”<ref name="rusty_dsl" /><br />
* '''Mining centralization pressure''' (Pieter Wuille) “[This] does very clearly show the effects of larger blocks on centralization pressure of the system.”<ref name="wuille_centralization">[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008581.html Mining centralization pressure from non-uniform propagation speed], Pieter Wuille, 12 June 2015</ref><br />
<br />
<br />
=== Garzik Miner Block Size Voting Proposal (AKA BIP100) ===<br />
<br />
''Note, BIP 100 is the marketing name for this proposal. No BIP number<br />
has yet been publicly requested, and the number assigned is unlikely to<br />
be 100.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2014-May/005756.html<br />
Prenumbered BIP naming], Gregory Maxwell, 12 May 2014</ref>''<br />
<br />
Questions related to Jeff Garzik's proposal<ref name="garzik_bip">[http://gtf.org/garzik/bitcoin/BIP100-blocksizechangeproposal.pdf Draft BIP: decentralized economic policy], Jeff Garzik, 12 June 2015 (revised 15 June 2015)</ref> to allow miners to vote on raising and lowering the maximum block size.<br />
<br />
==== What does this proposal do? ====<br />
<br />
# It creates a one-time hard fork that does not automatically change the maximum block size.<br />
<br />
# It allows miners to vote to increase or decrease the maximum block size within the range of 1MB to 32MB. These changes are neither hard forks nor soft forks, but simply rules that all nodes should know about after the initial hard fork.<br />
<br />
==== Does it reduce the risk of a hard fork? ====<br />
<br />
Hard forks are most dangerous when they're done without strong<br />
consensus.<ref name="garzik_bip" /><ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008779.html Consensus changes are not about making a change to the software],<br />
Pieter Wuille, 18 June 2015</ref><br />
<br />
If Garzik's proposal gains strong consensus, it will as safe as possible<br />
for a hard fork and it will allow increasing the block size up to 32 MB<br />
without any additional risk of a fork.<br />
<br />
==== Why is it limited to 32 megabytes? ====<br />
<br />
According to the draft BIP, "the 32 MB hard fork is largely coincidental -- a whole network upgrade at 32 MB was likely needed anyway."<br />
<br />
=== Lightning Network ===<br />
<br />
Questions related to using the proposed [http://lightning.network/ Lightning network] as a way to scale the number of users Bitcoin can support.<br />
<br />
==== How does transaction security differ from that of Bitcoin? ====<br />
<br />
Transactions on the proposed Lightning network use Bitcoin transactions exclusively to transfer bitcoins<ref name="russell_lightning1">[http://rusty.ozlabs.org/?p=450 Lightning Networks: Part I], Rusty Russell, 30 March 2015</ref>, and so the same security as regular Bitcoin transactions is provided when both a Lightning hub and client are cooperating.<br />
<br />
When a Lightning hub or client refuses to cooperate with the other (maybe because they accidentally went offline), the other party can still receive their full 100% bitcoin balance by closing the payment channel—but they must first wait for a defined amount of time mutually chosen by both the hub and client.<ref>[http://rusty.ozlabs.org/?p=462 Lightning Networks: Part II], Rusty Russell, 1 April 2015</ref><br />
<br />
If one party waits too long to close the payment channel, the other party may be able to steal bitcoins. However, it is possible to delegate the task of closing the channel in an emergency to an unlimited number of hubs around the Internet, so closing the channel on time should be easy.<ref name="russell_lightning4">[http://rusty.ozlabs.org/?p=477 Lightning Networks: Part IV], Rusty Russell, 8 April 2015</ref><br />
<br />
In summary, provided that payment channels are closed on time, the worst that can happen to users is that they may have to wait a few weeks for a channel to fully close before spending the bitcoins they received from it. Their security is otherwise the same as with regular Bitcoin.<br />
<br />
For Lightning hubs, security is slightly worse in the sense that they need to keep a potentially-large amount of funds in a hot wallet<ref name="lightning_paper">[http://lightning.network/lightning-network-paper-DRAFT-0.5.pdf Lightning Network (Draft 0.5)], Section 6.3: Coin Theft via Hacking, Joseph Poon and Thaddeus Dryja</ref>, so they can’t take advantage of the anti-hacking protection offered by cold wallets. Otherwise, Lightning hubs have the same security as clients.<br />
<br />
==== When will Lightning be ready for use? ====<br />
<br />
Lightning requires a basic test implementation (work underway<ref>[https://lists.blockstream.com/pipermail/lightning-dev/2015-June/000018.html Lightning first steps], Rusty Russell, 13 June 2015</ref>), several soft-fork changes to the Bitcoin protocol (work underway<ref>[https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki BIP65: CheckLockTimeVerify], Peter Todd, 1 October 2014</ref><ref>[https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki BIP68: Consensus-enforced transaction replacement], Mark Friedenbach, 28 May 2015</ref>, and wallets need to be updated to support the Lightning network protocol.<ref name="russell_lightning4" /><br />
<br />
Dr. Adam Back has said, "I expect we can get something running inside a year."<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009242.html Reply to Andresen regarding Lightning], Dr. Adam Back, 28 June 2015</ref><br />
<br />
==== Doesn’t Lightning require bigger blocks anyway? ====<br />
<br />
Lightning is block-size neutral. It requires one on-chain transaction to open a channel between a hub and a client, and one on-chain transaction to close a channel.<ref name="russell_lightning1" /> In between it can support an unlimited number of transactions between anyone on the Lightning network.<ref name="lightning_paper" /><br />
<br />
Using the numbers from the Lightning presentation<ref name="lightning_slides">[http://lightning.network/lightning-network.pdf Lightning presentation], Joseph Poon, 23 February 2015</ref>, if people open and close a plausible two channels a year, Lightning can support about 52 million users with the current one-megabyte limit—and each user can make an unlimited number of transactions. Currently, assuming people make an average of only two Bitcoin transactions a day, basic Bitcoin can support only 288,000 users.<br />
<br />
Under these assumptions, Lightning is 180 times (17,900%) more efficient than basic Bitcoin.<br />
<br />
Presumably, if around 30 million people are using Bitcoin via Lightning so that capacity is called into question, it will not be difficult to find consensus to double the block size to two megabytes and bring user capacity up to 105 million. The same goes for later increases to 200 million (4MB), 400 million (8MB), 800 million (16MB), 1.6 billion (32 MB), 3.2 billion (64MB), and all 7 billion living humans (133MB). In each case, all Lightning network participants get unlimited transactions to the other participants.<br />
<br />
For basic Bitcoin to scale to just 2 transactions a day for 7 billion people would require 24-gigabyte blocks.<ref name="lightning_slides" /><br />
<br />
=== Sidechains ===<br />
<br />
==== Real quick, what are sidechains? ====<br />
<br />
Block chains that are separate from Bitcoin’s block chain, but which allow you to receive and spend bitcoins using a two-way peg (2WP).<ref name="sidechains_paper">[https://www.blockstream.com/sidechains.pdf Sidechains paper], Adam Back et al., 22 October 2014</ref> (Although a sidechain can never be more secure than the Bitcoin block chain.<ref>[https://www.reddit.com/r/Bitcoin/comments/39r85g/sidechain_hate/cs5spbg Security limitations of pegged chains], Gregory Maxwell, 14 June 2015</ref>)<br />
<br />
==== Are sidechains a scaling option? ====<br />
<br />
No. Sidechains have the same fundamental scaling problems as Bitcoin does. Moving some transactions to sidechains simply moves some problems elsewhere on the network—the total difficulty of the problem remains the same.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008617.html Sidechains not a direct means for solving any of the scaling problems Bitcoin has], Pieter Wuille, 13 June 2015</ref><br />
<br />
==== But couldn’t I create a sidechain that had 100 GB blocks? ====<br />
<br />
Certainly, sidechain code is open source<ref>[https://github.com/ElementsProject/elements Elements Project]</ref>—so you can create your own sidechain. But you’d still have the difficulty of finding people who are willing to validate 100 GB blocks with their own full nodes.<br />
<br />
==== Do sidechains require a hard fork? ====<br />
<br />
No. Federated sidechains, such as have already been implemented<ref>[https://github.com/ElementsProject/elements/tree/alpha Elements Alpha]</ref>, don’t require any changes to the Bitcoin consensus rules. Merged-mined sidechains, which have not been implemented yet, do require a backwards-compatible soft fork in order to transfer funds between Bitcoin and the sidechain.<ref name="sidechains_paper" /><br />
<br />
== References ==<br />
<references /></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Scalability_FAQ&diff=60157Scalability FAQ2016-01-24T01:59:46Z<p>Dooglus: /* Doesn’t Lightning require bigger blocks anyway? */ 180 times more != 180,000% more</p>
<hr />
<div>Answers to commonly-asked questions and concerns about scaling Bitcoin, including “level 1” solutions such as increasing the block size and “level 2” solutions such as the proposed Lightning network.<br />
<br />
== Background ==<br />
<br />
Questions about how Bitcoin currently works (related to scaling) as well as questions about the technical terminology related to the scaling discussion.<br />
<br />
=== What is the short history of the block size limit? ===<br />
<br />
''Note: the software now called Bitcoin Core was previously simply called “Bitcoin”.<ref>[https://bitcoin.org/en/release/v0.9.0#rebranding-to-bitcoin-core Bitcoin Core 0.9.0 release notes], Bitcoin.org, 19 March 2014</ref> To avoid confusion with the Bitcoin system, we’ll use the Bitcoin Core name.''<br />
<br />
Bitcoin Core was initially released without an explicit block size limit. However, the code did limit network messages to a maximum of 32 MiB, setting an effective upper bound on block size.<ref>[https://bitcointalk.org/index.php?topic=68121 Earliest known Bitcoin code], <code>src/main.h:17</code></ref><br />
<br />
Around 15 July 2010, Satoshi Nakamoto changed Bitcoin Core’s mining code so that it wouldn’t create any blocks larger than 990,000 bytes.<ref>[https://github.com/bitcoin/bitcoin/commit/a30b56ebe76ffff9f9cc8a6667186179413c6349 Bitcoin Core commit a30b56e], Satoshi Nakamoto, 15 July 2010</ref><br />
<br />
Two months later on 7 September 2010, Nakamoto changed Bitcoin Core’s consensus rules to reject blocks larger than 1,000,000 bytes (1 megabyte) if their block height was higher than 79,400.<ref>[https://github.com/bitcoin/bitcoin/commit/8c9479c6bbbc38b897dc97de9d04e4d5a5a36730 Bitcoin Core commit 8c9479c], Satoshi Nakamoto, 7 September 2010</ref> (Block 79,400 was later produced on 12 September 2010.<ref>[https://www.biteasy.com/blockchain/blocks/000000000021d821ec06be7173f413690bc5c4bc648dfa70b3b6763236f055b7 Block height 79400], dated 12 September 2010</ref>)<br />
<br />
Neither the July nor the September commit message explains the reason for the limit, although the careful attempt to prevent a fork may indicate Nakamoto didn’t consider it an emergency.<br />
<br />
Nakamoto’s subsequent statements supported raising the block size at a later time<ref>[https://bitcointalk.org/index.php?topic=1347.msg15139#msg15139 Increasing the block size when needed], Satoshi Nakamoto, 3 October 2010</ref>, but he never publicly specified a date or set of conditions for the raise.<br />
<br />
=== What is this Transactions Per Second (TPS) limit? ===<br />
<br />
The current block size limit is 1,000,000 bytes (1 megabyte)<ref>[https://github.com/bitcoin/bitcoin/blob/41076aad0cbdfa4c4cf376e345114a5c29086f81/src/consensus/consensus.h#L10 <code>MAX_BLOCK_SIZE</code>], retrieved 2 July 2015</ref>, although a small amount of that space (such as the block header) is not available to store transactions.<ref>[https://bitcoin.org/en/developer-reference#serialized-blocks Block serialization description], Bitcoin.org Developer Reference</ref><br />
<br />
Bitcoin transactions vary in size depending on multiple factors, such as whether they’re spending single-signature inputs or a multiple signature inputs, and how many inputs and outputs they have.<br />
<br />
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks (600). For example, if you assume average transactions are 250 bytes,<br />
<br />
<pre>6.6 TPS = 1,000,000 / 250 / 600</pre><br />
<br />
There seems to be general agreement that Bitcoin in 2015 can handle about 3 TPS with the current average size of transactions.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/007986.html Max TPS based on current average transaction size], Mike Hearn, 8 May 2015</ref><ref name="maxwell_not_proposing">[https://www.reddit.com/r/Bitcoin/comments/39yaod/bitcoinorg_position_on_hard_forks/cs7qz5c "No one proposing 3 TPS forever"], Gregory Maxwell, 15 June 2015</ref><br />
<br />
Both old estimates<ref>[[Scalability]], Bitcoin Wiki, retrieved 7 July<br />
2015</ref> and new estimates<ref name="garzik_bip" /> place the<br />
theoretical maximum at 7 TPS with current Bitcoin consensus rules<br />
(including the 1MB block size limit).<br />
<br />
=== What do devs mean by the scaling expressions O(1), O(n), O(n<sup>2</sup>), etc…? ===<br />
<br />
[https://en.wikipedia.org/wiki/Big_O_notation Big O notation] is a shorthand used by computer scientists to describe how well a system scales. Such descriptions are rough approximations meant to help predict potential problems and evaluate potential solutions; they are not usually expected to fully capture all variables.<br />
<br />
* '''O(1)''' means a system has roughly the same properties no matter how big it gets.<br />
* '''O(n)''' means that a system scales linearly: doubling the number of things (users, transactions, etc.) doubles the amount of work.<br />
* '''O(n<sup>2</sup>)''' means that a system scales quadratically : doubling (2x) the number of things quadruples (4x) the amount of work. Often written O(n^2) is places without convenient superscripts.<br />
* Additional examples may be found in the [https://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions Wikipedia article]<br />
<br />
The following subsections show cases where big O notation has been applied to the scaling Bitcoin transaction volume.<br />
<br />
==== O(1) block propagation ====<br />
<br />
Bitcoin Core currently relays unconfirmed transactions and then later relays blocks containing many of the same transactions. This redundant relay can be eliminated to allow miners to propagate large blocks very quickly to active network nodes, and would also significantly reduce miner need for peak bandwidth. Currently most miners use a network<ref name="block_relay_net">[http://bitcoinrelaynetwork.org/ Matt Corallo's block relay network]</ref> that is about 25x more efficient than stock Bitcoin Core<ref>[https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2#i-know-that-you-know IBLT design document], Gavin Andresen, 11 August 2014</ref> and almost equally as effective as O(1) block propagation for current block sizes.<br />
<br />
==== O(n<sup>2</sup>) network total validation resource requirements ====<br />
<br />
[[File:On2_scaling_illustrated.png|thumb|right|visualization of O(n<sup>2</sup>) scaling]]<br />
<br />
Each on-chain Bitcoin transaction needs to be processed by each full node. If we assume that a certain percentage of users run full nodes (''n'') and that each user creates a certain number of transactions on average (''n'' again), then the network’s total resource requirements are <code>n<sup>2</sup> = n * n</code>. In short, this means that the aggregate cost of keeping all transactions on-chain quadruples each time the number of users doubles.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009199.html Total system cost], Dr. Adam Back, 28 June 2015</ref> For example,<br />
<br />
* Imagine a network starts with 100 users and 2 total nodes (a 2% ratio).<br />
* The network doubles in users to 200. The number of nodes also doubles to 4 (maintaining a 2% ratio of decentralized low-trust security). However, double the number of users means double the number of transactions, and each node needs to process ''every'' transaction---so each node now does double work with its bandwidth and its CPU. With double the number of nodes and double the amount of work per node, total work increases by four times.<br />
* The network doubles again: 400 users, 8 nodes (still 2% of total), and 4 times the original workload per node for a total of 16 times as much aggregate work as the original.<br />
* Another doubling: 800 users, 16 nodes (still 2%), and 8 times the original workload per node for a total of 64 times aggregate work as the original.<br />
* Another doubling: 1,600 users—sixteen times the original---with 32 nodes (still 2%), and 16 times the original workload per node. The aggregate total work done by nodes is 256 times higher than it was originally.<br />
<br />
=== What’s the difference between on-chain and off-chain transactions? ===<br />
<br />
On-chain Bitcoin transactions are those that appear in the Bitcoin block chain. Off-chain transactions are those that transfer ownership of bitcoins without putting a transaction on the block chain.<br />
<br />
Common and proposed off-chain transactions include:<br />
<br />
* '''Exchange transactions:''' when you buy or sell bitcoins, the exchange tracks ownership in a database without putting data in the block chain. Only when you deposit or withdraw bitcoins does the transaction appear on the block chain.<br />
* '''Web wallet internal payments:''' many web wallets allow users of the service to pay other users of the same service using off-chain payments. For example, when one Coinbase user pays another Coinbase user.<br />
* '''Tipping services:''' most tipping services today, such as ChangeTip, use off-chain transactions for everything except deposits and withdrawals.<ref>[https://www.changetip.com/fees ChangeTip fees], retrieved 3 July 2015</ref><br />
* '''Payment channels:''' channels are started using one on-chain transaction and ended using a second on-chain transaction.<ref>[https://bitcoin.org/en/developer-guide#micropayment-channel Micropayment channels], Bitcoin.org Developer Guide</ref> In between can be an essentially unlimited number of off-chain transactions as small as a single satoshi (1/100,000,000th of a bitcoin). Payment channels include those that [https://bitcoinj.github.io/working-with-micropayments exist today] as well as proposed hub-and-spoke channels and the more advanced [http://lightning.network/ Lightning network].<br />
<br />
Approximately 90% to 99% of all bitcoin-denominated payments today are made off-chain.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008844.html Pure off-chain is a weak form of layer 2], Dr. Adam Back, 19 June 2015</ref><br />
<br />
=== What is a fee market? ===<br />
<br />
When you create a Bitcoin transaction, you have the option to pay a [[transaction fee]]. If your software is flexible, you can pay anything from zero fees (a free transaction) to 100% of the value of the transaction (spend-to-fees).<br />
<br />
Miners who have more transactions available to them than they have room in the blocks they choose to make, typically choose to maximize their revenue by including the transactions that pay the most fees per kilobyte of data.<ref name="fee_pri">[https://bitcointalk.org/index.php?topic=95837.0 Fee prioritization patch], Gavin Andresen, 26 July 2012</ref> This confirms higher-fee transactions before lower-fee transactions.<br />
<br />
If blocks become full on a regular basis, users who pay the minimum fee will have to wait a longer and longer time for their transactions to confirm. At this point, a fee market may arise where transactions that pay higher fees get confirmed significantly faster than transactions that pay low fees.<ref name="todd_coinwallet">[https://gist.github.com/petertodd/8e87c782bdf342ef18fb Comments on the CoinWallet.eu tx-flood stress-test], Peter Todd, 22 June 2015</ref><ref name="garzik_bip" /><br />
<br />
=== What is the most efficient way to scale Bitcoin? ===<br />
<br />
Remove its decentralization properties, specifically decentralized mining and decentralized full nodes. Mining wastes enormous amounts of electricity to provide a decentralized ledger and full nodes waste an enormous amount of bandwidth and CPU time keeping miners honest.<br />
<br />
If users instead decided to hand authority over to someone they trusted, mining and keeping miners honest wouldn’t be needed. This is how Visa, MasterCard, PayPal, and the rest of the centralized payment systems works—users trust them, and they have no special difficulty scaling to [[scalability|millions of transactions an hour]]. It’s very efficient; it isn’t decentralized.<br />
<br />
=== What is a hard fork, and how does it differ from other types of forks? ===<br />
<br />
The word fork is badly overloaded in Bitcoin development.<br />
<br />
* '''[[hardfork|Hard fork]]:''' a change to the system which is not backwards compatible. Everyone needs to upgrade or things can go wrong.<br />
* '''[[softfork|Soft fork]]:''' a change to the system which is backwards compatible as long as a majority of miners enforce it. Full nodes that don’t upgrade have their security reduced.<br />
* '''Chain fork:''' when there are two are more blocks at the same height on a block chain. This typically happens a few times a week by accident, but it can also indicate more severe problems.<br />
* '''[https://en.wikipedia.org/wiki/Fork_%28software_development%29 Software fork]:''' using the code from an open source project to create a different project.<br />
* '''[https://help.github.com/articles/fork-a-repo/ Git/GitHub fork]:''' a way for developers to write and test new features before contributing them to a project.<br />
<br />
(There are other types of software-related forks, but they don’t tend to cause as much confusion.)<br />
<br />
=== What are the block size soft limits? ===<br />
<br />
Bitcoin Core has historically come pre-configured to limit blocks it mines to certain sizes.<ref name="fee_pri" /> These “limits” aren’t restrictions placed on miners by other miners or nodes, but rather configuration options that help miners produce reasonably-sized blocks.<br />
<br />
Miners can change their soft limit size (up to 1 MB) using <code>-blockmaxsize=&lt;size&gt;</code><br />
<br />
Default soft limits at various times:<br />
<br />
* '''July 2012:''' <code>-blockmaxsize</code> option created and set to default 250 KB soft limit<ref>[https://github.com/bitcoin/bitcoin/commit/c555400ca134991e39d5e3a565fcd2215abe56f6 Bitcoin Core commit c555400], Gavin Andresen, 12 July 2012</ref><br />
* '''November 2013:''' Raised to 750KB<ref>[https://github.com/bitcoin/bitcoin/commit/ad898b40aaf06c1cc7ac12e953805720fc9217c0 Bitcoin Core commit ad898b40], Gavin Andresen, 27 November 2013</ref><br />
* '''June 2015:''' Raise to 1 MB suggested<ref>[https://github.com/bitcoin/bitcoin/pull/6231 Bitcoin Core pull #6231], Chris Wheeler, 4 June 2015</ref><br />
<br />
== General Block Size Increase Theory ==<br />
<br />
Questions about increasing the block size in general, not related to any<br />
specific proposal.<br />
<br />
==== Why are some people in favor of keeping the block size at 1 MB forever? ====<br />
<br />
It is commonly claimed<ref name="garzik_bip" /><ref>[https://epicenterbitcoin.com/podcast/082/ Epicenter Bitcoin podcast #82], Mike Hearn (interviewed), 8 June 2015</ref> that there are people opposed to ever raising the maximum block size limit, but no Bitcoin developers have suggested keeping the maximum block size at one megabyte forever.<ref name="maxwell_not_proposing" /><br />
<br />
All developers support raising the maximum size at some point<ref>[https://www.reddit.com/r/Bitcoin/comments/39kqzs/how_about_a_softfork_optin_blocksize_increase/cs5hj8l Nothing magic about 1MB], Dr. Adam Back, 13 June 2015</ref><ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008328.html Regarding size-independent new block propagation], Pieter Wuille, 28 May 2015</ref>—they just disagree about whether now is the correct time.<br />
<br />
==== Should miners be allowed to decide the block size? ====<br />
<br />
A block may include as little as a single transaction, so miners can always restrict block size. Letting miners choose the maximum block size is more problematic for several reasons:<br />
<br />
# '''Miners profit, others pay the cost:''' bigger blocks earn miners more fees, but miners don’t need to store those blocks for more than a few days.<ref>[https://github.com/bitcoin/bitcoin/pull/5863 Bitcoin Core pull #5863 adding pruning functionality], Suhas Daftuar et al., 6 March 2015</ref> Other users who want full validation security, or who provide services to lightweight wallets, pay the costs of downloading and storing those larger blocks.<br />
# '''Bigger miners can afford more bandwidth:''' each miner needs to download every transaction that will be included in block,<ref name="maxwell_correcting_assumptions" /> which means that they all need to pay for high-speed connections. However, a miner with 8.3% of total hash rate can take that cost out of the about 300 BTC they make a day, while a miner with only 0.7% of total hash rate has to take that cost out of only 25 BTC a day. This means bigger miners may logically choose to make bigger blocks even though it may further centralize mining.<br />
# '''Centralized hardware production:''' only a few companies in the world produce efficient mining equipment, and many of them have chosen to stop selling to the public.<ref>[http://blogs.wsj.com/venturecapital/2014/09/05/for-kncminer-time-to-forget-selling-bitcoin-machines-to-at-home-miners/ KnCMiner to stop selling to home miners], Wall Street Journal, Yuliya Chernova, 5 September 2014</ref> This prevents ordinary Bitcoin users from participating in the process even if they were willing to pay for mining equipment.<br />
# '''Voting by hash rate favors larger miners:''' voting based on hash rate allows the current hash rate majority (or super-majority) to enforce conditions on the minority. This is similar to a lobby of large businesses being able to get laws passed that may hurt smaller businesses.<ref>[https://www.reddit.com/r/Bitcoin/comments/39kzyt/draft_bip_100_soft_fork_block_size_increase/cs5gvak Miners choosing the block size limit is ill-advised], Meni Rosenfeld, 13 June 2015</ref><br />
# '''Miners may not care about users:''' this was demonstrated during the [[July 2015 Forks]] where even after miners lost over $50,000 USD in income from mining invalid chains, and even after they were told that long forks harm users, they continued to mine inproperly.<ref>[https://bitcointalk.org/index.php?topic=700411.msg11790734#msg11790734 Intention to continue SPV mining], Wang Chun, 4 July 2015</ref><br />
<br />
However, there are also possible justifications for letting miners choose the block size:<br />
<br />
# '''Authenticated participants:''' miners are active participants in Bitcoin, and they can prove it by adding data to the blocks they create.<ref>[https://bitcoin.org/en/developer-reference#term-coinbase-field Coinbase field], Bitcoin.org Developer Reference</ref> It is much harder to prove people on Reddit, BitcoinTalk, and elsewhere are real people with an active stake in Bitcoin.<br />
# '''Bigger blocks may cost miners:''' small miners and poorly-connected miners are at a disadvantage if larger blocks are produced<ref name="wuille_centralization" />, and even large and well-connected miners may find that large blocks reduce their profit percentage if the cost of bandwidth rises too high or their stale rate increases.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008355.html F2Pool block size concerns], Chun Wang, 29 May 2015</ref><br />
<br />
==== How could a block size increase affect user security? ====<br />
<br />
Bitcoin’s security is highly dependent on the number of active users who protect their bitcoins with a full node like Bitcoin Core. The more active users of full nodes, the harder it is for miners to trick users into accepting fake bitcoins or other frauds.<ref>[https://medium.com/@lopp/bitcoin-nodes-how-many-is-enough-9b8e8f6fd2cf Bitcoin nodes: how many is enough?], Jameson Lopp, 7 June 2015</ref><br />
<br />
Full nodes need to download and verify every block, and most nodes also store blocks plus relay transactions, full blocks, and filtered blocks to other users on the network. The bigger blocks become, the more difficult it becomes to do all this, so it is expected that bigger blocks will both reduce the number of users who currently run full nodes and suppress the number of users who decide to start running a full node later.<ref>[https://www.reddit.com/r/Bitcoin/comments/3bae2d/amir_taaki_on_raising_the_block_size_a_lot_of/cslcgmw Block size increases-only will create problems], Dr. Adam Back, 28 June 2015</ref><br />
<br />
In addition, full blocks may increase mining centralization<ref name="wuille_centralization" /> at a time when mining is already so centralized that it makes it easy to reverse transactions which have been confirmed multiple times.<ref>[http://bitcoin.stackexchange.com/questions/32562/when-to-worry-about-1-confirmation-payments/32564#32564 When to worry about one-confirmation payments], David A. Harding, 17 November 2014</ref><br />
<br />
==== How could larger blocks affect proof-of-work (POW) security? ====<br />
<br />
Proof of work security is dependent on how much money miners spend on mining equipment. However, to effectively mine blocks, miners also need to spend money on bandwidth to receive new transactions and blocks created by other miners; CPUs to validate received transactions and blocks; and bandwidth to upload new blocks. These additional costs don’t directly contribute to POW security.<ref name="maxwell_correcting_assumptions">[https://www.reddit.com/r/Bitcoin/comments/39tgno/letting_miners_vote_on_the_maximum_block_size_is/cs6rek5 Correcting wrong assumptions about mining], Gregory Maxwell, 15 June 2015</ref><br />
<br />
As block sizes increase, the amount of bandwidth and CPU required also increases. If block sizes increase faster than the costs of bandwidth and CPU decrease, miners will have less money for POW security relative to the gross income they earn.<br />
<br />
In addition, larger blocks have a higher risk of becoming stale (orphaned)<ref name="rusty_dsl" />, which directly correlates to lost POW security. For example, if the network average stale rate is 10%, then 10% of POW performed isn't protecting transactions on the block chain.<br />
<br />
=== What happens if blocks aren't big enough to include all pending transactions? ===<br />
<br />
This is already the case more often than not<ref>[http://statoshi.info/dashboard/db/transactions?from=1433297061121&to=1435889061123 Statoshi.info mempool queue June to July 2015]</ref>, so we know that miners will simply queue transactions. The transactions eligible for block inclusion that pay the highest fee per kilobyte will be confirmed earlier than transactions that pay comparatively lower fees.<ref name="fee_pri" /><br />
<br />
What happens from there is debated:<br />
<br />
* BitcoinJ lead developer Mike Hearn believes there would be “crashing nodes, a swelling transaction backlog, a sudden spike in double spending, [and] skyrocketing fees.”<ref>[https://medium.com/@octskyward/crash-landing-f5cc19908e32 Crash Landing], Mike Hearn, 7 May 2015</ref><br />
* Bitcoin Foundation chief scientist Gavin Andresen believes that the “average transaction fee paid will rise, people or applications unwilling or unable to pay the rising fees will stop submitting transactions, [and] people and businesses will shelve plans to use Bitcoin, stunting growth and adoption.” <ref>[https://github.com/bitcoin/bitcoin/pull/6341 Bitcoin Core pull #6341], Gavin Andresen, 26 June 2015</ref><br />
* Bitcoin Core developer Pieter Wuille replies to Andresen’s comment above: “Is it fair to summarize this as ‘Some use cases won’t fit any more, people will decide to no longer use the blockchain for these purposes, and the fees will adapt.’? I think that is already happening […] I don’t think we should be afraid of this change or try to stop it.” <ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009098.html The need for larger blocks], Pieter Wuille, 26 June 2015</ref><br />
* Bitcoin Core developer Jeff Garzik writes, "as blocks get full and the bidding war ensues, the bitcoin user experience rapidly degrades to poor. In part due to bitcoin wallet software’s relative immaturity, and in part due to bitcoin’s settlement based design, the end user experience of their transaction competing for block size results in erratic, and unpredictably extended validation times."<ref name="garzik_bip" /><br />
<br />
== Specific Scaling Proposals ==<br />
<br />
=== Andresen-Hearn Block Size Increase Proposals ===<br />
<br />
Questions about the series of related proposals by Gavin Andresen and Mike Hearn to use a hard fork to raise the maximum block size, thereby allowing miners to include more on-chain transactions. As of July 2015, the current focus is [https://github.com/bitcoin/bips/pull/163 BIP101].<br />
<br />
==== What is the major advantage of this proposal? ====<br />
<br />
''Bitcoin can support many more users.'' Assuming earliest possible adoption, 250 bytes per on-chain transaction, 144 blocks per day, and 2 transaction a day per user, Bitcoin can support about,<br />
<br />
* 288,000 users in 2015<br />
* 2,304,000 users in 2016 (800% increase)<br />
* 4,608,000 in 2018 (1,600%)<br />
* 9,216,000 in 2020 (3,200%)<br />
* 18,432,000 in 2022 (6,400%)<br />
* 36,864,000 in 2024 (12,800%)<br />
* 73,728,000 in 2026 (25,600%)<br />
* 147,456,000 in 2028 (51,200%)<br />
* 294,912,000 in 2030 (102,400%)<br />
* 589,824,000 in 2032 (204,800%)<br />
* 1,179,648,000 in 2034 (409,600%<br />
* 2,359,296,000 in 2036 (819,200%)<br />
<br />
==== What is the major disadvantage of this proposal? ====<br />
<br />
''The total cost of remaining decentralized will be high.'' Assuming earliest possible adoption and that the ratio of total users to full node operators remains the same as today, the total estimated amount of work necessary to maintain the decentralized system under the [[#O.28n2.29_network_total_validation_resource_requirements|O(<sup>2</sup>) scaling model]] will be,<br />
<br />
* 100% of today’s work in 2015<br />
* 6,400% in 2016<br />
* 25,600% in 2018<br />
* 102,400% in 2020<br />
* 409,600% in 2022<br />
* 1,638,400% in 2024<br />
* 6,553,600% in 2026<br />
* 26,214,400% in 2028<br />
* 104,857,600% in 2030<br />
* 419,430,400% in 2032<br />
* 1,677,721,600% in 2034<br />
* 6,710,886,400% in 2036<br />
<br />
For example, if the total amount spent on running full nodes today (not counting mining) is $100 thousand per year, the estimated cost for the same level of decentralization in 2036 will be $6.7 trillion per year if validation costs stay the same. (They'll certainly go down, but algorithmic and hardware improvements probably won't eliminate an approximate 6,710,886,400% cost increase.)<br />
<br />
==== What are the dangers of the proposed hard fork? ====<br />
<br />
Under the current proposal, 75% of miners must indicate that they agree to accept blocks up to 8 MB in size.<ref name="bip101">[https://github.com/bitcoin/bips/pull/163 BIP101], Gavin Andresen, 24 June 2016</ref> After the change goes into effect, if any miner creates a block larger than 1 MB, all nodes which have not upgraded yet will reject the block.<ref>[https://bitcoin.org/en/developer-guide#consensus-rule-changes Consensus rule changes], Bitcoin.org Developer Guide</ref><br />
<br />
If all full nodes have upgraded, or very close to all nodes, there should be no practical effect. If a significant number of full nodes have not upgraded, they will continue using a different block chain than the upgraded users, with the following consequences:<br />
<br />
* Bitcoins received from before the fork can be spent twice, once on both sides of the fork. This creates a high double spend risk.<br />
* Bitcoins received after the fork are only guaranteed to be spendable on the side of the fork they were received on. This means some users will have to lose money to restore Bitcoin to a single chain.<br />
<br />
Users of hosted wallets (Coinbase, BlockChain.info, etc.) will use whatever block chain their host chooses. Users of lightweight P2P SPV wallets will use the [[Thin Client Security|longest chain they know of]], which may not be the actual longest chain if they only connect to nodes on the shorter chain. Users of non-P2P SPV wallets, like Electrum, will use whatever chain is used by the server they connect to.<br />
<br />
If a bad hard fork like this happens, it will likely cause large-scale confusion and make Bitcoin very hard to use until the situation is resolved.<br />
<br />
==== What is the deployment schedule for BIP 101? ====<br />
<br />
* The patch needs to be accepted into Bitcoin Core, Bitcoin XT, or both.<br />
* If accepted into Bitcoin Core, miners using that software will need to upgrade (this probably requires a new released version of Bitcoin Core). If accepted only into Bitcoin XT, miners will need to switch to using XT.<br />
* After 75% of miners have upgraded, 8MB blocks will become allowed at the the latest of (1) 11 January 2016 or (2) two weeks after the 75% upgrade threshold.<ref name="bip101" /><br />
* After the effective date has passed, any miner may create a block larger than 8MB. When a miner does this, upgraded full nodes will accept that block and non-upgraded full nodes will reject it, forking the network.<ref name="bip101" /> See [[#What_are_the_dangers_of_the_proposed_hard_fork.3F|hard fork dangers]] for what his might mean.<br />
<br />
==== Will miners go straight from 1 MB blocks to 8 MB blocks? ====<br />
<br />
That would be highly unlikely. Uploading an 8 MB block currently takes significantly more time than uploading a 1 MB block<ref name="rusty_dsl">[http://rusty.ozlabs.org/?p=509 Mining on a home DSL connection test results], Rusty Russell, 19 June 2015</ref>, even with the roughly 25x reduction in size available from use of Matt Corallo’s block relay network.<ref name="block_relay_net" /><br />
<br />
The longer it takes to upload a block, the higher the risk it will become a stale block—meaning the miner who created it will not receive the block subsidy or transaction fees (currently about 25 BTC per block).<br />
<br />
However, if technology like Invertible Bloom Lookup Tables (IBLTs) is deployed and found to work as expected<ref name="iblt">[https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2 O(1) block propagation], Gavin Andresen, 8 August 2014</ref>, or if mining [[#What_is_the_most_efficient_way_to_scale_Bitcoin.3F|centralizes further]], adding additional transactions may not have a significant enough cost to discourage miners from creating full blocks. In that case, blocks will be filled as soon as there are enough people wanting to make transactions paying the default relay fee<ref>[https://github.com/bitcoin/bitcoin/pull/3305 Bitcoin Core pull #3305 dropping default fees], Mike Hearn, 22 November 2013</ref> of 0.00001000 BTC/kilobyte.<br />
<br />
==== What tests have been performed related to this proposal? ====<br />
<br />
* '''20MB block processing''' (Gavin Andresen) “if we increased the maximum block size to 20 megabytes tomorrow, and every single miner decided to start creating 20MB blocks and there was a sudden increase in the number of transactions on the network to fill up those blocks… the 0.10.0 version of [Bitcoin Core] would run just fine.”<ref>[http://gavintech.blogspot.com/2015/01/twenty-megabytes-testing-results.html Twenty megabyte block testing], Gavin Andresen, 20 January 2015</ref> (ellipses in original)<br />
* '''Mining &amp; relay simulation''' (Gavin Andresen) “if blocks take 20 seconds to propagate, a network with a miner that has 30% of the hashing power will get 30.3% of the blocks.”<ref>[http://gavinandresen.ninja/are-bigger-blocks-better-for-bigger-miners Are bigger blocks better for bigger miners?], Gavin Andresen, 22 May 2015</ref><br />
* '''Mining on a home DSL connection''' (Rusty Russell) “Using the rough formula of 1-exp(-t/600), I would expect orphan rates of 10.5% generating 1MB blocks, and 56.6% with 8MB blocks; that’s a huge cut in expected profits.”<ref name="rusty_dsl" /><br />
* '''Mining centralization pressure''' (Pieter Wuille) “[This] does very clearly show the effects of larger blocks on centralization pressure of the system.”<ref name="wuille_centralization">[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008581.html Mining centralization pressure from non-uniform propagation speed], Pieter Wuille, 12 June 2015</ref><br />
<br />
<br />
=== Garzik Miner Block Size Voting Proposal (AKA BIP100) ===<br />
<br />
''Note, BIP 100 is the marketing name for this proposal. No BIP number<br />
has yet been publicly requested, and the number assigned is unlikely to<br />
be 100.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2014-May/005756.html<br />
Prenumbered BIP naming], Gregory Maxwell, 12 May 2014</ref>''<br />
<br />
Questions related to Jeff Garzik's proposal<ref name="garzik_bip">[http://gtf.org/garzik/bitcoin/BIP100-blocksizechangeproposal.pdf Draft BIP: decentralized economic policy], Jeff Garzik, 12 June 2015 (revised 15 June 2015)</ref> to allow miners to vote on raising and lowering the maximum block size.<br />
<br />
==== What does this proposal do? ====<br />
<br />
# It creates a one-time hard fork that does not automatically change the maximum block size.<br />
<br />
# It allows miners to vote to increase or decrease the maximum block size within the range of 1MB to 32MB. These changes are neither hard forks nor soft forks, but simply rules that all nodes should know about after the initial hard fork.<br />
<br />
==== Does it reduce the risk of a hard fork? ====<br />
<br />
Hard forks are most dangerous when they're done without strong<br />
consensus.<ref name="garzik_bip" /><ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008779.html Consensus changes are not about making a change to the software],<br />
Pieter Wuille, 18 June 2015</ref><br />
<br />
If Garzik's proposal gains strong consensus, it will as safe as possible<br />
for a hard fork and it will allow increasing the block size up to 32 MB<br />
without any additional risk of a fork.<br />
<br />
==== Why is it limited to 32 megabytes? ====<br />
<br />
According to the draft BIP, "the 32 MB hard fork is largely coincidental -- a whole network upgrade at 32 MB was likely needed anyway."<br />
<br />
=== Lightning Network ===<br />
<br />
Questions related to using the proposed [http://lightning.network/ Lightning network] as a way to scale the number of users Bitcoin can support.<br />
<br />
==== How does transaction security differ from that of Bitcoin? ====<br />
<br />
Transactions on the proposed Lightning network use Bitcoin transactions exclusively to transfer bitcoins<ref name="russell_lightning1">[http://rusty.ozlabs.org/?p=450 Lightning Networks: Part I], Rusty Russell, 30 March 2015</ref>, and so the same security as regular Bitcoin transactions is provided when both a Lightning hub and client are cooperating.<br />
<br />
When a Lightning hub or client refuses to cooperate with the other (maybe because they accidentally went offline), the other party can still receive their full 100% bitcoin balance by closing the payment channel—but they must first wait for a defined amount of time mutually chosen by both the hub and client.<ref>[http://rusty.ozlabs.org/?p=462 Lightning Networks: Part II], Rusty Russell, 1 April 2015</ref><br />
<br />
If one party waits too long to close the payment channel, the other party may be able to steal bitcoins. However, it is possible to delegate the task of closing the channel in an emergency to an unlimited number of hubs around the Internet, so closing the channel on time should be easy.<ref name="russell_lightning4">[http://rusty.ozlabs.org/?p=477 Lightning Networks: Part IV], Rusty Russell, 8 April 2015</ref><br />
<br />
In summary, provided that payment channels are closed on time, the worst that can happen to users is that they may have to wait a few weeks for a channel to fully close before spending the bitcoins they received from it. Their security is otherwise the same as with regular Bitcoin.<br />
<br />
For Lightning hubs, security is slightly worse in the sense that they need to keep a potentially-large amount of funds in a hot wallet<ref name="lightning_paper">[http://lightning.network/lightning-network-paper-DRAFT-0.5.pdf Lightning Network (Draft 0.5)], Section 6.3: Coin Theft via Hacking, Joseph Poon and Thaddeus Dryja</ref>, so they can’t take advantage of the anti-hacking protection offered by cold wallets. Otherwise, Lightning hubs have the same security as clients.<br />
<br />
==== When will Lightning be ready for use? ====<br />
<br />
Lightning requires a basic test implementation (work underway<ref>[https://lists.blockstream.com/pipermail/lightning-dev/2015-June/000018.html Lightning first steps], Rusty Russell, 13 June 2015</ref>), several soft-fork changes to the Bitcoin protocol (work underway<ref>[https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki BIP65: CheckLockTimeVerify], Peter Todd, 1 October 2014</ref><ref>[https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki BIP68: Consensus-enforced transaction replacement], Mark Friedenbach, 28 May 2015</ref>, and wallets need to be updated to support the Lightning network protocol.<ref name="russell_lightning4" /><br />
<br />
Dr. Adam Back has said, "I expect we can get something running inside a year."<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/009242.html Reply to Andresen regarding Lightning], Dr. Adam Back, 28 June 2015</ref><br />
<br />
==== Doesn’t Lightning require bigger blocks anyway? ====<br />
<br />
Lightning is block-size neutral. It requires one on-chain transaction to open a channel between a hub and a client, and one on-chain transaction to close a channel.<ref name="russell_lightning1" /> In between it can support an unlimited number of transactions between anyone on the Lightning network.<ref name="lightning_paper" /><br />
<br />
Using the numbers from the Lightning presentation<ref name="lightning_slides">[http://lightning.network/lightning-network.pdf Lightning presentation], Joseph Poon, 23 February 2015</ref>, if people open and close a plausible two channels a year, Lightning can support about 52 million users with the current one-megabyte limit—and each user can make an unlimited number of transactions. Currently, assuming people make an average of only two Bitcoin transactions a day, basic Bitcoin can support only 288,000 users.<br />
<br />
Under these assumptions, Lightning is 180 times (17,900%) more efficient than basic Bitcoin.<br />
<br />
Presumably, if around 30 million people are using Bitcoin via Lightning so that capacity is called into question, it will not be difficult to find consensus to double the block size to two megabytes and bring user capacity up to 105 million. The same goes for later increases to 200 million (4MB), 400 million (8MB), 800 million (16MB), 1.6 billion (32 MB), 3.2 billion (64MB), and all 7 billion living humans (133MB). In each case, all Lightning network participants get unlimited transactions to the other participants.<br />
<br />
For basic Bitcoin to scale to just 2 transactions a day for 7 billion people would require 24-gigabyte blocks.<ref name="lightning_slides" /><br />
<br />
=== Sidechains ===<br />
<br />
==== Real quick, what are sidechains? ====<br />
<br />
Block chains that are separate from Bitcoin’s block chain, but which allow you to receive and spend bitcoins using a two-way peg (2WP).<ref name="sidechains_paper">[https://www.blockstream.com/sidechains.pdf Sidechains paper], Adam Back et al., 22 October 2014</ref> (Although a sidechain can never be more secure than the Bitcoin block chain.<ref>[https://www.reddit.com/r/Bitcoin/comments/39r85g/sidechain_hate/cs5spbg Security limitations of pegged chains], Gregory Maxwell, 14 June 2015</ref>)<br />
<br />
==== Are sidechains a scaling option? ====<br />
<br />
No. Sidechains have the same fundamental scaling problems as Bitcoin does. Moving some transactions to sidechains simply moves some problems elsewhere on the network—the total difficulty of the problem remains the same.<ref>[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008617.html Sidechains not a direct means for solving any of the scaling problems Bitcoin has], Pieter Wuille, 13 June 2015</ref><br />
<br />
==== But couldn’t I create a sidechain that had 100 GB blocks? ====<br />
<br />
Certainly, sidechain code is open source<ref>[https://github.com/ElementsProject/elements Elements Project]</ref>—so you can create your own sidechain. But you’d still have the difficulty of finding people who are willing to validate 100 GB blocks with their own full nodes.<br />
<br />
==== Do sidechains require a hard fork? ====<br />
<br />
No. Federated sidechains, such as have already been implemented<ref>[https://github.com/ElementsProject/elements/tree/alpha Elements Alpha]</ref>, don’t require any changes to the Bitcoin consensus rules. Merged-mined sidechains, which have not been implemented yet, do require a backwards-compatible soft fork in order to transfer funds between Bitcoin and the sidechain.<ref name="sidechains_paper" /><br />
<br />
== References ==<br />
<references /></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Talk:Tonal_Bitcoin&diff=54769Talk:Tonal Bitcoin2015-03-01T08:08:33Z<p>Dooglus: Good luck getting rid of the silly Tonal stuff. I've tried and it just gets added straight back in.</p>
<hr />
<div>This is for discussion, '''not trolling'''. Note that this is not an encyclopedia, and does not have any "notability" requirements. If you don't want to use Tonal, don't. Trolling is not acceptable and will be deleted. Reasoned criticism is welcome in the "Criticism" section of the page.<br />
<br />
<br />
I have no legitimate stake in the matter, I made a few edits that I hope remove POV and still embrace the idea of Tonal Bitcoin. This is Raize, I am sorry I am not familiar enough with wiki editing to provide my signature. --[[User:Raize|Raize]]<br />
<br />
<br />
==Proposal for deletion==<br />
<br />
I propose to delete this article on the following grounds.<br />
<br />
# "Tonal bitcoin" ''is'' Bitcoin. Tonal Bitcoin only refers to the choice of the bitcoin user to employ a different representation of standard bitcoin balances. Instead of using decimal, the originator proposes using tonal units. If we follow this approach to the extreme, we could also use any base X system. It comes down to this: If you have a bitcoin balance of X in decimal notation, you can convert this to a balance Y in tonal units.<br />
# There is almost no information about tonal bitcoin available on the web attesting to its insignificance. All information that is available seems to come from a single source. To make matters worse, the information that is available is extremely confusing and poorly written.<br />
# No one, with the possible exception of one person, use "tonal bitcoin" units.<br />
# Not one exchange or business uses Tonal bitcoin units (to my knowledge).<br />
<br />
[[User:Lunokhod|Lunokhod]] ([[User talk:Lunokhod|talk]]) 14:59, 21 August 2014 (UTC)<br />
<br />
: '''1)''' Exactly why it is on-topic to the wiki, and should ''not'' be deleted; '''2)''' This wiki is just as relevant to the web as any random altcoin website, and this wiki explicitly permits and encourages original content and original research, unlike Wikipedia which is merely an encyclopedia; '''3)''' I know multiple people who use TBC (though I won't do so publicly so they can be trolled) - and in any case, significance and/or notability is not a concern of this wiki (see [[:Bitcoin:About|the wiki about/policy page]]); '''4)''' Again, irrelevant. --[[User:Luke-jr|Luke-jr]] ([[User talk:Luke-jr|talk]]) 16:10, 24 August 2014 (UTC)<br />
<br />
:: I agree that this should not be deleted. This is not Wikipedia, we don't have a notability policy, and explicitly allow technical or niche material relating to bitcoin. [[User:Nanotube|Nanotube]] ([[User talk:Nanotube|talk]]) 16:31, 24 August 2014 (UTC)<br />
<br />
I think this article should be deleted as this wiki is for Bitcoin, not altcoins. The creator of Tonal Bitcoins calls it "First (and best) altcoin ever: Tonal Bitcoin (TBC)" - https://bitcointalk.org/index.php?topic=218388.0 , and seeing as this wiki has no article on [[Litecoin]] or [[Dogecoin]], this website should go as well. Nobody cares about this, and it's just useless clutter on pages like this or [[Units]].<br />
<br />
[[User:ThePiachu|ThePiachu]] ([[User talk:ThePiachu|talk]]) 01:49, 1 March 2015 (UTC)<br />
<br />
:This just seems petty and vindictive to me, and also needlessly drama inducing. This wiki exists to cover Bitcoin things, it's fine if it covers niche and obscure aspects of the Bitcoin ecosystem. That this wiki isn't free hosting and advertisement for your choice of competing currencies is no reason to justify deleting things on the wiki. --[[User:Gmaxwell|Gmaxwell]] ([[User talk:Gmaxwell|talk]]) 06:26, 1 March 2015 (UTC)<br />
<br />
::A fair point. That being said, due to the nonexistent userbase of the Tonal Bitcoins, I would keep them away from non-relevant pages of the wiki, such as the mentioned [[Units]]. [[User:ThePiachu|ThePiachu]] ([[User talk:ThePiachu|talk]]) 07:31, 1 March 2015 (UTC)<br />
<br />
:::I use base 27 for all my bitcoin balances and have made up names for all the numbers and powers of 27. They're named after my cats. Can I add them to the [[Units]] page? [[User:Dooglus|Dooglus]] ([[User talk:Dooglus|talk]]) 08:08, 1 March 2015 (UTC)</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Talk:Tonal_Bitcoin&diff=54768Talk:Tonal Bitcoin2015-03-01T08:01:33Z<p>Dooglus: Good luck getting rid of the silly Tonal stuff. I've tried and it just gets added straight back in.</p>
<hr />
<div>This is for discussion, '''not trolling'''. Note that this is not an encyclopedia, and does not have any "notability" requirements. If you don't want to use Tonal, don't. Trolling is not acceptable and will be deleted. Reasoned criticism is welcome in the "Criticism" section of the page.<br />
<br />
<br />
I have no legitimate stake in the matter, I made a few edits that I hope remove POV and still embrace the idea of Tonal Bitcoin. This is Raize, I am sorry I am not familiar enough with wiki editing to provide my signature. --[[User:Raize|Raize]]<br />
<br />
<br />
==Proposal for deletion==<br />
<br />
I propose to delete this article on the following grounds.<br />
<br />
# "Tonal bitcoin" ''is'' Bitcoin. Tonal Bitcoin only refers to the choice of the bitcoin user to employ a different representation of standard bitcoin balances. Instead of using decimal, the originator proposes using tonal units. If we follow this approach to the extreme, we could also use any base X system. It comes down to this: If you have a bitcoin balance of X in decimal notation, you can convert this to a balance Y in tonal units.<br />
# There is almost no information about tonal bitcoin available on the web attesting to its insignificance. All information that is available seems to come from a single source. To make matters worse, the information that is available is extremely confusing and poorly written.<br />
# No one, with the possible exception of one person, use "tonal bitcoin" units.<br />
# Not one exchange or business uses Tonal bitcoin units (to my knowledge).<br />
<br />
[[User:Lunokhod|Lunokhod]] ([[User talk:Lunokhod|talk]]) 14:59, 21 August 2014 (UTC)<br />
<br />
: '''1)''' Exactly why it is on-topic to the wiki, and should ''not'' be deleted; '''2)''' This wiki is just as relevant to the web as any random altcoin website, and this wiki explicitly permits and encourages original content and original research, unlike Wikipedia which is merely an encyclopedia; '''3)''' I know multiple people who use TBC (though I won't do so publicly so they can be trolled) - and in any case, significance and/or notability is not a concern of this wiki (see [[:Bitcoin:About|the wiki about/policy page]]); '''4)''' Again, irrelevant. --[[User:Luke-jr|Luke-jr]] ([[User talk:Luke-jr|talk]]) 16:10, 24 August 2014 (UTC)<br />
<br />
:: I agree that this should not be deleted. This is not Wikipedia, we don't have a notability policy, and explicitly allow technical or niche material relating to bitcoin. [[User:Nanotube|Nanotube]] ([[User talk:Nanotube|talk]]) 16:31, 24 August 2014 (UTC)<br />
<br />
I think this article should be deleted as this wiki is for Bitcoin, not altcoins. The creator of Tonal Bitcoins calls it "First (and best) altcoin ever: Tonal Bitcoin (TBC)" - https://bitcointalk.org/index.php?topic=218388.0 , and seeing as this wiki has no article on [[Litecoin]] or [[Dogecoin]], this website should go as well. Nobody cares about this, and it's just useless clutter on pages like this or [[Units]].<br />
<br />
[[User:ThePiachu|ThePiachu]] ([[User talk:ThePiachu|talk]]) 01:49, 1 March 2015 (UTC)<br />
<br />
:This just seems petty and vindictive to me, and also needlessly drama inducing. This wiki exists to cover Bitcoin things, it's fine if it covers niche and obscure aspects of the Bitcoin ecosystem. That this wiki isn't free hosting and advertisement for your choice of competing currencies is no reason to justify deleting things on the wiki. --[[User:Gmaxwell|Gmaxwell]] ([[User talk:Gmaxwell|talk]]) 06:26, 1 March 2015 (UTC)<br />
<br />
::A fair point. That being said, due to the nonexistent userbase of the Tonal Bitcoins, I would keep them away from non-relevant pages of the wiki, such as the mentioned [[Units]]. [[User:ThePiachu|ThePiachu]] ([[User talk:ThePiachu|talk]]) 07:31, 1 March 2015 (UTC)<br />
<br />
:::I use base 27 for all my bitcoin balances and have made up names for all the numbers and powers of 27. They're named after my cats. Can I add them to the [[Units]] page? [[User:Dooglus|Dooglus]] ([[User talk:Dooglus|talk]]) 08:01, 1 March 2015 (UTC)</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Talk:Inputs.io&diff=42260Talk:Inputs.io2013-11-10T07:36:55Z<p>Dooglus: Created page with "> inputs service was hacked or owner scammed On November 7th, 2013 Apparently the hack happened a couple of weeks before the site was shut down. > Currently, Inputs.io is su..."</p>
<hr />
<div>> inputs service was hacked or owner scammed On November 7th, 2013<br />
<br />
Apparently the hack happened a couple of weeks before the site was shut down.<br />
<br />
> Currently, Inputs.io is supported by the following sites:<br />
> <br />
> * Just-dice.com<br />
<br />
Just-Dice stopped accepting inputs.io deposits before the site was shut down, when 42 BTC was stolen from the Just-Dice inputs account and TradeFortress requested the return of the deposit Just-Dice was holding as collateral.</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=User_talk:Dooglus&diff=35674User talk:Dooglus2013-02-21T04:22:28Z<p>Dooglus: </p>
<hr />
<div>Location: Kamloops, BC, Canada<br />
<br />
E-Mail: dooglus@gmail.com<br />
<br />
Instant Messaging: dooglus@gmail.com on both Jabber and MSN<br />
<br />
Contributors Award participant: 16Pb8nKA64tHiYrox8rS4Mi8vEpJk4dp3X</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Units&diff=35673Units2013-02-21T04:17:10Z<p>Dooglus: Remove hyphens and mixed case. We don't wrote Kilo-Gram, we write kilogram. Left tonal stuff alone because I don't know anything about it.</p>
<hr />
<div>{| border="1" style="text-align:right;font-family:Console, Luxi Mono, fixed"<br />
|- style="background-color:silver"<br />
! Abbreviation<br />
! Pronunciation<br />
! style="background-color: #7fdfdf" | Decimal (BTC)<br />
! style="background-color: #7fdf7f" | [[Tonal Bitcoin|Tonal (TBC)]]<br />
! Tonal, as Hexadecimal<br />
|-<br />
|colspan="2"| Maximum Bitcoins ever<ref>[http://www.wolframalpha.com/input/?i=%28sum%28210000*floor%285000000000%2F2^i%29%29%2C+i%3D0+to+32%29%2F10000000 Wolfram|Alpha]</ref><br />
| 20,999,999.9769&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 7,750,54.00&nbsp;<br />
| 7,75f0,59e4.009&nbsp;<br />
|- style="background-color:lime"<br />
| <br />
| Tam-Bitcoin<br />
| 2,814,749.76710656<br />
| 1,0000,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1,0000,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| MBTC<br />
| megabitcoin<br />
| 1,000,000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 593,1079.4&nbsp;&nbsp;&nbsp;<br />
| 5af3,107a.4&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| kBTC<br />
| kilobitcoin<br />
| 1,000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 17,4876.8&nbsp;&nbsp;<br />
| 17,4876.e8&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| hBTC<br />
| hectobitcoin<br />
| 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 2,540.4&nbsp;&nbsp;<br />
| 2,540b.e4&nbsp;&nbsp;<br />
|-<br />
|colspan="2"| Initial block reward<br />
| 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1,2905.2&nbsp;&nbsp;<br />
| 1,2a05.f2&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| ᵇTBC<br />
| Bong-Bitcoin<br />
| 42.94967296<br />
| 1,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| daBTC<br />
| decabitcoin<br />
| 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 39.9&nbsp;&nbsp;<br />
| 3b9a.ca&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| ᵐTBC<br />
| Mill-Bitcoin<br />
| 2.68435456<br />
| 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| BTC<br />
| *bitcoin<br />
| 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 55.1&nbsp;&nbsp;<br />
| 5f5.e1&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| ˢTBC<br />
| San-Bitcoin<br />
| 0.16777216<br />
| 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| dBTC<br />
| decibitcoin<br />
| 0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 8.68&nbsp;<br />
| 98.968&nbsp;<br />
|- style="background-color:lime"<br />
| ᵗTBC<br />
| Ton-Bitcoin<br />
| 0.01048576<br />
| 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| cBTC<br />
| centibitcoin<br />
| 0.01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| .424&nbsp;<br />
| f.424&nbsp;<br />
|- style="background-color:cyan"<br />
| mBTC<br />
| millibitcoin<br />
| 0.001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1.869&nbsp;<br />
| 1.86a&nbsp;<br />
|- style="background-color:lime"<br />
| TBC<br />
| *Bitcoin<br />
| 0.00065536<br />
| 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| TBCᵗ<br />
| Bitcoin-ton<br />
| 0.00004096<br />
| 0.1&nbsp;&nbsp;&nbsp;<br />
| 0.1&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| TBCˢ<br />
| Bitcoin-san<br />
| 0.00000256<br />
| 0.01&nbsp;&nbsp;<br />
| 0.01&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| μBTC<br />
| microbitcoin<br />
| 0.000001&nbsp;&nbsp;<br />
| 0.0064<br />
| 0.0064<br />
|- style="background-color:lime"<br />
| TBCᵐ<br />
| Bitcoin-mill<br />
| 0.00000016<br />
| 0.001&nbsp;<br />
| 0.001&nbsp;<br />
|- style="background-color:lime"<br />
| TBCᵇ<br />
| Bitcoin-bong<br />
| 0.00000001<br />
| 0.0001<br />
| 0.0001<br />
|-<br />
| <br />
| "Satoshi"<br />
| 0.00000001<br />
| 0.0001<br />
| 0.0001<br />
|}<br />
<small>* Tonal Bitcoin and Decimal Bitcoin can be differentiated by the pronunciation of the numbers. "One bitcoin", "two bitcoin", etc is decimal, but "an bitcoin", "de bitcoin" is tonal.</small><br />
<br />
==See Also==<br />
<br />
* [[MilliBit]]<br />
<br />
==References==<br />
<references /></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Units&diff=35657Units2013-02-20T21:42:55Z<p>Dooglus: the 'c' in bitcoin is meant to be lowercase</p>
<hr />
<div>{| border="1" style="text-align:right;font-family:Console, Luxi Mono, fixed"<br />
|- style="background-color:silver"<br />
! Abbreviation<br />
! Pronunciation<br />
! style="background-color: #7fdfdf" | Decimal (BTC)<br />
! style="background-color: #7fdf7f" | [[Tonal Bitcoin|Tonal (TBC)]]<br />
! Tonal, as Hexadecimal<br />
|-<br />
|colspan="2"| Maximum Bitcoins ever<ref>[http://www.wolframalpha.com/input/?i=%28sum%28210000*floor%285000000000%2F2^i%29%29%2C+i%3D0+to+32%29%2F10000000 Wolfram|Alpha]</ref><br />
| 20,999,999.9769&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 7,750,54.00&nbsp;<br />
| 7,75f0,59e4.009&nbsp;<br />
|- style="background-color:lime"<br />
| <br />
| Tam-Bitcoin<br />
| 2,814,749.76710656<br />
| 1,0000,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1,0000,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| MBTC<br />
| Mega-Bitcoin<br />
| 1,000,000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 593,1079.4&nbsp;&nbsp;&nbsp;<br />
| 5af3,107a.4&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| kBTC<br />
| Kilo-Bitcoin<br />
| 1,000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 17,4876.8&nbsp;&nbsp;<br />
| 17,4876.e8&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| hBTC<br />
| Hecto-Bitcoin<br />
| 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 2,540.4&nbsp;&nbsp;<br />
| 2,540b.e4&nbsp;&nbsp;<br />
|-<br />
|colspan="2"| Initial block reward<br />
| 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1,2905.2&nbsp;&nbsp;<br />
| 1,2a05.f2&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| ᵇTBC<br />
| Bong-Bitcoin<br />
| 42.94967296<br />
| 1,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1,0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| daBTC<br />
| Deca-Bitcoin<br />
| 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 39.9&nbsp;&nbsp;<br />
| 3b9a.ca&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| ᵐTBC<br />
| Mill-Bitcoin<br />
| 2.68435456<br />
| 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| BTC<br />
| *Bitcoin<br />
| 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 55.1&nbsp;&nbsp;<br />
| 5f5.e1&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| ˢTBC<br />
| San-Bitcoin<br />
| 0.16777216<br />
| 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| dBTC<br />
| Deci-Bitcoin<br />
| 0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 8.68&nbsp;<br />
| 98.968&nbsp;<br />
|- style="background-color:lime"<br />
| ᵗTBC<br />
| Ton-Bitcoin<br />
| 0.01048576<br />
| 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| cBTC<br />
| Centi-Bitcoin<br />
| 0.01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| .424&nbsp;<br />
| f.424&nbsp;<br />
|- style="background-color:cyan"<br />
| mBTC<br />
| Milli-Bitcoin<br />
| 0.001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1.869&nbsp;<br />
| 1.86a&nbsp;<br />
|- style="background-color:lime"<br />
| TBC<br />
| *Bitcoin<br />
| 0.00065536<br />
| 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
| 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| TBCᵗ<br />
| Bitcoin-ton<br />
| 0.00004096<br />
| 0.1&nbsp;&nbsp;&nbsp;<br />
| 0.1&nbsp;&nbsp;&nbsp;<br />
|- style="background-color:lime"<br />
| TBCˢ<br />
| Bitcoin-san<br />
| 0.00000256<br />
| 0.01&nbsp;&nbsp;<br />
| 0.01&nbsp;&nbsp;<br />
|- style="background-color:cyan"<br />
| μBTC<br />
| Micro-Bitcoin<br />
| 0.000001&nbsp;&nbsp;<br />
| 0.0064<br />
| 0.0064<br />
|- style="background-color:lime"<br />
| TBCᵐ<br />
| Bitcoin-mill<br />
| 0.00000016<br />
| 0.001&nbsp;<br />
| 0.001&nbsp;<br />
|- style="background-color:lime"<br />
| TBCᵇ<br />
| Bitcoin-bong<br />
| 0.00000001<br />
| 0.0001<br />
| 0.0001<br />
|-<br />
| <br />
| "Satoshi"<br />
| 0.00000001<br />
| 0.0001<br />
| 0.0001<br />
|}<br />
<small>* Tonal Bitcoin and Decimal Bitcoin can be differentiated by the pronunciation of the numbers. "One bitcoin", "two bitcoin", etc is decimal, but "an bitcoin", "de bitcoin" is tonal.</small><br />
<br />
==See Also==<br />
<br />
* [[MilliBit]]<br />
<br />
==References==<br />
<references /></div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Private_key&diff=35424Private key2013-01-24T22:02:04Z<p>Dooglus: /* See Also */ link to 'How to import private keys v7+'</p>
<hr />
<div>A '''private key''' in the context of Bitcoin is a secret number that allows bitcoins to be spent. Every Bitcoin address has a matching private key, which is saved in the wallet file of the person who owns the balance. The private key is mathematically related to the Bitcoin address, and is designed so that the Bitcoin address can be calculated from the private key, but importantly, the same cannot be done in reverse.<br />
<br />
Because the private key is the "ticket" that allows someone to spend bitcoins, it is important that these are kept secure. Private keys can be kept on computer files, but they are also short enough that they can be printed on paper. An example of a utility that allows extraction of private keys from your wallet file for printing purposes is [[pywallet]].<br />
<br />
In order to create a transaction with a private key, it must be available to a program or service that allows entry or importing of private keys. Some wallets allow the private key to be imported without generating any transactions while other wallets or services require that the private key be swept. When a private key is swept, a transaction is broadcast that sends the entire balance held by the private key to another address in the wallet or securely controlled by the service in question. <br />
<br />
An example of private key sweeping is the method used on [[MtGox]]'s Add Funds screen. Just as with any other deposit, there is risk of double-spending so funds are deposited to the MtGox account after a six-confirmation wait (typically one hour). In contrast [[BlockChain.info]]'s My Wallet service and Bitcoin-QT each provide a facility to import a private key without creating a sweep transaction.<br />
<br />
==An example private key==<br />
In Bitcoin, a private key is a 256-bit number, which can be represented one of several ways. Here is a private key in hexadecimal - 256 bits in hexadecimal is 32 bytes, or 64 characters in the range 0-9 or A-F.<br />
<br />
E9 87 3D 79 C6 D8 7D C0 FB 6A 57 78 63 33 89 F4 45 32 13 30 3D A6 1F 20 BD 67 FC 23 3A A3 32 62<br />
<br />
==Range of valid private keys==<br />
Nearly every 256-bit number is a valid private key. Specifically, any 256-bit number between 0x1 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4141 is a valid private key.<br />
<br />
The range of valid private keys is governed by the [[secp256k1]] ECDSA standard used by Bitcoin.<br />
<br />
==Base 58 Wallet Import format==<br />
When we represent private keys in Bitcoin, however, we use a shorter format known as [[wallet import format]], which offers a few advantages. The wallet import format is shorter, and includes built-in error checking codes so that typos can be automatically detected and/or corrected (which is impossible in hex format). Wallet import format is the most common way to represent private keys in Bitcoin. For private keys associated with uncompressed public keys, they are 51 characters and always start with the number 5. Private keys associated with compressed public keys are 52 characters and start with a capital L or K. This is the same private key in wallet import format.<br />
<br />
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF<br />
<br />
When a private key is imported, it always corresponds to exactly one [[Address|Bitcoin address]]. Any utility which performs the conversion can display the matching Bitcoin address. The mathematical conversion is somewhat complex and best left to a computer, but it's notable that each private key will always correspond to the same address no matter which program is used to convert it.<br />
<br />
The Bitcoin address corresponding to the sample above is: 1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj<br />
<br />
==Mini private key format==<br />
Some applications use the [[mini private key format]]. Not every private key or Bitcoin address has a corresponding mini private key - they have to be generated a certain way in order to ensure a mini private key exists for an address. The mini private key is used for applications where space is critical, such as in QR codes and in [[physical bitcoins]]. The above example has a mini key, which is:<br />
<br />
SzavMBLoXU6kDrqtUVmffv<br />
<br />
==Summary==<br />
Any Bitcoins sent to the address 1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj can be spent by anybody who knows the private key in ''any'' of the three formats. That includes bitcoins presently at the address, as well as any bitcoins that are ever sent to it in the future. The private key is only needed to spend the balance, not necessarily to see it. The Bitcoin balance of the address can be determined by anybody with the public [[Block Explorer]] at http://www.blockexplorer.com/address/1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj - even if they don't have the private key.<br />
<br />
If a private key with a Bitcoin balance is compromised or stolen, the bitcoin balance can only be protected if it is immediately spent to a different address whose private key is not compromised. Because bitcoins can only be spent once, when they are spent away from a private key, the private key is worthless unless more coins are sent to the address.<br />
<br />
==See Also==<br />
<br />
* [[Paper wallet]]<br />
* [[How to import private keys]]<br />
* [[How to import private keys v7+]]<br />
<br />
[[es:Clave privada]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Help:How_to_import_private_keys_in_Bitcoin_Core_0.7%2B&diff=35423Help:How to import private keys in Bitcoin Core 0.7+2013-01-24T21:56:38Z<p>Dooglus: /* Backup Wallet */ there's no need to close the client. backups of encrypted wallets are encrypted whether the wallet is unlocked or not</p>
<hr />
<div>==Backup Your Wallet==<br />
Although this process is well tested and used you should always take another backup<br />
of your wallet.dat file before starting.<br />
<br />
==Open Debug Window==<br />
Then go to menu:<br />
/Help/Debug Window<br />
<br />
<br />
[[File:Screen1.PNG|px200]]<br />
<br />
and click on the tab - Console.<br />
<br />
==Unlock your wallet==<br />
<br />
If your wallet is encrypted (I hope it is!) you must unlock it. If not just skip this step.<br />
<br />
To do this just type into the box at the bottom:<br />
<pre><br />
walletpassphrase "YourLongPassphrase" 600<br />
</pre><br />
You need the quotes if there is a space in your phrase else there is no need for them.<br />
The 600 means your wallet is unlocked for 10 minutes (600 seconds).<br />
<br />
[[File:Unlock.PNG|px200]]<br />
<br />
==Run Import Command in Debug Window==<br />
In the console at the very bottom is a text entry box. In here enter:<br />
<pre><br />
importprivkey yourPrivateKeyInWalletImportFormat "TheLabelThatIWant"<br />
</pre><br />
The quotes are only needed if you want a space in the label.<br />
[[File:Import1.PNG]]<br />
<br />
You now have to be patient. On a fast PC it takes 2 minutes to import, and<br />
during this time it looks like you application has hung. After waiting a few minutes<br />
you will see:<br />
<br />
[[File:Import2.PNG]]<br />
<br />
You are now done. But always best to check it worked.<br />
<br />
==Check Key Imported OK==<br />
<br />
Once Imported you can check that you have the address by closing the Debug window and going back to your address book.<br />
<br />
You should see the address here:<br />
<br />
[[File:InAddressBook.PNG]]<br />
<br />
And you can even send a transaction to check e.g.<br />
<br />
[[File:ReceivedTrans.PNG]]<br />
<br />
==Backup Wallet==<br />
Your backup of your wallet will not have this key in obviously. So before you do anything else backup the wallet.dat file as normal.</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Help:How_to_import_private_keys_in_Bitcoin_Core_0.7%2B&diff=35422Help:How to import private keys in Bitcoin Core 0.7+2013-01-24T21:55:10Z<p>Dooglus: /* Run Import Command in Debug Window */ typo</p>
<hr />
<div>==Backup Your Wallet==<br />
Although this process is well tested and used you should always take another backup<br />
of your wallet.dat file before starting.<br />
<br />
==Open Debug Window==<br />
Then go to menu:<br />
/Help/Debug Window<br />
<br />
<br />
[[File:Screen1.PNG|px200]]<br />
<br />
and click on the tab - Console.<br />
<br />
==Unlock your wallet==<br />
<br />
If your wallet is encrypted (I hope it is!) you must unlock it. If not just skip this step.<br />
<br />
To do this just type into the box at the bottom:<br />
<pre><br />
walletpassphrase "YourLongPassphrase" 600<br />
</pre><br />
You need the quotes if there is a space in your phrase else there is no need for them.<br />
The 600 means your wallet is unlocked for 10 minutes (600 seconds).<br />
<br />
[[File:Unlock.PNG|px200]]<br />
<br />
==Run Import Command in Debug Window==<br />
In the console at the very bottom is a text entry box. In here enter:<br />
<pre><br />
importprivkey yourPrivateKeyInWalletImportFormat "TheLabelThatIWant"<br />
</pre><br />
The quotes are only needed if you want a space in the label.<br />
[[File:Import1.PNG]]<br />
<br />
You now have to be patient. On a fast PC it takes 2 minutes to import, and<br />
during this time it looks like you application has hung. After waiting a few minutes<br />
you will see:<br />
<br />
[[File:Import2.PNG]]<br />
<br />
You are now done. But always best to check it worked.<br />
<br />
==Check Key Imported OK==<br />
<br />
Once Imported you can check that you have the address by closing the Debug window and going back to your address book.<br />
<br />
You should see the address here:<br />
<br />
[[File:InAddressBook.PNG]]<br />
<br />
And you can even send a transaction to check e.g.<br />
<br />
[[File:ReceivedTrans.PNG]]<br />
<br />
==Backup Wallet==<br />
Your backup of you wallet will not have this key in obviously. So before you do anything else close the <br />
client (to ensure that it is locked again) and backup the wallet.dat file as normal.</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Help:How_to_import_private_keys_in_Bitcoin_Core_0.7%2B&diff=35421Help:How to import private keys in Bitcoin Core 0.7+2013-01-24T21:54:20Z<p>Dooglus: /* Unlock your wallet */ typos</p>
<hr />
<div>==Backup Your Wallet==<br />
Although this process is well tested and used you should always take another backup<br />
of your wallet.dat file before starting.<br />
<br />
==Open Debug Window==<br />
Then go to menu:<br />
/Help/Debug Window<br />
<br />
<br />
[[File:Screen1.PNG|px200]]<br />
<br />
and click on the tab - Console.<br />
<br />
==Unlock your wallet==<br />
<br />
If your wallet is encrypted (I hope it is!) you must unlock it. If not just skip this step.<br />
<br />
To do this just type into the box at the bottom:<br />
<pre><br />
walletpassphrase "YourLongPassphrase" 600<br />
</pre><br />
You need the quotes if there is a space in your phrase else there is no need for them.<br />
The 600 means your wallet is unlocked for 10 minutes (600 seconds).<br />
<br />
[[File:Unlock.PNG|px200]]<br />
<br />
==Run Import Command in Debug Window==<br />
In the console at the very bottom is a text entry box in here enter:<br />
<pre><br />
importprivkey yourPrivateKeyInWalletImportFormat "TheLabelThatIWant"<br />
</pre><br />
The quotes are only needed if you want a space in the label.<br />
[[File:Import1.PNG]]<br />
<br />
You now have to be patient. On a fast PC it takes 2 minutes to import, and<br />
during this time it looks like you application has hung. After waiting a few minutes<br />
you will see:<br />
<br />
[[File:Import2.PNG]]<br />
<br />
You are now done. But always best to check it worked.<br />
<br />
==Check Key Imported OK==<br />
<br />
Once Imported you can check that you have the address by closing the Debug window and going back to your address book.<br />
<br />
You should see the address here:<br />
<br />
[[File:InAddressBook.PNG]]<br />
<br />
And you can even send a transaction to check e.g.<br />
<br />
[[File:ReceivedTrans.PNG]]<br />
<br />
==Backup Wallet==<br />
Your backup of you wallet will not have this key in obviously. So before you do anything else close the <br />
client (to ensure that it is locked again) and backup the wallet.dat file as normal.</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=31691List of address prefixes2012-10-10T14:15:35Z<p>Dooglus: prefixes for uncompressed and compressed private keys differ</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|<tt>12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j</tt><br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<tt>3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX</tt><br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|<tt>LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr</tt><br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|<tt>NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn</tt><br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<tt>fF6o8LeDAfswEpMbCW8BqaqmzMWS7TGgew</tt><br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|<tt>gQ8YScyiMUTart6kUJpzhjPzAKfiYAwooc</tt><br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|<tt>jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2</tt><br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|<tt>mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz</tt><br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|<tt>sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f</tt><br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<tt>tUK2EQTMF6cN6vuNEfJtVf1BMqarvEZJBL</tt><br />
|-<br />
|128<br />
|5<br />
|Uncompressed Bitcoin Private key<br />
|<tt>5Htn3FzuH3b1X5VF2zLTsAQzBcyzkZNJsa2egXN8ZFJTCqQm3Rq</tt><br />
|-<br />
|128<br />
|K or L<br />
|Compressed Bitcoin Private key<br />
|<tt>L1aW4aubDFB7yfras2S1mN3bqg9nwySY8nkoLmJebSLD5BWv3ENZ</tt><br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|<tt>xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV</tt><br />
|-<br />
|196<br />
|2<br />
|Testnet script hash<br />
|<br />
|-<br />
|239<br />
|9<br />
|Uncompressed Testnet Private key<br />
|<tt>91eWjgRmucdtYHpMdsHbn9h8UU8hdoMNSKj8p3QAj6VTLyBnjj6</tt><br />
|-<br />
|239<br />
|c<br />
|Compressed Testnet Private key<br />
|<tt>cNJFgo1driFnPcBdBX8BrJrpxchBWXwXCvNH5SoSkdcF6JXXwHMm</tt><br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for 160 bit hashes for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=31689List of address prefixes2012-10-10T13:02:14Z<p>Dooglus: give example testnet privkey, and correct the starting character</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|<tt>12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j</tt><br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<tt>3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX</tt><br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|<tt>LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr</tt><br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|<tt>NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn</tt><br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<tt>fF6o8LeDAfswEpMbCW8BqaqmzMWS7TGgew</tt><br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|<tt>gQ8YScyiMUTart6kUJpzhjPzAKfiYAwooc</tt><br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|<tt>jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2</tt><br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|<tt>mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz</tt><br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|<tt>sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f</tt><br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<tt>tUK2EQTMF6cN6vuNEfJtVf1BMqarvEZJBL</tt><br />
|-<br />
|128<br />
|5<br />
|Bitcoin Private key<br />
|<tt>5Htn3FzuH3b1X5VF2zLTsAQzBcyzkZNJsa2egXN8ZFJTCqQm3Rq</tt><br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|<tt>xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV</tt><br />
|-<br />
|196<br />
|2<br />
|Testnet script hash<br />
|<br />
|-<br />
|239<br />
|c<br />
|Testnet Private key<br />
|<tt>cNJFgo1driFnPcBdBX8BrJrpxchBWXwXCvNH5SoSkdcF6JXXwHMm</tt><br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for 160 bit hashes for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Script&diff=24721Script2012-03-19T21:44:37Z<p>Dooglus: fix the description of OP_IFDUP</p>
<hr />
<div>Bitcoin uses a scripting system for [[transactions]]. [[Wikipedia:FORTH|Forth]]-like, Script is simple, stack-based, and processed from left to right. It is purposefully not Turing-complete, with no loops.<br />
<br />
A script is essentially a list of instructions recorded with each transaction that describe how the next person wanting to spend the Bitcoins being transferred can gain access to them. The script for a typical Bitcoin transfer to destination Bitcoin address D simply encumbers future spending of the bitcoins with two things: the spender must provide<br />
# a public key that, when hashed, yields destination address D embedded in the script, and<br />
# a signature to show evidence of the private key corresponding to the public key just provided.<br />
<br />
Scripting provides the flexibility to change the parameters of what's needed to spend transferred Bitcoins. For example, the scripting system could be used to require two private keys, or a combination of several, or even no keys at all.<br />
<br />
A transaction is valid if nothing in the combined script triggers failure and the top stack item is true (non-zero). The party who originally ''sent'' the Bitcoins now being spent, dictates the script operations that will occur ''last'' in order to release them for use in another transaction. The party wanting to spend them must provide the input(s) to the previously recorded script that results in those operations occurring last leaving behind true (non-zero).<br />
<br />
Scripts are big-endian.<br />
<br />
The stacks hold byte vectors. Byte vectors are interpreted as little-endian variable-length integers with the most significant bit determining the sign of the integer. Thus 0x81 represents -1. 0x80 is another representation of zero (so called negative 0). Byte vectors are interpreted as Booleans where False is represented by any representation of zero, and True is represented by any representation of non-zero.<br />
<br />
== Words ==<br />
This is a list of all Script words (commands/functions). Some of the more complicated opcodes are disabled out of concern that the client might have a bug in their implementation; if a transaction using such an opcode were to be included in the chain any fix would risk forking the chain. <br />
<br />
True=1 and False=0.<br />
<br />
=== Constants ===<br />
When talking about scripts, these value-pushing words are usually omitted.<br />
<br />
{| class="wikitable"<br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_0, OP_FALSE<br />
|0<br />
|0x00<br />
|Nothing.<br />
|(empty value)<br />
|An empty array of bytes is pushed onto the stack. (This is not a no-op: an item is added to the stack.)<br />
|-<br />
|N/A<br />
|1-75<br />
|0x01-0x4b<br />
|(special)<br />
|data<br />
|The next ''opcode'' bytes is data to be pushed onto the stack<br />
|-<br />
|OP_PUSHDATA1<br />
|76<br />
|0x4c<br />
|(special)<br />
|data<br />
|The next byte contains the number of bytes to be pushed onto the stack.<br />
|-<br />
|OP_PUSHDATA2<br />
|77<br />
|0x4d<br />
|(special)<br />
|data<br />
|The next two bytes contain the number of bytes to be pushed onto the stack.<br />
|-<br />
|OP_PUSHDATA4<br />
|78<br />
|0x4e<br />
|(special)<br />
|data<br />
|The next four bytes contain the number of bytes to be pushed onto the stack.<br />
|-<br />
|OP_1NEGATE<br />
|79<br />
|0x4f<br />
|Nothing.<br />
| -1<br />
|The number -1 is pushed onto the stack.<br />
|-<br />
|OP_1, OP_TRUE<br />
|81<br />
|0x51<br />
|Nothing.<br />
|1<br />
|The number 1 is pushed onto the stack.<br />
|-<br />
|OP_2-OP_16<br />
|82-96<br />
|0x52-0x60<br />
|Nothing.<br />
|2-16<br />
|The number in the word name (2-16) is pushed onto the stack.<br />
|}<br />
<br />
=== Flow control ===<br />
<br />
{| class="wikitable"<br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_NOP<br />
|97<br />
|0x61<br />
|Nothing<br />
|Nothing<br />
|Does nothing.<br />
|-<br />
|OP_IF<br />
|99<br />
|0x63<br />
| colspan="2"|<expression> if [statements] [else [statements]]* endif<br />
|If the top stack value is not 0, the statements are executed. The top stack value is removed.<br />
|-<br />
|OP_NOTIF<br />
|100<br />
|0x64<br />
| colspan="2"|<expression> if [statements] [else [statements]]* endif<br />
|If the top stack value is 0, the statements are executed. The top stack value is removed.<br />
|-<br />
|OP_ELSE<br />
|103<br />
|0x67<br />
| colspan="2"|<expression> if [statements] [else [statements]]* endif<br />
|If the preceding OP_IF or OP_NOTIF or OP_ELSE was not executed then these statements are and if the preceding OP_IF or OP_NOTIF or OP_ELSE was executed then these statements are not. <br />
|-<br />
|OP_ENDIF<br />
|104<br />
|0x68<br />
| colspan="2"|<expression> if [statements] [else [statements]]* endif<br />
|Ends an if/else block.<br />
|-<br />
|OP_VERIFY<br />
|105<br />
|0x69<br />
|True / false<br />
|Nothing / False<br />
|'''Marks transaction as invalid''' if top stack value is not true. True is removed, but false is not.<br />
|-<br />
|OP_RETURN<br />
|106<br />
|0x6a<br />
|Nothing<br />
|Nothing<br />
|'''Marks transaction as invalid'''. <br />
|}<br />
<br />
=== Stack ===<br />
<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_TOALTSTACK<br />
|107<br />
|0x6b<br />
|x1<br />
|(alt)x1<br />
|Puts the input onto the top of the alt stack. Removes it from the main stack.<br />
|-<br />
|OP_FROMALTSTACK<br />
|108<br />
|0x6c<br />
|(alt)x1<br />
|x1<br />
|Puts the input onto the top of the main stack. Removes it from the alt stack.<br />
|-<br />
|OP_IFDUP<br />
|115<br />
|0x73<br />
|x<br />
|x / x x<br />
|If the top stack value is not 0, duplicate it.<br />
|-<br />
|OP_DEPTH<br />
|116<br />
|0x74<br />
|Nothing<br />
|<Stack size><br />
|Puts the number of stack items onto the stack.<br />
|-<br />
|OP_DROP<br />
|117<br />
|0x75<br />
|x<br />
|Nothing<br />
|Removes the top stack item.<br />
|-<br />
|OP_DUP<br />
|118<br />
|0x76<br />
|x<br />
|x x<br />
|Duplicates the top stack item.<br />
|-<br />
|OP_NIP<br />
|119<br />
|0x77<br />
|x1 x2<br />
|x2<br />
|Removes the second-to-top stack item.<br />
|-<br />
|OP_OVER<br />
|120<br />
|0x78<br />
|x1 x2<br />
|x1 x2 x1<br />
|Copies the second-to-top stack item to the top.<br />
|-<br />
|OP_PICK<br />
|121<br />
|0x79<br />
|xn ... x2 x1 x0 <n><br />
|xn ... x2 x1 x0 xn<br />
|The item ''n'' back in the stack is copied to the top.<br />
|-<br />
|OP_ROLL<br />
|122<br />
|0x7a<br />
|xn ... x2 x1 x0 <n><br />
|... x2 x1 x0 xn<br />
|The item ''n'' back in the stack is moved to the top.<br />
|-<br />
|OP_ROT<br />
|123<br />
|0x7b<br />
|x1 x2 x3<br />
|x2 x3 x1<br />
|The top three items on the stack are rotated to the left.<br />
|-<br />
|OP_SWAP<br />
|124<br />
|0x7c<br />
|x1 x2<br />
|x2 x1<br />
|The top two items on the stack are swapped.<br />
|-<br />
|OP_TUCK<br />
|125<br />
|0x7d<br />
|x1 x2<br />
|x2 x1 x2<br />
|The item at the top of the stack is copied and inserted before the second-to-top item.<br />
|-<br />
|OP_2DROP<br />
|109<br />
|0x6d<br />
|x1 x2<br />
|Nothing<br />
|Removes the top two stack items.<br />
|-<br />
|OP_2DUP<br />
|110<br />
|0x6e<br />
|x1 x2<br />
|x1 x2 x1 x2<br />
|Duplicates the top two stack items.<br />
|-<br />
|OP_3DUP<br />
|111<br />
|0x6f<br />
|x1 x2 x3<br />
|x1 x2 x3 x1 x2 x3<br />
|Duplicates the top three stack items.<br />
|-<br />
|OP_2OVER<br />
|112<br />
|0x70<br />
|x1 x2 x3 x4<br />
|x1 x2 x3 x4 x1 x2<br />
|Copies the pair of items two spaces back in the stack to the front.<br />
|-<br />
|OP_2ROT<br />
|113<br />
|0x71<br />
|x1 x2 x3 x4 x5 x6<br />
|x3 x4 x5 x6 x1 x2<br />
|The fifth and sixth items back are moved to the top of the stack.<br />
|-<br />
|OP_2SWAP<br />
|114<br />
|0x72<br />
|x1 x2 x3 x4<br />
|x3 x4 x1 x2<br />
|Swaps the top two pairs of items.<br />
|}<br />
<br />
=== Splice ===<br />
<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_CAT<br />
|126<br />
|0x7e<br />
|x1 x2<br />
|out<br />
|Concatenates two strings. ''Currently disabled.''<br />
|-<br />
|OP_SUBSTR<br />
|127<br />
|0x7f<br />
|in begin size<br />
|out<br />
|Returns a section of a string. ''Currently disabled.''<br />
|-<br />
|OP_LEFT<br />
|128<br />
|0x80<br />
|in size<br />
|out<br />
|Keeps only characters left of the specified point in a string. ''Currently disabled.''<br />
|-<br />
|OP_RIGHT<br />
|129<br />
|0x81<br />
|in size<br />
|out<br />
|Keeps only characters right of the specified point in a string. ''Currently disabled.''<br />
|-<br />
|OP_SIZE<br />
|130<br />
|0x82<br />
|in<br />
|in size<br />
|Returns the length of the input string.<br />
|}<br />
<br />
=== Bitwise logic ===<br />
<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_INVERT<br />
|131<br />
|0x83<br />
|in<br />
|out<br />
|Flips all of the bits in the input. ''Currently disabled.''<br />
|-<br />
|OP_AND<br />
|132<br />
|0x84<br />
|x1 x2<br />
|out<br />
|Boolean ''and'' between each bit in the inputs. ''Currently disabled.''<br />
|-<br />
|OP_OR<br />
|133<br />
|0x85<br />
|x1 x2<br />
|out<br />
|Boolean ''or'' between each bit in the inputs. ''Currently disabled.''<br />
|-<br />
|OP_XOR<br />
|134<br />
|0x86<br />
|x1 x2<br />
|out<br />
|Boolean ''exclusive or'' between each bit in the inputs. ''Currently disabled.''<br />
|-<br />
|OP_EQUAL<br />
|135<br />
|0x87<br />
|x1 x2<br />
|True / false<br />
|Returns 1 if the inputs are exactly equal, 0 otherwise.<br />
|-<br />
|OP_EQUALVERIFY<br />
|136<br />
|0x88<br />
|x1 x2<br />
|True / false<br />
|Same as OP_EQUAL, but runs OP_VERIFY afterward.<br />
|}<br />
<br />
=== Arithmetic ===<br />
<br />
Arithmetic is limited to max 4 byte integers<br />
<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_1ADD<br />
|139<br />
|0x8b<br />
|in<br />
|out<br />
|1 is added to the input.<br />
|-<br />
|OP_1SUB<br />
|140<br />
|0x8c<br />
|in<br />
|out<br />
|1 is subtracted from the input.<br />
|-<br />
|OP_2MUL<br />
|141<br />
|0x8d<br />
|in<br />
|out<br />
|The input is multiplied by 2. ''Currently disabled.''<br />
|-<br />
|OP_2DIV<br />
|142<br />
|0x8e<br />
|in<br />
|out<br />
|The input is divided by 2. ''Currently disabled.''<br />
|-<br />
|OP_NEGATE<br />
|143<br />
|0x8f<br />
|in<br />
|out<br />
|The sign of the input is flipped.<br />
|-<br />
|OP_ABS<br />
|144<br />
|0x90<br />
|in<br />
|out<br />
|The input is made positive.<br />
|-<br />
|OP_NOT<br />
|145<br />
|0x91<br />
|in<br />
|out<br />
|If the input is 0 or 1, it is flipped. Otherwise the output will be 0.<br />
|-<br />
|OP_0NOTEQUAL<br />
|146<br />
|0x92<br />
|in<br />
|out<br />
|Returns 0 if the input is 0. 1 otherwise.<br />
|-<br />
|OP_ADD<br />
|147<br />
|0x93<br />
|a b<br />
|out<br />
|a is added to b.<br />
|-<br />
|OP_SUB<br />
|148<br />
|0x94<br />
|a b<br />
|out<br />
|b is subtracted from a.<br />
|-<br />
|OP_MUL<br />
|149<br />
|0x95<br />
|a b<br />
|out<br />
|a is multiplied by b. ''Currently disabled.''<br />
|-<br />
|OP_DIV<br />
|150<br />
|0x96<br />
|a b<br />
|out<br />
|a is divided by b. ''Currently disabled.''<br />
|-<br />
|OP_MOD<br />
|151<br />
|0x97<br />
|a b<br />
|out<br />
|Returns the remainder after dividing a by b. ''Currently disabled.''<br />
|-<br />
|OP_LSHIFT<br />
|152<br />
|0x98<br />
|a b<br />
|out<br />
|Shifts a left b bits, preserving sign. ''Currently disabled.''<br />
|-<br />
|OP_RSHIFT<br />
|153<br />
|0x99<br />
|a b<br />
|out<br />
|Shifts a right b bits, preserving sign. ''Currently disabled.''<br />
|-<br />
|OP_BOOLAND<br />
|154<br />
|0x9a<br />
|a b<br />
|out<br />
|If both a and b are not 0, the output is 1. Otherwise 0.<br />
|-<br />
|OP_BOOLOR<br />
|155<br />
|0x9b<br />
|a b<br />
|out<br />
|If a or b is not 0, the output is 1. Otherwise 0.<br />
|-<br />
|OP_NUMEQUAL<br />
|156<br />
|0x9c<br />
|a b<br />
|out<br />
|Returns 1 if the numbers are equal, 0 otherwise.<br />
|-<br />
|OP_NUMEQUALVERIFY<br />
|157<br />
|0x9d<br />
|a b<br />
|out<br />
|Same as OP_NUMEQUAL, but runs OP_VERIFY afterward.<br />
|-<br />
|OP_NUMNOTEQUAL<br />
|158<br />
|0x9e<br />
|a b<br />
|out<br />
|Returns 1 if the numbers are not equal, 0 otherwise.<br />
|-<br />
|OP_LESSTHAN<br />
|159<br />
|0x9f<br />
|a b<br />
|out<br />
|Returns 1 if a is less than b, 0 otherwise.<br />
|-<br />
|OP_GREATERTHAN<br />
|160<br />
|0xa0<br />
|a b<br />
|out<br />
|Returns 1 if a is greater than b, 0 otherwise.<br />
|-<br />
|OP_LESSTHANOREQUAL<br />
|161<br />
|0xa1<br />
|a b<br />
|out<br />
|Returns 1 if a is less than or equal to b, 0 otherwise.<br />
|-<br />
|OP_GREATERTHANOREQUAL<br />
|162<br />
|0xa2<br />
|a b<br />
|out<br />
|Returns 1 if a is greater than or equal to b, 0 otherwise.<br />
|-<br />
|OP_MIN<br />
|163<br />
|0xa3<br />
|a b<br />
|out<br />
|Returns the smaller of a and b.<br />
|-<br />
|OP_MAX<br />
|164<br />
|0xa4<br />
|a b<br />
|out<br />
|Returns the larger of a and b.<br />
|-<br />
|OP_WITHIN<br />
|165<br />
|0xa5<br />
|x min max<br />
|out<br />
|Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.<br />
|}<br />
<br />
=== Crypto ===<br />
<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Input<br />
!Output<br />
!Description<br />
|-<br />
|OP_RIPEMD160<br />
|166<br />
|0xa6<br />
|in<br />
|hash<br />
|The input is hashed using RIPEMD-160.<br />
|-<br />
|OP_SHA1<br />
|167<br />
|0xa7<br />
|in<br />
|hash<br />
|The input is hashed using SHA-1.<br />
|-<br />
|OP_SHA256<br />
|168<br />
|0xa8<br />
|in<br />
|hash<br />
|The input is hashed using SHA-256.<br />
|-<br />
|OP_HASH160<br />
|169<br />
|0xa9<br />
|in<br />
|hash<br />
|The input is hashed twice: first with SHA-256 and then with RIPEMD-160.<br />
|-<br />
|OP_HASH256<br />
|170<br />
|0xaa<br />
|in<br />
|hash<br />
|The input is hashed two times with SHA-256.<br />
|-<br />
|OP_CODESEPARATOR<br />
|171<br />
|0xab<br />
|Nothing<br />
|Nothing<br />
|All of the signature checking words will only match signatures to the data after the most recently-executed OP_CODESEPARATOR.<br />
|-<br />
|[[OP_CHECKSIG]]<br />
|172<br />
|0xac<br />
|sig pubkey<br />
|True / false<br />
|The entire transaction's outputs, inputs, and script (from the most recently-executed OP_CODESEPARATOR to the end) are hashed. The signature used by OP_CHECKSIG must be a valid signature for this hash and public key. If it is, 1 is returned, 0 otherwise.<br />
|-<br />
|OP_CHECKSIGVERIFY<br />
|173<br />
|0xad<br />
|sig pubkey<br />
|True / false<br />
|Same as OP_CHECKSIG, but OP_VERIFY is executed afterward.<br />
|-<br />
|OP_CHECKMULTISIG<br />
|174<br />
|0xae<br />
|x sig1 sig2 ... <number of signatures> pub1 pub2 <number of public keys><br />
|True / False<br />
|For each signature and public key pair, OP_CHECKSIG is executed. If more public keys than signatures are listed, some key/sig pairs can fail. All signatures need to match a public key. If all signatures are valid, 1 is returned, 0 otherwise. Due to a bug, one extra unused value is removed from the stack.<br />
|-<br />
|OP_CHECKMULTISIGVERIFY<br />
|175<br />
|0xaf<br />
|x sig1 sig2 ... <number of signatures> pub1 pub2 ... <number of public keys><br />
|True / False<br />
|Same as OP_CHECKMULTISIG, but OP_VERIFY is executed afterward.<br />
|}<br />
<br />
===Pseudo-words===<br />
These words are used internally for assisting with transaction matching. They are invalid if used in actual scripts.<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!Description<br />
|-<br />
|OP_PUBKEYHASH<br />
|253<br />
|0xfd<br />
|Represents a public key hashed with OP_HASH160.<br />
|-<br />
|OP_PUBKEY<br />
|254<br />
|0xfe<br />
|Represents a public key compatible with OP_CHECKSIG.<br />
|-<br />
|OP_INVALIDOPCODE<br />
|255<br />
|0xff<br />
|Matches any opcode that is not yet assigned.<br />
|}<br />
<br />
=== Reserved words ===<br />
Any opcode not assigned is also reserved. Using an unassigned opcode makes the transaction invalid.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Word<br />
!Opcode<br />
!Hex<br />
!When used...<br />
|-<br />
|OP_RESERVED<br />
|80<br />
|0x50<br />
|Transaction is invalid unless occuring in an unexecuted OP_IF branch<br />
|-<br />
|OP_VER<br />
|98<br />
|0x62<br />
|Transaction is invalid unless occuring in an unexecuted OP_IF branch<br />
|-<br />
|OP_VERIF<br />
|101<br />
|0x65<br />
|Transaction is invalid even when occuring in an unexecuted OP_IF branch<br />
|-<br />
|OP_VERNOTIF<br />
|102<br />
|0x66<br />
|Transaction is invalid even when occuring in an unexecuted OP_IF branch<br />
|-<br />
|OP_RESERVED1<br />
|137<br />
|0x89<br />
|Transaction is invalid unless occuring in an unexecuted OP_IF branch<br />
|-<br />
|OP_RESERVED2<br />
|138<br />
|0x8a<br />
|Transaction is invalid unless occuring in an unexecuted OP_IF branch<br />
|-<br />
|OP_NOP1-OP_NOP10<br />
|176-185<br />
|0xb0-0xb9<br />
|The word is ignored.<br />
|}<br />
<br />
== Scripts ==<br />
This is a list of interesting scripts. Keep in mind that all constants actually use the data-pushing commands above.<br />
<br />
=== Standard Transaction to Bitcoin address ===<br />
<br />
scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<br />
scriptSig: <sig> <pubKey><br />
<br />
To demonstrate how scripts look on the wire, here is a raw scriptPubKey:<br />
<pre> 76 A9 14<br />
OP_DUP OP_HASH160 Bytes to push<br />
<br />
89 AB CD EF AB BA AB BA AB BA AB BA AB BA AB BA AB BA AB BA 88 AC<br />
Data to push OP_EQUALVERIFY OP_CHECKSIG</pre><br />
<br />
Note: scriptSig is in the input of the spending transaction and scriptPubKey is in the output of the previously unspent i.e. "available" transaction.<br />
<br />
Here is how each word is processed:<br />
{| class="wikitable" <br />
|-<br />
! Stack <br />
! Script <br />
! Description <br />
|-<br />
|Empty.<br />
| <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <br />
| scriptSig and scriptPubKey are combined.<br />
|-<br />
|<sig> <pubKey><br />
| OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <br />
| Constants are added to the stack.<br />
|-<br />
|<sig> <pubKey> <pubKey><br />
| OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <br />
| Top stack item is duplicated.<br />
|-<br />
|<sig> <pubKey> <pubHashA><br />
|<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<br />
| Top stack item is hashed.<br />
|-<br />
|<sig> <pubKey> <pubHashA> <pubKeyHash><br />
|OP_EQUALVERIFY OP_CHECKSIG<br />
| Constant added.<br />
|-<br />
|<sig> <pubKey><br />
|OP_CHECKSIG<br />
| Equality is checked between the top two stack items.<br />
|-<br />
|true<br />
|Empty.<br />
|Signature is checked for top two stack items.<br />
|}<br />
<br />
=== Standard Generation / transaction to IP address ===<br />
<br />
scriptPubKey: <pubKey> OP_CHECKSIG<br />
scriptSig: <sig><br />
<br />
Checking process:<br />
{| class="wikitable" <br />
|-<br />
! Stack <br />
! Script <br />
! Description <br />
|-<br />
|Empty.<br />
|<sig> <pubKey> OP_CHECKSIG<br />
|scriptSig and scriptPubKey are combined.<br />
|-<br />
|<sig> <pubKey><br />
| OP_CHECKSIG<br />
|Constants are added to the stack.<br />
|-<br />
|true<br />
|Empty.<br />
|Signature is checked for top two stack items.<br />
|}<br />
<br />
=== Transaction with a message ===<br />
<br />
It's possible to add arbitrary data to any transaction by just adding some data along with OP_DROP. Scripts are limited to 10,000 bytes and 201 instructions/values, and each individual instruction/value is limited to 520 bytes.<br />
<br />
scriptPubKey: <message> OP_DROP <pubKey> OP_CHECKSIG<br />
scriptSig: <sig><br />
<br />
{| class="wikitable" <br />
|-<br />
! Stack <br />
! Script <br />
! Description <br />
|-<br />
|Empty.<br />
|<sig> <message> OP_DROP <pubKey> OP_CHECKSIG<br />
|<br />
|-<br />
|<sig><br />
|<message> OP_DROP <pubKey> OP_CHECKSIG<br />
|scriptSig added to the stack.<br />
|-<br />
|<sig> <message><br />
|OP_DROP <pubKey> OP_CHECKSIG<br />
|The message has been put.<br />
|-<br />
|<sig><br />
|<pubKey> OP_CHECKSIG<br />
|Top stack item has been removed.<br />
|-<br />
|<sig> <pubKey><br />
|OP_CHECKSIG<br />
|Checking signature against the public key.<br />
|-<br />
|true<br />
|Empty.<br />
|Stack holds the value of signature check now.<br />
|}<br />
<br />
=== Example non standard transaction on Testnet ===<br />
<br />
These 2 links below show a non standard transaction. It just prepends the hex of "bob" and the operation OP_DROP<br />
which just removes it. As you can see they can be spent as normal.<br />
<br />
Input non-std transaction:<br />
http://blockexplorer.com/testnet/t/6ttfeb55B1<br />
<br />
Spent by:<br />
http://blockexplorer.com/testnet/t/AFdRB1CHS3<br />
<br />
==See Also==<br />
<br />
* [[Transactions]]<br />
* [[Contracts]]<br />
<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Vocabulary&diff=24558Vocabulary2012-03-10T20:16:06Z<p>Dooglus: differentiate between 'hash' and 'hash function'</p>
<hr />
<div>;'''Bitcoin''' ''(abbreviated BTC)''<br />
: The name of a decentralized p2p crypto-currency application.<br />
;'''[[Bitcoins]]'''<br />
: The currency used and generated within the Bitcoin system.<br />
;'''[[Block]]'''<br />
: Blocks are links in a chain of transaction verifications. Outstanding transactions get bundled into a block and are verified roughly every ten minutes on average. Each subsequent block strengthens the verification of previous blocks. Each block contains one or more transactions.<br />
;'''[[Block Chain]]'''<br />
: Each block includes the difficult-to-produce verification hash of the previous block. This allows each subsequent block to be linked to all previous blocks. These blocks which are linked together for the purpose of verifying transactions within blocks is called the block chain.<br />
;'''Branching Point'''<br />
: The block at which the block chain diverges into multiple chain branches<br />
;'''BTC'''<br />
: The common decimal [[Units|unit]] of Bitcoins, equal to 100,000,000 satoshis.<br />
;'''Chain Branching'''<br />
;'''Checkpoint Lockin'''<br />
: Every once in a while, an old block hash is hardcoded into Bitcoin software. Different implementations choose different checkpoint locations. Checkpoints prevent various DOS attacks from nodes flooding unusable chains and attacks involving isolating nodes and giving them fake chains. Satoshi announced the feature [https://bitcointalk.org/index.php?topic=437 here] and it was discussed to death [https://bitcointalk.org/index.php?topic=1647 here].<br />
;'''Coinbase'''<br />
: "Coinbase" is another name for a generation transaction. The input of such a transaction contains some arbitrary data where the scriptSig would go in normal transactions -- this data is sometimes called the "coinbase", as well.<br />
;'''[[Confirmation]]'''<br />
: To protect against double spending, a transaction should not be considered as "confirmed" until a certain number of blocks in the block chain confirm, or verify that the transaction. The classic bitcoin client will show a transaction as "n/unconfirmed" until 6 blocks confirm the transaction.<br />
;'''[[Difficulty]]'''<br />
: Every 2016 blocks, Bitcoin adjusts the difficulty of verifying blocks based on the time it took to verify the previous 2016 blocks. The difficulty is adjusted so that given the average estimated computing power of the whole bitcoin network, only one block will verified on average every ten minutes for the next 2016 blocks. The difficulty is usually expressed as a number, optionally accurate to many decimal places (eg. in [http://blockexplorer.com/b/100000 block 100,000] it was 14,484.162361. The difficulty is inversely proportional to the hash target, which is expressed as a hex number with around 50 digits, and is the number under which a block's generated hash must be to qualify as an officially verified block. The hash target is equal to ((65535 << 208) / difficulty). Difficulty is also often called block difficulty, hash difficulty, verification difficulty or the difficulty of generating bitcoins.<br />
;'''Double Spending'''<br />
: Attempting to spend coins that have already been spent in another transaction<br />
;'''Generate Bitcoins'''<br />
: When a Bitcoin miner finds a block, it receives newly minted bitcoins and the transaction fees which may or may not be included in the block. The amount of bitcoins awarded for verifying a block is 50 BTC for the first 210,000 blocks and half the previous amount of bitcoins for each subsequent 210,000 blocks. On average, 210,000 blocks take about 4 years to verify. The total amount of bitcoins that will ever be minted is roughly 21,000,000 BTC.<br />
;'''[[Hash]]'''<br />
: The output of a hash function.<br />
;'''Hash function'''<br />
: A computer algorithm which takes an arbitrary amount of input data and deterministically produces fixed length output, known as the data's "hash", that can be used to easily verify that data has not been altered. If you change any single bit of the original data and run the hash algorithm, the hash will completely change. Because the hash is seemingly random, it is prohibitively difficult to try to produce a specific hash by changing the data which is being hashed.<br />
;'''Low Priority'''<br />
: See Priority.<br />
;'''Memory pool'''<br />
: Generators store [[transactions]] waiting to get into a block in their memory pool after receiving them. Received transactions are stored even if they are invalid to prevent nodes from constantly requesting transactions that they've already seen. The memory pool is cleared when Bitcoin is shut down, causing the [[network]] to gradually forget about transactions that haven't been included in a [[block]].<br />
;'''Merkle root'''<br />
: Every [[transactions|transaction]] has a [[hash]] associated with it. In a [[block]], all of the transaction hashes in the block are themselves hashed (sometimes several times -- the exact process is complex), and the result is the Merkle root. In other words, the Merkle root is the hash of all the hashes of all the transactions in the block. The Merkle root is included in the [[block hashing algorithm|block header]]. With this scheme, it is possible to securely verify that a transaction has been accepted by the network (and get the number of confirmations) by downloading just the tiny block headers and [[Wikipedia:Merkle tree|Merkle tree]] -- downloading the entire block chain is unnecessary. This feature is currently not used in Bitcoin, but it will be in the future.<br />
;''' Miner'''<br />
: Computer software which is designed to repeatedly calculate hashes with the intention to create a successful block and earn coins from transaction fees and new coins created with the block itself. The term references an analogy of gold miners who dig gold out of the ground and thus "discover" new gold that can be used to create new coins with a similar kind of discovery occurring with a successful hash to create new Bitcoins.<br />
;'''Node'''<br />
: Each Bitcoin client currently running within the network is referred to as a Node of the system.<br />
;'''Nonce'''<br />
: A nonce is an otherwise meaningless number which is used to alter the outcome of a hash. Each time Bitcoin hashes a block, it increments a nonce within the block which it is trying verify. If the numeric value of the effectively random hash is below a certain amount determined by the block generation difficulty, then the block is accepted by other clients and gets added to the chain.<br />
;'''Orphan block'''<br />
: An orphan block is a block that is not in the currently-longest [[block chain]].<br />
;'''Priority'''<br />
: A scoring mechanism to help ensure that expensive data storage isn't consumed by lower quality and spam. Low priority transactions will not get included by a miner if the limited space is already filled by higher priority transactions. A [[Transaction Fee|transaction fee]] will affect priority.<br />
;'''[[Proof of work]]'''<br />
: A result that can only be obtained through the use of computational resources. Changing the data in the proof of work requires redoing the work.<br />
;'''Reorganize'''<br />
: A block chain reorganize (or '''reorg''') happens when one chain becomes longer than the one you are currently working on. All of the blocks in the old chain that are not in the new one become orphan blocks, and their generations are invalidated. Transactions that use the newly-invalid generated coins also become invalid, though this is only possible in large chain splits because generations can't be spent for 100 blocks. The number of confirmations for transactions may change after a reorg, and transactions that are not in the new chain will become "0/unconfirmed" again. If a transaction in the old chain conflicts with one in the new chain (as a result of double-spending), the old one becomes invalid.<br />
;'''Satoshi'''<br />
: The base unit of Bitcoin (0.00000001 BTC) is sometimes called a Satoshi, after Bitcoin's creator Satoshi Nakamoto.<br />
;'''Seed Nodes'''<br />
: Nodes whose IP addresses are included in the [[Original Bitcoin client|Bitcoin client]] for use during a new installation when the normal bootstrapping process through IRC wasn't possible.<br />
;'''Subsidy'''<br />
: The block subsidy is the BTC created for generating a block. The subsidy is halved every four years.<br />
;'''Super Nodes'''<br />
: A participant in a p2p network which connects to as many other nodes as possible.<br />
;'''[[Tonal Bitcoin]]''' ''(abbreviated TBC)''<br />
: Adaptation of Bitcoin to the [http://en.wikipedia.org/wiki/John_W._Nystrom#Tonal_System_.28Hexadecimal.29 Tonal System]. 1 TBC is defined as 1,0000 (65,536 decimal) base bitcoin units. Not widely used.<br />
;'''[[Transaction Fee]]'''<br />
: A voluntary fee which can be added to a transaction which is used as an incentive to add the bitcoin transaction to a block. The fee determines the likelihood of inclusion in any given block, where a high fee included with a transaction has a priority over transactions with a lower fee included or no fee at all.<br />
;'''Virgin bitcoin'''<br />
: The reward for generating a [[Block|block]] that has not yet been spent, a state which might increase the ability to transact [[anonymity|anonymously]].<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary| ]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24352List of address prefixes2012-02-29T19:36:39Z<p>Dooglus: add testnet private key format</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|<tt>12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j</tt><br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|<tt>LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr</tt><br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|<tt>NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn</tt><br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<tt>fF6o8LeDAfswEpMbCW8BqaqmzMWS7TGgew</tt><br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|<tt>gQ8YScyiMUTart6kUJpzhjPzAKfiYAwooc</tt><br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|<tt>jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2</tt><br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|<tt>mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz</tt><br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|<tt>sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f</tt><br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<tt>tUK2EQTMF6cN6vuNEfJtVf1BMqarvEZJBL</tt><br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<tt>5Htn3FzuH3b1X5VF2zLTsAQzBcyzkZNJsa2egXN8ZFJTCqQm3Rq</tt><br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|<tt>xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV</tt><br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|-<br />
|239<br />
|2<br />
|Testnet Private key<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for 160 bit hashes for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24215List of address prefixes2012-02-23T05:46:26Z<p>Dooglus: use a valid example geist geld address. gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK is too short to be valid, even though it's geist geld's creator's donation address...</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|<tt>12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j</tt><br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|<tt>LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr</tt><br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|<tt>NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn</tt><br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<tt>fF6o8LeDAfswEpMbCW8BqaqmzMWS7TGgew</tt><br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|<tt>gQ8YScyiMUTart6kUJpzhjPzAKfiYAwooc</tt><br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|<tt>jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2</tt><br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|<tt>mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz</tt><br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|<tt>sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f</tt><br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<tt>tUK2EQTMF6cN6vuNEfJtVf1BMqarvEZJBL</tt><br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<tt>5Htn3FzuH3b1X5VF2zLTsAQzBcyzkZNJsa2egXN8ZFJTCqQm3Rq</tt><br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|<tt>xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV</tt><br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for 160 bit hashes for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24121List of address prefixes2012-02-20T07:06:45Z<p>Dooglus: show example addresses in fixed width font. notice GEG address is too short...</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|<tt>12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j</tt><br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|<tt>LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr</tt><br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|<tt>NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn</tt><br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<tt>fF6o8LeDAfswEpMbCW8BqaqmzMWS7TGgew</tt><br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|<tt>gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK</tt><br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|<tt>jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2</tt><br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|<tt>mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz</tt><br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|<tt>sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f</tt><br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<tt>tUK2EQTMF6cN6vuNEfJtVf1BMqarvEZJBL</tt><br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<tt>5Htn3FzuH3b1X5VF2zLTsAQzBcyzkZNJsa2egXN8ZFJTCqQm3Rq</tt><br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|<tt>xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV</tt><br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for 160 bit hashes for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24120List of address prefixes2012-02-20T06:49:36Z<p>Dooglus: add more example addresses, found randomly on the forums. the private key was generated randomly using bitaddress.org</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|fF6o8LeDAfswEpMbCW8BqaqmzMWS7TGgew<br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|tUK2EQTMF6cN6vuNEfJtVf1BMqarvEZJBL<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|5Htn3FzuH3b1X5VF2zLTsAQzBcyzkZNJsa2egXN8ZFJTCqQm3Rq<br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for 160 bit hashes for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24119List of address prefixes2012-02-20T05:46:09Z<p>Dooglus: i0coin uses version 105. https://github.com/doublec/i0coin/blob/master/src/base58.h "SetData(fTestNet ? 112 : 105, &hash160, 20);"</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|105<br />
|j<br />
|i0coin pubkey hash<br />
|jWmCr5cKeQjV4iyfUyipfLGwVML8MvXhF2<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24118List of address prefixes2012-02-20T05:41:18Z<p>Dooglus: Fairbrix addresses use version 95: https://github.com/coblee/Fairbrix/blob/cpumine/src/base58.h : "#define ADDRESSVERSION ((unsigned char)(fTestNet ? 95 : 95))"</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|95<br />
|f<br />
|Fairbrix pubkey hash<br />
|<br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24116List of address prefixes2012-02-20T02:53:03Z<p>Dooglus: solidcoin uses version 125. see http://downloads.solidcoin.info/solidcoin-source-2041.zip , src/base58.h: "nVersion = 125;"</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|125<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24115List of address prefixes2012-02-20T02:49:44Z<p>Dooglus: ixcoin uses version 138. https://github.com/ixcoin/ixcoin/blob/master/src/base58.h : "#define ADDRESSVERSION ((unsigned char)(fTestNet ? 111 : 138)) //ixcoin"</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|138<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|-<br />
|?<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24114List of address prefixes2012-02-20T02:46:57Z<p>Dooglus: geistgeld uses version 97 - see https://github.com/Lolcust/GeistGeld/blob/multimergemine2/geist.conf : "AddressVerson=97". verson, wtf?</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|97<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|-<br />
|?<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|?<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24113List of address prefixes2012-02-20T02:30:21Z<p>Dooglus: Tenebrix addresses start with 't': https://github.com/Lolcust/Tenebrix/blob/cpumine/src/base58.h - "#define ADDRESSVERSION ((unsigned char)(fTestNet ? 127 : 127))"</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|127<br />
|t<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|-<br />
|?<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|?<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|?<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24112List of address prefixes2012-02-20T01:55:51Z<p>Dooglus: litecoin uses 48 - see https://github.com/coblee/litecoin/blob/master/src/base58.h : "SetData(fTestNet ? 111 : 48, &hash160, 20); // Litecoin addresses start with L"</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|48<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|-<br />
|?<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|?<br />
|?<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|?<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|?<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=List_of_address_prefixes&diff=24111List of address prefixes2012-02-20T01:54:37Z<p>Dooglus: add a table showing address length and prefix for each version byte</p>
<hr />
<div>Blockchain-based currencies use addresses, which are a [[Base58Check encoding]] of some hash, typically that of a public key. The encoding includes a version byte, which affects the first character in the address. The following is a list of some prefixes which are in use.<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
!Example<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|12CPLrAUPvhVwjZqBgww3sLdEg4Z888R1j<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|NATX6zEUNfxfvgVwz8qVnnw3hLhhYXhgQn<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|mkJ7Bf5chdfw61d1m7gnDVAQV3EQQAb8iz<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|<br />
|-<br />
|?<br />
|L<br />
|Litecoin pubkey hash<br />
|LhK2kQwiaAvhjWY799cZvMyYwnQAcxkarr<br />
|-<br />
|?<br />
|g<br />
|GeistGeld pubkey hash<br />
|gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK<br />
|-<br />
|?<br />
|?<br />
|Tenebrix pubkey hash<br />
|<br />
|-<br />
|?<br />
|x<br />
|ixcoin pubkey hash<br />
|xoKDFH4uWpyzxUcCC5jCLFujRKayv3HHcV<br />
|-<br />
|?<br />
|s<br />
|Solidcoin pubkey hash<br />
|sXNaMoYBocjcQJRLK53dkaQ5mWuKfvHB9f<br />
|}<br />
<br />
The following table shows the leading symbol(s) and address length(s) for each of the possible decimal version values:<br />
<br />
{| class="wikitable"<br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Address length<br />
|-<br />
|0<br />
|1<br />
|up to 34<br />
|-<br />
|1<br />
|Q-Z, a-k, m-o<br />
|33<br />
|-<br />
|2<br />
|o-z, 2<br />
|33 or 34<br />
|-<br />
|3<br />
|2<br />
|34<br />
|-<br />
|4<br />
|2 or 3<br />
|34<br />
|-<br />
|5-6<br />
|3<br />
|34<br />
|-<br />
|7<br />
|3 or 4<br />
|34<br />
|-<br />
|8<br />
|4<br />
|34<br />
|-<br />
|9<br />
|4 or 5<br />
|34<br />
|-<br />
|10-11<br />
|5<br />
|34<br />
|-<br />
|12<br />
|5 or 6<br />
|34<br />
|-<br />
|13<br />
|6<br />
|34<br />
|-<br />
|14<br />
|6 or 7<br />
|34<br />
|-<br />
|15-16<br />
|7<br />
|34<br />
|-<br />
|17<br />
|7 or 8<br />
|34<br />
|-<br />
|18<br />
|8<br />
|34<br />
|-<br />
|19<br />
|8 or 9<br />
|34<br />
|-<br />
|20-21<br />
|9<br />
|34<br />
|-<br />
|22<br />
|9 or A<br />
|34<br />
|-<br />
|23<br />
|A<br />
|34<br />
|-<br />
|24<br />
|A or B<br />
|34<br />
|-<br />
|25-26<br />
|B<br />
|34<br />
|-<br />
|27<br />
|B or C<br />
|34<br />
|-<br />
|28<br />
|C<br />
|34<br />
|-<br />
|29<br />
|C or D<br />
|34<br />
|-<br />
|30-31<br />
|D<br />
|34<br />
|-<br />
|32<br />
|D or E<br />
|34<br />
|-<br />
|33<br />
|E<br />
|34<br />
|-<br />
|34<br />
|E or F<br />
|34<br />
|-<br />
|35-36<br />
|F<br />
|34<br />
|-<br />
|37<br />
|F or G<br />
|34<br />
|-<br />
|38<br />
|G<br />
|34<br />
|-<br />
|39<br />
|G or H<br />
|34<br />
|-<br />
|40-41<br />
|H<br />
|34<br />
|-<br />
|42<br />
|H or J<br />
|34<br />
|-<br />
|43<br />
|J<br />
|34<br />
|-<br />
|44<br />
|J or K<br />
|34<br />
|-<br />
|45-46<br />
|K<br />
|34<br />
|-<br />
|47<br />
|K or L<br />
|34<br />
|-<br />
|48<br />
|L<br />
|34<br />
|-<br />
|49<br />
|L or M<br />
|34<br />
|-<br />
|50-51<br />
|M<br />
|34<br />
|-<br />
|52<br />
|M or N<br />
|34<br />
|-<br />
|53<br />
|N<br />
|34<br />
|-<br />
|54<br />
|N or P<br />
|34<br />
|-<br />
|55-56<br />
|P<br />
|34<br />
|-<br />
|57<br />
|P or Q<br />
|34<br />
|-<br />
|58<br />
|Q<br />
|34<br />
|-<br />
|59<br />
|Q or R<br />
|34<br />
|-<br />
|60-61<br />
|R<br />
|34<br />
|-<br />
|62<br />
|R or S<br />
|34<br />
|-<br />
|63<br />
|S<br />
|34<br />
|-<br />
|64<br />
|S or T<br />
|34<br />
|-<br />
|65-66<br />
|T<br />
|34<br />
|-<br />
|67<br />
|T or U<br />
|34<br />
|-<br />
|68<br />
|U<br />
|34<br />
|-<br />
|69<br />
|U or V<br />
|34<br />
|-<br />
|70-71<br />
|V<br />
|34<br />
|-<br />
|72<br />
|V or W<br />
|34<br />
|-<br />
|73<br />
|W<br />
|34<br />
|-<br />
|74<br />
|W or X<br />
|34<br />
|-<br />
|75-76<br />
|X<br />
|34<br />
|-<br />
|77<br />
|X or Y<br />
|34<br />
|-<br />
|78<br />
|Y<br />
|34<br />
|-<br />
|79<br />
|Y or Z<br />
|34<br />
|-<br />
|80-81<br />
|Z<br />
|34<br />
|-<br />
|82<br />
|Z or a<br />
|34<br />
|-<br />
|83<br />
|a<br />
|34<br />
|-<br />
|84<br />
|a or b<br />
|34<br />
|-<br />
|85<br />
|b<br />
|34<br />
|-<br />
|86<br />
|b or c<br />
|34<br />
|-<br />
|87-88<br />
|c<br />
|34<br />
|-<br />
|89<br />
|c or d<br />
|34<br />
|-<br />
|90<br />
|d<br />
|34<br />
|-<br />
|91<br />
|d or e<br />
|34<br />
|-<br />
|92-93<br />
|e<br />
|34<br />
|-<br />
|94<br />
|e or f<br />
|34<br />
|-<br />
|95<br />
|f<br />
|34<br />
|-<br />
|96<br />
|f or g<br />
|34<br />
|-<br />
|97-98<br />
|g<br />
|34<br />
|-<br />
|99<br />
|g or h<br />
|34<br />
|-<br />
|100<br />
|h<br />
|34<br />
|-<br />
|101<br />
|h or i<br />
|34<br />
|-<br />
|102-103<br />
|i<br />
|34<br />
|-<br />
|104<br />
|i or j<br />
|34<br />
|-<br />
|105<br />
|j<br />
|34<br />
|-<br />
|106<br />
|j or k<br />
|34<br />
|-<br />
|107-108<br />
|k<br />
|34<br />
|-<br />
|109<br />
|k or m<br />
|34<br />
|-<br />
|110<br />
|m<br />
|34<br />
|-<br />
|111<br />
|m or n<br />
|34<br />
|-<br />
|112-113<br />
|n<br />
|34<br />
|-<br />
|114<br />
|n or o<br />
|34<br />
|-<br />
|115<br />
|o<br />
|34<br />
|-<br />
|116<br />
|o or p<br />
|34<br />
|-<br />
|117-118<br />
|p<br />
|34<br />
|-<br />
|119<br />
|p or q<br />
|34<br />
|-<br />
|120<br />
|q<br />
|34<br />
|-<br />
|121<br />
|q or r<br />
|34<br />
|-<br />
|122-123<br />
|r<br />
|34<br />
|-<br />
|124<br />
|r or s<br />
|34<br />
|-<br />
|125<br />
|s<br />
|34<br />
|-<br />
|126<br />
|s or t<br />
|34<br />
|-<br />
|127-128<br />
|t<br />
|34<br />
|-<br />
|129<br />
|t or u<br />
|34<br />
|-<br />
|130<br />
|u<br />
|34<br />
|-<br />
|131<br />
|u or v<br />
|34<br />
|-<br />
|132-133<br />
|v<br />
|34<br />
|-<br />
|134<br />
|v or w<br />
|34<br />
|-<br />
|135<br />
|w<br />
|34<br />
|-<br />
|136<br />
|w or x<br />
|34<br />
|-<br />
|137-138<br />
|x<br />
|34<br />
|-<br />
|139<br />
|x or y<br />
|34<br />
|-<br />
|140<br />
|y<br />
|34<br />
|-<br />
|141<br />
|y or z<br />
|34<br />
|-<br />
|142-143<br />
|z<br />
|34<br />
|-<br />
|144<br />
|z or 2<br />
|34 or 35<br />
|-<br />
|145-255<br />
|2<br />
|35<br />
|}</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Base58Check_encoding&diff=24064Base58Check encoding2012-02-19T01:33:19Z<p>Dooglus: /* Version bytes */ base58.h says "PUBKEY_ADDRESS_TEST = 111". not 192. and my testnet address begins with an 'm', not a '2'.</p>
<hr />
<div>A modified Base 58 encoding known as '''Base58Check''' is used for encoding [[Bitcoin address]]es.<br />
<br />
More generically, Base58Check encoding is used for encoding byte arrays in Bitcoin into human-typable strings. A Bitcoin address is simply a Base58Check-encoded string with a 20-byte payload, the payload being the hash of the [[public key]] associated with the address.<br />
<br />
The original Bitcoin client source code discusses the reasoning behind base58 encoding:<br />
<br />
base58.h:<br />
// Why base-58 instead of standard base-64 encoding?<br />
// - Don't want 0OIl characters that look the same in some fonts and<br />
// could be used to create visually identical looking account numbers.<br />
// - A string with non-alphanumeric characters is not as easily accepted as an account number.<br />
// - E-mail usually won't line-break if there's no punctuation to break at.<br />
// - Doubleclicking selects the whole number as one word if it's all alphanumeric.<br />
<br />
==Features of Base58Check==<br />
Base58Check has the following features:<br />
* An arbitrarily sized payload.<br />
* A set of 58 alphanumeric symbols consisting of easily distinguished uppercase and lowercase letters (0OIl are not used) <br />
* One byte of version/application information. Bitcoin addresses use 0x05 for this byte (older ones used 0x00).<br />
* Four bytes (32 bits) of SHA256-based error checking code. This code can be used to automatically detect and possibly correct typographical errors.<br />
* An extra step for preservation of leading zeroes in the data.<br />
<br />
==Creating a Base58Check string==<br />
A Base58Check string is created from a version/application byte and payload as follows.<br />
# Take the version/application byte and payload bytes, and concatenate them together (bytewise).<br />
# Take the first four bytes of SHA256(SHA256(results of step 1))<br />
# Concatenate the results of step 1 and the results of step 2 together (bytewise).<br />
# Treating the results of step 3 - a series of bytes - as a single big-endian bignumber, convert to base-58 using normal mathematical steps (bignumber division) and the base-58 alphabet described below. The result should be normalized to not have any leading base-58 zeroes (character '1').<br />
# The leading character '1', which has a value of zero in base58, is reserved for representing an entire leading zero '''byte''', as when it is in a leading position, has no value as a base-58 symbol. There can be one or more leading '1's when necessary to represent one or more leading zero bytes. Count the number of leading zero bytes that were the result of step 3 (for old Bitcoin addresses, there will always be at least one for the version/application byte; for new addresses, there will never be any). Each leading zero byte shall be represented by its own character '1' in the final result.<br />
# Concatenate the 1's from step 5 with the results of step 4. '''This is the Base58Check result.'''<br />
<br />
==Encoding a Bitcoin address==<br />
A Bitcoin address is based on any [[ECDSA]] [[secp256k1]] public/private [[key pair]].<br />
<br />
A Bitcoin address is the Base58Check encoding of the hash of the associated [[script]]. Specifically, it is Base58Check(5,[[RIPEMD160]]([[SHA256]]([[script]]))), with the following constraints:<br />
* [[RIPEMD160]] and [[SHA256]] in this case are always exactly 20 and 32 unsigned bytes respectively. These are big-endian (most significant byte first). (Beware of [[bignumber]] implementations that clip leading 0x00 bytes, or prepend extra 0x00 bytes to indicate sign - your code must handle these cases properly or else you may generate valid-looking addresses which can be sent to, but cannot be spent from - which would lead to the permanent loss of coins.)<br />
* 0 refers to the version/application byte.<br />
<br />
Because of the 0x05 version/application byte, Bitcoin addresses always start with the digit '3'.<br />
<br />
==Encoding a private key==<br />
Base58Check encoding is also used for encoding [[private key]]s in the [[Wallet Import Format]]. This is formed exactly the same as a Bitcoin address, except that 0x80 is used for the version/application byte, and the payload is 32 bytes instead of 20 (a private key in Bitcoin is a single 32-byte unsigned big-endian integer). Such encodings will always yield a 51-character string that starts with '5', or more specifically, either '5H', '5J', or '5K'.<br />
<br />
==Base58 symbol chart==<br />
The Base58 symbol chart used in Bitcoin is specific to the Bitcoin project and is not intended to be the same as any other Base58 implementation used outside the context of Bitcoin.<br />
{| class="wikitable" <br />
|-<br />
!Value<br />
!Character<br />
!Value<br />
!Character<br />
!Value<br />
|Character<br />
!Value<br />
!Character<br />
|-<br />
|0<br />
|1<br />
|1<br />
|2<br />
|2<br />
|3<br />
|3<br />
|4<br />
|-<br />
|4<br />
|5<br />
|5<br />
|6<br />
|6<br />
|7<br />
|7<br />
|8<br />
|-<br />
|8<br />
|9<br />
|9<br />
|A<br />
|10<br />
|B<br />
|11<br />
|C<br />
|-<br />
|12<br />
|D<br />
|13<br />
|E<br />
|14<br />
|F<br />
|15<br />
|G<br />
|-<br />
|16<br />
|H<br />
|17<br />
|J<br />
|18<br />
|K<br />
|19<br />
|L<br />
|-<br />
|20<br />
|M<br />
|21<br />
|N<br />
|22<br />
|P<br />
|23<br />
|Q<br />
|-<br />
|24<br />
|R<br />
|25<br />
|S<br />
|26<br />
|T<br />
|27<br />
|U<br />
|-<br />
|28<br />
|V<br />
|29<br />
|W<br />
|30<br />
|X<br />
|31<br />
|Y<br />
|-<br />
|32<br />
|Z<br />
|33<br />
|a<br />
|34<br />
|b<br />
|35<br />
|c<br />
|-<br />
|36<br />
|d<br />
|37<br />
|e<br />
|38<br />
|f<br />
|39<br />
|g<br />
|-<br />
|40<br />
|h<br />
|41<br />
|i<br />
|42<br />
|j<br />
|43<br />
|k<br />
|-<br />
|44<br />
|m<br />
|45<br />
|n<br />
|46<br />
|o<br />
|47<br />
|p<br />
|-<br />
|48<br />
|q<br />
|49<br />
|r<br />
|50<br />
|s<br />
|51<br />
|t<br />
|-<br />
|52<br />
|u<br />
|53<br />
|v<br />
|54<br />
|w<br />
|55<br />
|x<br />
|-<br />
|56<br />
|y<br />
|57<br />
|z<br />
|}<br />
<br />
The algorithm for encoding address_byte_string (consisting of 0x01 + hash + 4-byte_check_code) is<br />
<br />
code_string = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"<br />
x = convert_bytes_to_big_integer(hash_result)<br />
<br />
output_string = ""<br />
<br />
while(x > 0) <br />
{<br />
(x, remainder) = divide(x, 58)<br />
output_string.append(code_string[remainder])<br />
}<br />
<br />
repeat(number_of_leading_zero_bytes_in_hash)<br />
{<br />
output_string.append(code_string[0]);<br />
}<br />
<br />
output_string.reverse();<br />
<br />
==Version bytes==<br />
Here are some common version bytes:<br />
<br />
{| class="wikitable" <br />
|-<br />
!Decimal version<br />
!Leading symbol<br />
!Use<br />
|-<br />
|0<br />
|1<br />
|Bitcoin pubkey hash<br />
|-<br />
|5<br />
|3<br />
|Bitcoin script hash<br />
|-<br />
|21<br />
|4<br />
|Bitcoin (compact) public key (proposed)<br />
|-<br />
|52<br />
|M or N<br />
|Namecoin pubkey hash<br />
|-<br />
|128<br />
|5<br />
|Private key<br />
|-<br />
|111<br />
|m or n<br />
|Bitcoin testnet pubkey hash<br />
|-<br />
|196<br />
|2<br />
|Bitcoin testnet script hash<br />
|}<br />
<br />
== Source ==<br />
https://github.com/bitcoin/bitcoin/blob/master/src/base58.h<br />
<br />
== Relevant functions in source code ==<br />
* inline string EncodeBase58Check(const vector<unsigned char>& vchIn)<br />
* inline bool DecodeBase58Check(const char* psz, vector<unsigned char>& vchRet)<br />
* inline bool DecodeBase58Check(const string& str, vector<unsigned char>& vchRet)<br />
<br />
<br />
<br />
[[Category:Technical]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Difficulty&diff=23894Difficulty2012-02-15T07:31:58Z<p>Dooglus: fixed typos</p>
<hr />
<div>''See also: [[target]]''<br />
<br />
=== What is "difficulty"? ===<br />
<br />
Difficulty is a measure of how difficult it is to find a new [[block]] compared to the easiest it can ever be.<br />
<br />
=== How often does the difficulty change? ===<br />
<br />
Every 2016 [[block|blocks]].<br />
<br />
=== What is the formula for difficulty? ===<br />
<br />
difficulty = maximum_target / current_target <br />
<br />
(target is a 256 bit number)<br />
<br />
===How is difficulty stored in blocks?===<br />
<br />
Each block stores a packed representation (called "Bits") for its actual hexadecimal [[target]]. The target can be derived from it via a predefined formula. For example, if the packed target in the block is 0x1b0404cb, the hexadecimal target is<br />
0x0404cb * 2**(8*(0x1b - 3)) = 0x00000000000404CB000000000000000000000000000000000000000000000000<br />
<br />
Note that the 0x0404cb value is a signed value in this format. The largest legal value for this field is 0x7fffff. To make a larger value you must shift it down one full byte. Also 0x008000 is the smallest positive valid value.<br />
<br />
The highest possible target (difficulty 1) is defined as 0x1d00ffff, which gives us a hex target of<br />
0x00ffff * 2**(8*(0x1d - 3)) = 0x00000000FFFF0000000000000000000000000000000000000000000000000000<br />
<br />
So the difficulty at 0x1b0404cb is therefore:<br />
0x00000000FFFF0000000000000000000000000000000000000000000000000000 /<br />
0x00000000000404CB000000000000000000000000000000000000000000000000 <br />
= 16307.420938523983<br />
<br />
Here's a fast way to calculate difficulty. It uses a modified Taylor series for the logarithm (you can see tutorials on flipcode and wikipedia) and relies on logs to transform the difficulty calculation:<br />
<br />
<source lang="cpp"><br />
#include <iostream><br />
#include <cmath><br />
<br />
inline float fast_log(float val)<br />
{<br />
int * const exp_ptr = reinterpret_cast <int *>(&val);<br />
int x = *exp_ptr;<br />
const int log_2 = ((x >> 23) & 255) - 128;<br />
x &= ~(255 << 23);<br />
x += 127 << 23;<br />
*exp_ptr = x;<br />
<br />
val = ((-1.0f/3) * val + 2) * val - 2.0f/3;<br />
return ((val + log_2) * 0.69314718f);<br />
} <br />
<br />
float difficulty(unsigned int bits)<br />
{<br />
static double max_body = fast_log(0x00ffff), scaland = fast_log(256);<br />
return exp(max_body - fast_log(bits & 0x00ffffff) + scaland * (0x1d - ((bits & 0xff000000) >> 24)));<br />
}<br />
<br />
int main()<br />
{<br />
std::cout << difficulty(0x1b0404cb) << std::endl;<br />
return 0;<br />
}<br />
</source><br />
<br />
Unfortunately I don't have much use for it in libbitcoin. Maybe some miner will find it useful.<br />
<br />
To see the math to go from the normal difficulty calculations (which require large big ints bigger than the space in any normal integer) to the calculation above, here's some python:<br />
<br />
<source lang="python"><br />
import decimal, math<br />
l = math.log<br />
e = math.e<br />
<br />
print 0x00ffff * 2**(8*(0x1d - 3)) / float(0x0404cb * 2**(8*(0x1b - 3)))<br />
print l(0x00ffff * 2**(8*(0x1d - 3)) / float(0x0404cb * 2**(8*(0x1b - 3))))<br />
print l(0x00ffff * 2**(8*(0x1d - 3))) - l(0x0404cb * 2**(8*(0x1b - 3)))<br />
print l(0x00ffff) + l(2**(8*(0x1d - 3))) - l(0x0404cb) - l(2**(8*(0x1b - 3)))<br />
print l(0x00ffff) + (8*(0x1d - 3))*l(2) - l(0x0404cb) - (8*(0x1b - 3))*l(2)<br />
print l(0x00ffff / float(0x0404cb)) + (8*(0x1d - 3))*l(2) - (8*(0x1b - 3))*l(2)<br />
print l(0x00ffff / float(0x0404cb)) + (0x1d - 0x1b)*l(2**8)<br />
</source><br />
<br />
=== What is the current difficulty? ===<br />
[http://blockexplorer.com/q/getdifficulty Current difficulty], as output by BitCoin's getDifficulty.<br />
<br />
[http://blockexplorer.com/q/estimate Estimated next difficulty]<br />
<br />
[http://bitcoin.sipa.be Graphs]<br />
<br />
=== What is the maximum difficulty? ===<br />
<br />
There is no minimum target. The maximum difficulty is roughly: maximum_target / 1 (since 0 would result in infinity), which is a ridiculously huge number (about 2^224). <br />
<br />
The actual maximum difficulty is when current_target=0, but we would not be able to calculate the difficulty if that happened. (fortunately it never will, so we're ok.)<br />
<br />
=== Can the difficulty go down? ===<br />
Yes it can. See discussion in [[target]].<br />
<br />
=== What is the minimum difficulty? ===<br />
The minimum difficulty, when the target is at the maximum allowed value, is 1.<br />
<br />
=== What network hash rate results in a given difficulty? ===<br />
The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced. If they took less than two weeks, the difficulty is increased. The change in difficulty is in proportion to the amount of time over or under two weeks the previous 2016 blocks took to find.<br />
<br />
To find a block, the hash must be less than the target. The hash is effectively a random number between 0 and 2**256-1. The offset for difficulty 1 is<br />
0xffff * 2**208<br />
and for difficulty D is<br />
(0xffff * 2**208)/D<br />
<br />
The expected number of hashes we need to calculate to find a block with difficulty D is therefore<br />
D * 2**256 / (0xffff * 2**208)<br />
or just<br />
D * 2**48 / 0xffff<br />
<br />
The difficulty is set such that the previous 2016 blocks would have been found at the rate of one every 10 minutes, so we were calculating (D * 2**48 / 0xffff) hashes in 600 seconds. That means the hash rate of the network was<br />
D * 2**48 / 0xffff / 600<br />
over the previous 2016 blocks. Can be further simplified to<br />
D * 2**32 / 600<br />
without much loss of accuracy.<br />
<br />
At difficulty 1, that is around 7 Mhashes per second.<br />
<br />
At the time of writing, the difficulty is 22012.4941572, which means that over the previous set of 2016 blocks found the average network hash rate was<br />
22012.4941572 * 2**32 / 600 = around 157 Ghashes per second.<br />
<br />
=== How soon might I expect to generate a block? ===<br />
(The [https://www.bitcointalk.org/index.php?topic=1682.0 eternal question].)<br />
<br />
The average time to find a block can be approximated by calculating:<br />
time = difficulty * 2**32 / hashrate<br />
where difficulty is the current difficulty, hashrate is the number of hashes your miner calculates per second, and time is the average in seconds between the blocks you find.<br />
<br />
For example, using Python we calculate the average time to generate a block using a 1Ghash/s mining rig when the difficulty is 20000:<br />
$ python -c "print 20000 * 2**32 / 10**9 / 60 / 60.0"<br />
23.85<br />
and find that it takes just under 24 hours on average.<br />
<br />
* Any one grinding of the hash stands the same chance of "winning" as any other. The numbers game is how many attempts your hardware can make per second.<br />
* You need to know the difficulty (above) and your khash/sec rate (reported by the client).<br />
** [[Mining Hardware Comparison]] has some stats that may help you predict what you could get.<br />
* Visit a calculator or perform the maths yourself,<br />
** http://www.alloscomp.com/bitcoin/calculator.php<br />
* Remember it's just probability! There are no guarantees you will win every N days.<br />
<br />
==Related Links==<br />
<br />
* [http://btcserv.net/bitcoin/history/ Bitcoin Difficulty History]<br />
* See also: [[target]]<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]<br />
<br />
[[pl:Trudność]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=P2Pool&diff=23782P2Pool2012-02-13T06:46:23Z<p>Dooglus: /* Donating to P2Pool miners */ explain more about donating to miners</p>
<hr />
<div>[[Image:P2pool_chain.png|thumb|350px|right|Visualization of the P2Pool share chain]]<br />
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.<br />
<br />
<blockquote>P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 10 seconds. The blocks that get into the P2Pool block chain (called the "share chain") are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network's difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author</blockquote><br />
<br />
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin, avoids the risk of hard to detect theft by pool operators, and has better fundamental resistance to DoS attacks than centralized pools.<br />
<br />
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.<br />
<br />
P2Pool nodes work on a chain of shares similar to Bitcoin's blockchain. Each node works on a block that includes payouts to the previous shares' owners and the node itself, which can also result in a share if it meets P2Pool's difficulty.<br />
<br />
Because of the importance of strengthening Bitcoin's decentralization some Bitcoin supporters donate to P2Pool miners, resulting in returns above 100% of the expected reward. <br />
<br />
== Overview ==<br />
<br />
P2Pool shares form a "sharechain" with each share referencing the previous share's hash. Each share contains a standard Bitcoin block header, some P2Pool-specific data that is used to compute the generation transaction (total subsidy, payout script of this share, a nonce, the previous share's hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header's Merkle hash.<br />
<br />
The chain continuously regulates its target to keep generation around one share every ten seconds, just as Bitcoin regulates it to generate one block every ten minutes.<br />
<br />
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last day's worth). In order to prevent an attacker from working on a chain in secret and then releasing it, overriding the existing chain, chains are judged by how much work they have since a point in the past. To ascertain that the work has been done since that point, nodes look at the Bitcoin blocks that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)<br />
<br />
=== Payout logic ===<br />
<br />
Each share contains a generation transaction that pays to the previous ''n'' shares, where ''n'' is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640, whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.<br />
<br />
The block reward (currently 50BTC) and the transaction fees are combined and apportioned according to these rules:<br />
<br />
A subsidy of 0.5% is sent to the node that solved the block in order to discourage not sharing solutions that qualify as a block. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.<br />
<br />
In the event that a share qualifies as a block, this generation transaction is exposed to the Bitcoin network and takes effect, transferring each node its payout.<br />
<br />
=== Stales ===<br />
<br />
P2Pool stales don't work the same way as stales on centralized pools. On a centralized pool a stale is work which is too old to be accepted by the pool's Bitcoin node; this kind of stale is very rare in P2Pool because each user runs their own local bitcoind.<br />
<br />
On P2Pool stales refer to shares which can't make it into the sharechain. Because the sharechain is 60 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.<br />
<br />
There are two reported kinds of stales in P2Pool: "DEAD ON ARRIVAL" shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner's share was accepted first. Very high orphan rates may indicate network connectivity problems. <br />
<br />
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the 'Own efficiency' column:<br />
<pre><br />
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%<br />
</pre><br />
<br />
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.<br />
<br />
If your efficiency is unusually low, make sure your network connection isn't overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.<br />
<br />
== Joining the pool ==<br />
<br />
Follow these steps to join the pool:<br />
<br />
* Run Bitcoin with the RPC interface enabled: put rpcuser=USER, rpcpassword=LONG_RANDOM_SECRET_VALUE, and server=1 in bitcoin.conf (on separate lines)<br />
**'''Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK'''. You don't need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.<br />
** Bitcoin 0.5 or later is required<br />
** It's important that your Bitcoin client be fully synchronized before starting. It's also better if you have the Bitcoin port forwarded<br />
* Download p2pool:<br />
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0<br />
** Source download: https://github.com/forrestv/p2pool/tags<br />
** git: git clone git://github.com/forrestv/p2pool.git<br />
* Run p2pool: (See below for additional options.)<br />
** Windows py2exe: run_p2pool.exe<br />
** Source: python run_p2pool.py<br />
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn't on the same computer as the miner) on port 9332 with any username and password<br />
** cgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales<br />
<br />
Dependencies if running from source:<br />
* Python 2.6 or higher<br />
* python-argparse for Python 2.6 and lower<br />
* Twisted (Ubuntu package python-twisted)<br />
<br />
=== Frequently Asked Questions ===<br />
<br />
'''Q:''' "Why does cgminer report so many longpoll events when mining on p2pool? - P4Man"<br /><br />
'''A:''' "Once every ~10 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin"<br />
<br />
'''Q:''' "Do the 'orphan' and 'dead' shares in P2Pool's status display hurt me?"<br /><br />
'''A:''' They shouldn't - It's normal for some fraction of everyone's shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally "hurt" by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you're doing by looking at P2Pool's "Efficiency" (ex: ''Efficiency: ~110.6% (40-111%)''). If 100% doesn't lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 5% confidence).<br />
<br />
'''Q:''' "What do I do if my efficiency is low?"<br /><br />
'''A:''' If you have a lot of dead shares or the "Local dead on arrival" number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the ''Miners'' section on this page. Make sure the computers you're running P2Pool and the miner on have enough memory and CPU time. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool's P2P connection. Don't overload your internet connection or enable QoS (Quality of Service) on your router.<br />
<br />
=== Miners ===<br />
<br />
This is all for the latest p2pool version, as it includes several new workarounds. <br />
<br />
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for cgminer?) helps a lot with reducing stales.<br />
<br />
* cgminer works perfectly without any extra options. However, using multiple pools might cause problems, because long polling is only done for one pool.<br />
* ufasoft works perfectly.<br />
* DiabloMiner works fine after commit 3b731b9.<br />
* Phoenix works fine after commit a658ef2.<br />
* Poclbm works fine after commit 5e994e7.<br />
<br />
P2Pool uses higher difficulty shares than most centralized pools, so you'll see fewer shares reported. This is normal and doesn't reduce your payments. It's also normal to see longpoll messages once per every ten seconds on average.<br />
<br />
=== Useful features ===<br />
<br />
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seemless upgrades of P2Pool.<br />
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use ''-n'' to establish a constant extra P2P connection to them.<br />
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:<br />
<pre><br />
--net litecoin<br />
-n 1.2.3.4<br />
</pre><br />
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a<br />
<br />
=== Web interface ===<br />
<br />
Lots of data and useful tools are available at http://127.0.0.1:9332/something:<br />
* /graphs - RRD graphs of past hash rates for pool and local miners. Look for "VIP password" in P2Pool's output when it starts and use that for your miners to get graphs for individual miners.<br />
* /rate<br />
* /users<br />
* /fee<br />
* /current_payouts<br />
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool<br />
* /global_stats<br />
* /local_stats<br />
* /peer_addresses<br />
* /payout_addr<br />
* /recent_blocks<br />
* /uptime<br />
* /chain_img - Visualization of sharechain<br />
* /web/log - Some different stats collected over the last day<br />
<br />
=== Option Reference ===<br />
<pre><br />
usage: run_p2pool.py [-h] [--version] [--net {bitcoin, litecoin}] [--testnet]<br />
[--debug] [-a ADDRESS] [--datadir DATADIR]<br />
[--logfile LOGFILE] [--merged MERGED_URLS]<br />
[--merged-url MERGED_URL]<br />
[--merged-userpass MERGED_USERPASS]<br />
[--give-author DONATION_PERCENTAGE] [--irc-announce]<br />
[--p2pool-port PORT] [-n ADDR[:PORT]] [--disable-upnp]<br />
[-w PORT] [-f FEE_PERCENTAGE]<br />
[--bitcoind-address BITCOIND_ADDRESS]<br />
[--bitcoind-rpc-port BITCOIND_RPC_PORT]<br />
[--bitcoind-p2p-port BITCOIND_P2P_PORT]<br />
[BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]<br />
<br />
p2pool (version 28a1948)<br />
<br />
optional arguments:<br />
-h, --help show this help message and exit<br />
--version show program's version number and exit<br />
--net {bitcoin, litecoin}<br />
use specified network (default: bitcoin)<br />
--testnet use the network's testnet<br />
--debug enable debugging mode<br />
-a ADDRESS, --address ADDRESS<br />
generate payouts to this address (default: <address<br />
requested from bitcoind>)<br />
--datadir DATADIR store data in this directory (default: <directory<br />
run_p2pool.py is in>/data)<br />
--logfile LOGFILE log to this file (default: data/<NET>/log)<br />
--merged MERGED_URLS call getauxblock on this url to get work for merged<br />
mining (example:<br />
http://ncuser:ncpass@127.0.0.1:10332/)<br />
--merged-url MERGED_URL<br />
DEPRECATED, use --merged<br />
--merged-userpass MERGED_USERPASS<br />
DEPRECATED, use --merged<br />
--give-author DONATION_PERCENTAGE<br />
donate this percentage of work to author of p2pool<br />
(default: 0.5)<br />
--irc-announce announce any blocks found on<br />
irc://irc.freenode.net/#p2pool<br />
--disable-upnp don't attempt to use UPnP to forward p2pool's P2P port<br />
from the Internet to this computer<br />
<br />
p2pool interface:<br />
--p2pool-port PORT use port PORT to listen for connections (forward this<br />
port from your router!) (default: bitcoin:9333,<br />
litecoin:9338)<br />
-n ADDR[:PORT], --p2pool-node ADDR[:PORT]<br />
connect to existing p2pool node at ADDR listening on<br />
port PORT (defaults to default p2pool P2P port) in<br />
addition to builtin addresses<br />
<br />
worker interface:<br />
-w PORT, --worker-port PORT<br />
listen on PORT for RPC connections from miners<br />
(default: bitcoin:9332, litecoin:9327)<br />
-f FEE_PERCENTAGE, --fee FEE_PERCENTAGE<br />
charge workers mining to their own bitcoin address (by<br />
setting their miner's username to a bitcoin address)<br />
this percentage fee to mine on your p2pool instance.<br />
Amount displayed at http://127.0.0.1:WORKER_PORT/fee<br />
(default: 0)<br />
<br />
bitcoind interface:<br />
--bitcoind-address BITCOIND_ADDRESS<br />
connect to this address (default: 127.0.0.1)<br />
--bitcoind-rpc-port BITCOIND_RPC_PORT<br />
connect to JSON-RPC interface at this port (default:<br />
bitcoin:8332, litecoin:9332 <read from bitcoin.conf if<br />
password not provided>)<br />
--bitcoind-p2p-port BITCOIND_P2P_PORT<br />
connect to P2P interface at this port (default:<br />
bitcoin:8333, litecoin:9333 <read from bitcoin.conf if<br />
password not provided>)<br />
BITCOIND_RPCUSERPASS bitcoind RPC interface username, then password, space-<br />
separated (only one being provided will cause the<br />
username to default to being empty, and none will<br />
cause P2Pool to read them from bitcoin.conf)<br />
</pre><br />
<br />
== Protocol description ==<br />
<br />
P2Pool's protocol mirrors Bitcoin's P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:<br />
<br />
* '''version''' - sent to establish a connection - contains (''version'', ''services'', ''addr_to'', ''addr_from'', ''nonce'', ''sub_version'', ''mode'', ''best_share_hash'')<br />
* '''setmode''' - sent to update the ''mode'' sent in the '''version''' message - contains (''mode'')<br />
* '''ping''' - sent to keep connection alive - contains ()<br />
* '''addrme''' - request that the receiving node send out an addr for the sending node - contains (''port'')<br />
* '''addrs''' - broadcast list of nodes' addresses - contains (''addrs'')<br />
* '''getaddrs''' - request that the receiving node send ''count'' addrs - contains (''count'')<br />
* '''getshares''' - request that the receiving node send the shares referenced by ''hashes'' and ''parents'' of their parents, stopping at any share referenced by ''stops'' - contains (''hashes'', ''parents'', ''stops'')<br />
* '''shares''' - broadcast message of the contents of shares - contains (''shares'')<br />
<br />
==History==<br />
<br />
This project was announced on June 17, 2011 by Forrest Voight<ref>[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]</ref>.<br />
<br />
The began testing against mainnet in mid-July, 2011. The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011<ref>[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]</ref>.<br />
<br />
The software author's address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].<br />
<br />
==Donating to P2Pool miners==<br />
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:<br />
<br />
For example, a bash script to donate 10 btc is:<br />
<pre><br />
~/src/bitcoin/src/bitcoind sendmany "" "$(GET http://forre.st:9332/patron_sendmany?total=10)"<br />
</pre><br />
<br />
You can replace "" with "accountname" if you want to pay from some specific bitcoind account, and you can replace forre.st with 127.0.0.1 if you're running a P2Pool node locally, so you don't have to trust that the URL gives accurate figures.<br />
<br />
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they've done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this 'lottery' weighted by the miner's recent amount of work done. You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.<br />
<pre><br />
~/src/bitcoin/src/bitcoind sendmany "" "$(GET http://forre.st:9332/patron_sendmany?total=10/0.001)"<br />
</pre><br />
<br />
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.<br />
<br />
==See Also==<br />
<br />
* [[Comparison of mining pools]]<br />
* [[Pooled Mining]]<br />
<br />
==External Links==<br />
<br />
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]<br />
* [https://github.com/forrestv/p2pool p2pool] project on GitHub<br />
* {{Freenode IRC|p2pool}} discussion and support<br />
<br />
==References==<br />
<references /><br />
<br />
[[Category:Pool Operators]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=P2Pool&diff=23781P2Pool2012-02-13T06:24:48Z<p>Dooglus: /* Donating to P2Pool miners */ fixed typo</p>
<hr />
<div>[[Image:P2pool_chain.png|thumb|350px|right|Visualization of the P2Pool share chain]]<br />
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.<br />
<br />
<blockquote>P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 10 seconds. The blocks that get into the P2Pool block chain (called the "share chain") are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network's difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author</blockquote><br />
<br />
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin, avoids the risk of hard to detect theft by pool operators, and has better fundamental resistance to DoS attacks than centralized pools.<br />
<br />
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.<br />
<br />
P2Pool nodes work on a chain of shares similar to Bitcoin's blockchain. Each node works on a block that includes payouts to the previous shares' owners and the node itself, which can also result in a share if it meets P2Pool's difficulty.<br />
<br />
Because of the importance of strengthening Bitcoin's decentralization some Bitcoin supporters donate to P2Pool miners, resulting in returns above 100% of the expected reward. <br />
<br />
== Overview ==<br />
<br />
P2Pool shares form a "sharechain" with each share referencing the previous share's hash. Each share contains a standard Bitcoin block header, some P2Pool-specific data that is used to compute the generation transaction (total subsidy, payout script of this share, a nonce, the previous share's hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header's Merkle hash.<br />
<br />
The chain continuously regulates its target to keep generation around one share every ten seconds, just as Bitcoin regulates it to generate one block every ten minutes.<br />
<br />
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last day's worth). In order to prevent an attacker from working on a chain in secret and then releasing it, overriding the existing chain, chains are judged by how much work they have since a point in the past. To ascertain that the work has been done since that point, nodes look at the Bitcoin blocks that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)<br />
<br />
=== Payout logic ===<br />
<br />
Each share contains a generation transaction that pays to the previous ''n'' shares, where ''n'' is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640, whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.<br />
<br />
The block reward (currently 50BTC) and the transaction fees are combined and apportioned according to these rules:<br />
<br />
A subsidy of 0.5% is sent to the node that solved the block in order to discourage not sharing solutions that qualify as a block. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.<br />
<br />
In the event that a share qualifies as a block, this generation transaction is exposed to the Bitcoin network and takes effect, transferring each node its payout.<br />
<br />
=== Stales ===<br />
<br />
P2Pool stales don't work the same way as stales on centralized pools. On a centralized pool a stale is work which is too old to be accepted by the pool's Bitcoin node; this kind of stale is very rare in P2Pool because each user runs their own local bitcoind.<br />
<br />
On P2Pool stales refer to shares which can't make it into the sharechain. Because the sharechain is 60 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.<br />
<br />
There are two reported kinds of stales in P2Pool: "DEAD ON ARRIVAL" shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner's share was accepted first. Very high orphan rates may indicate network connectivity problems. <br />
<br />
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the 'Own efficiency' column:<br />
<pre><br />
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%<br />
</pre><br />
<br />
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.<br />
<br />
If your efficiency is unusually low, make sure your network connection isn't overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.<br />
<br />
== Joining the pool ==<br />
<br />
Follow these steps to join the pool:<br />
<br />
* Run Bitcoin with the RPC interface enabled: put rpcuser=USER, rpcpassword=LONG_RANDOM_SECRET_VALUE, and server=1 in bitcoin.conf (on separate lines)<br />
**'''Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK'''. You don't need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.<br />
** Bitcoin 0.5 or later is required<br />
** It's important that your Bitcoin client be fully synchronized before starting. It's also better if you have the Bitcoin port forwarded<br />
* Download p2pool:<br />
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0<br />
** Source download: https://github.com/forrestv/p2pool/tags<br />
** git: git clone git://github.com/forrestv/p2pool.git<br />
* Run p2pool: (See below for additional options.)<br />
** Windows py2exe: run_p2pool.exe<br />
** Source: python run_p2pool.py<br />
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn't on the same computer as the miner) on port 9332 with any username and password<br />
** cgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales<br />
<br />
Dependencies if running from source:<br />
* Python 2.6 or higher<br />
* python-argparse for Python 2.6 and lower<br />
* Twisted (Ubuntu package python-twisted)<br />
<br />
=== Frequently Asked Questions ===<br />
<br />
'''Q:''' "Why does cgminer report so many longpoll events when mining on p2pool? - P4Man"<br /><br />
'''A:''' "Once every ~10 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin"<br />
<br />
'''Q:''' "Do the 'orphan' and 'dead' shares in P2Pool's status display hurt me?"<br /><br />
'''A:''' They shouldn't - It's normal for some fraction of everyone's shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally "hurt" by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you're doing by looking at P2Pool's "Efficiency" (ex: ''Efficiency: ~110.6% (40-111%)''). If 100% doesn't lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 5% confidence).<br />
<br />
'''Q:''' "What do I do if my efficiency is low?"<br /><br />
'''A:''' If you have a lot of dead shares or the "Local dead on arrival" number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the ''Miners'' section on this page. Make sure the computers you're running P2Pool and the miner on have enough memory and CPU time. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool's P2P connection. Don't overload your internet connection or enable QoS (Quality of Service) on your router.<br />
<br />
=== Miners ===<br />
<br />
This is all for the latest p2pool version, as it includes several new workarounds. <br />
<br />
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for cgminer?) helps a lot with reducing stales.<br />
<br />
* cgminer works perfectly without any extra options. However, using multiple pools might cause problems, because long polling is only done for one pool.<br />
* ufasoft works perfectly.<br />
* DiabloMiner works fine after commit 3b731b9.<br />
* Phoenix works fine after commit a658ef2.<br />
* Poclbm works fine after commit 5e994e7.<br />
<br />
P2Pool uses higher difficulty shares than most centralized pools, so you'll see fewer shares reported. This is normal and doesn't reduce your payments. It's also normal to see longpoll messages once per every ten seconds on average.<br />
<br />
=== Useful features ===<br />
<br />
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seemless upgrades of P2Pool.<br />
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use ''-n'' to establish a constant extra P2P connection to them.<br />
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:<br />
<pre><br />
--net litecoin<br />
-n 1.2.3.4<br />
</pre><br />
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a<br />
<br />
=== Web interface ===<br />
<br />
Lots of data and useful tools are available at http://127.0.0.1:9332/something:<br />
* /graphs - RRD graphs of past hash rates for pool and local miners. Look for "VIP password" in P2Pool's output when it starts and use that for your miners to get graphs for individual miners.<br />
* /rate<br />
* /users<br />
* /fee<br />
* /current_payouts<br />
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool<br />
* /global_stats<br />
* /local_stats<br />
* /peer_addresses<br />
* /payout_addr<br />
* /recent_blocks<br />
* /uptime<br />
* /chain_img - Visualization of sharechain<br />
* /web/log - Some different stats collected over the last day<br />
<br />
=== Option Reference ===<br />
<pre><br />
usage: run_p2pool.py [-h] [--version] [--net {bitcoin, litecoin}] [--testnet]<br />
[--debug] [-a ADDRESS] [--datadir DATADIR]<br />
[--logfile LOGFILE] [--merged MERGED_URLS]<br />
[--merged-url MERGED_URL]<br />
[--merged-userpass MERGED_USERPASS]<br />
[--give-author DONATION_PERCENTAGE] [--irc-announce]<br />
[--p2pool-port PORT] [-n ADDR[:PORT]] [--disable-upnp]<br />
[-w PORT] [-f FEE_PERCENTAGE]<br />
[--bitcoind-address BITCOIND_ADDRESS]<br />
[--bitcoind-rpc-port BITCOIND_RPC_PORT]<br />
[--bitcoind-p2p-port BITCOIND_P2P_PORT]<br />
[BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]<br />
<br />
p2pool (version 28a1948)<br />
<br />
optional arguments:<br />
-h, --help show this help message and exit<br />
--version show program's version number and exit<br />
--net {bitcoin, litecoin}<br />
use specified network (default: bitcoin)<br />
--testnet use the network's testnet<br />
--debug enable debugging mode<br />
-a ADDRESS, --address ADDRESS<br />
generate payouts to this address (default: <address<br />
requested from bitcoind>)<br />
--datadir DATADIR store data in this directory (default: <directory<br />
run_p2pool.py is in>/data)<br />
--logfile LOGFILE log to this file (default: data/<NET>/log)<br />
--merged MERGED_URLS call getauxblock on this url to get work for merged<br />
mining (example:<br />
http://ncuser:ncpass@127.0.0.1:10332/)<br />
--merged-url MERGED_URL<br />
DEPRECATED, use --merged<br />
--merged-userpass MERGED_USERPASS<br />
DEPRECATED, use --merged<br />
--give-author DONATION_PERCENTAGE<br />
donate this percentage of work to author of p2pool<br />
(default: 0.5)<br />
--irc-announce announce any blocks found on<br />
irc://irc.freenode.net/#p2pool<br />
--disable-upnp don't attempt to use UPnP to forward p2pool's P2P port<br />
from the Internet to this computer<br />
<br />
p2pool interface:<br />
--p2pool-port PORT use port PORT to listen for connections (forward this<br />
port from your router!) (default: bitcoin:9333,<br />
litecoin:9338)<br />
-n ADDR[:PORT], --p2pool-node ADDR[:PORT]<br />
connect to existing p2pool node at ADDR listening on<br />
port PORT (defaults to default p2pool P2P port) in<br />
addition to builtin addresses<br />
<br />
worker interface:<br />
-w PORT, --worker-port PORT<br />
listen on PORT for RPC connections from miners<br />
(default: bitcoin:9332, litecoin:9327)<br />
-f FEE_PERCENTAGE, --fee FEE_PERCENTAGE<br />
charge workers mining to their own bitcoin address (by<br />
setting their miner's username to a bitcoin address)<br />
this percentage fee to mine on your p2pool instance.<br />
Amount displayed at http://127.0.0.1:WORKER_PORT/fee<br />
(default: 0)<br />
<br />
bitcoind interface:<br />
--bitcoind-address BITCOIND_ADDRESS<br />
connect to this address (default: 127.0.0.1)<br />
--bitcoind-rpc-port BITCOIND_RPC_PORT<br />
connect to JSON-RPC interface at this port (default:<br />
bitcoin:8332, litecoin:9332 <read from bitcoin.conf if<br />
password not provided>)<br />
--bitcoind-p2p-port BITCOIND_P2P_PORT<br />
connect to P2P interface at this port (default:<br />
bitcoin:8333, litecoin:9333 <read from bitcoin.conf if<br />
password not provided>)<br />
BITCOIND_RPCUSERPASS bitcoind RPC interface username, then password, space-<br />
separated (only one being provided will cause the<br />
username to default to being empty, and none will<br />
cause P2Pool to read them from bitcoin.conf)<br />
</pre><br />
<br />
== Protocol description ==<br />
<br />
P2Pool's protocol mirrors Bitcoin's P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:<br />
<br />
* '''version''' - sent to establish a connection - contains (''version'', ''services'', ''addr_to'', ''addr_from'', ''nonce'', ''sub_version'', ''mode'', ''best_share_hash'')<br />
* '''setmode''' - sent to update the ''mode'' sent in the '''version''' message - contains (''mode'')<br />
* '''ping''' - sent to keep connection alive - contains ()<br />
* '''addrme''' - request that the receiving node send out an addr for the sending node - contains (''port'')<br />
* '''addrs''' - broadcast list of nodes' addresses - contains (''addrs'')<br />
* '''getaddrs''' - request that the receiving node send ''count'' addrs - contains (''count'')<br />
* '''getshares''' - request that the receiving node send the shares referenced by ''hashes'' and ''parents'' of their parents, stopping at any share referenced by ''stops'' - contains (''hashes'', ''parents'', ''stops'')<br />
* '''shares''' - broadcast message of the contents of shares - contains (''shares'')<br />
<br />
==History==<br />
<br />
This project was announced on June 17, 2011 by Forrest Voight<ref>[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]</ref>.<br />
<br />
The began testing against mainnet in mid-July, 2011. The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011<ref>[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]</ref>.<br />
<br />
The software author's address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].<br />
<br />
==Donating to P2Pool miners==<br />
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:<br />
<br />
E.g. a bash script to donate 10 btc is:<br />
<pre><br />
~/src/bitcoin/src/bitcoind sendmany "" "$(GET http://forre.st:9332/patron_sendmany?total=10)"<br />
</pre><br />
<br />
You can replace "" with "accountname" if you want to pay from some specific bitcoind account, and you can replace forre.st with 127.0.0.1 if you're running a P2Pool node locally, so you don't have to trust that the URL gives accurate figures.<br />
<br />
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.<br />
<br />
==See Also==<br />
<br />
* [[Comparison of mining pools]]<br />
* [[Pooled Mining]]<br />
<br />
==External Links==<br />
<br />
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]<br />
* [https://github.com/forrestv/p2pool p2pool] project on GitHub<br />
* {{Freenode IRC|p2pool}} discussion and support<br />
<br />
==References==<br />
<references /><br />
<br />
[[Category:Pool Operators]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=OP_CHECKSIGEX_DRAFT_BIP&diff=23215OP CHECKSIGEX DRAFT BIP2012-02-01T06:48:07Z<p>Dooglus: /* Backwards Compatibility */ typo, confirmed in https://bitcointalk.org/index.php?topic=62037.msg725518#msg725518</p>
<hr />
<div><pre><br />
BIP: 22<br />
Title: OP_CHECKSIGEX<br />
Author: Mike Caldwell <mcaldwell@swipeclock.com><br />
Status: Draft<br />
Type: Standards Track<br />
Created: 31-01-2012<br />
</pre><br />
<br />
==Abstract==<br />
<br />
This BIP describes a new "standard" transaction type for the Bitcoin scripting system, and defines additional validation rules that apply only to the new transactions.<br />
<br />
==Motivation==<br />
The purpose of this proposal is to address some of the perceived shortcomings in [[BIP 0016]] and [[BIP 0017]], as well as objections that have been raised with respect to the difficulty in statically analyzing all of the potential scenarios that could arise. If adopted, it would be a complete replacement for both BIP 16 and BIP 17.<br />
<br />
Like BIP 16, this proposal keeps the burden for supplying the conditions to redeem a transaction on the redeemer.<br />
<br />
Like BIP 16 and BIP 17, this proposal ensures that payments to multisig addresses can be accomplished with addresses in the customary format. In other words, this proposal provides the benefit of allowing a sender to fund any arbitrary transaction, no matter how complicated, using a fixed-length 20-byte hash that is short enough to scan from a QR code or easily copied and pasted.<br />
<br />
Unlike BIP 16 and BIP 17, this proposal creates no new transaction types.<br />
<br />
Unlike BIP 16 and BIP 17, this proposal is believed to create no new scenarios where a "stealing bot" could be implemented to grab transactions created under the new standard from the view of the old clients.<br />
<br />
Unlike BIP 16, this proposal creates no new types of script that must be recognized as a special case by design (referred to in BIP 16 as "ugly").<br />
<br />
Unlike BIP 17, this proposal requires no reliance on the redefinition of OP_NOP opcodes to operations that must trigger failure, where they would never trigger failure under their prior definitions.<br />
<br />
Unlike BIP 16 and BIP 17, implementation of this proposal is likely to be relatively simple and easy to audit, with modifications localized to as few as two key areas of the code. Changes to the definition of a standard transaction would be a single straightforward increase to the maximum size of a parameter, and the entire set of changes to script behavior would be a single block addition that fits completely within the case statement currently handling OP_CHECKSIG.<br />
<br />
This proposal goes out of its way expressly to avoid Turing completeness and to permit easy visual verification that Turing completeness has not been added. In particular, it proposes creation of an extra sandbox stack whose access is exclusive to evaluation functions. This evaluation stack is a completely new stack that is independent of the regular and "alt" stacks defined in the Bitcoin scripting system.<br />
<br />
In this proposal, all existing transactions become normal cases of an extended opcode. No changes are made to the way new transactions are sent, only how they are redeemed.<br />
<br />
==Specification==<br />
<br />
The OP_CHECKSIG function is renamed to OP_CHECKSIGEX and termed ''check signature expression''. The current OP_CHECKSIG takes two parameters: a signature and a public key; the redefined OP_CHECKSIGEX is extended such that its arguments are a ''list'' of n signatures along with a ''public key expression'' that consumes those signatures, and also which supports a subset of interpreted opcodes that are executed strictly on a new, separate sandbox stack known as the ''expression evaluation'' stack.<br />
<br />
By retaining the same opcode, all existing transactions using OP_CHECKSIG (i.e. the vast majority of Bitcoin transactions) become OP_CHECKSIGEX transactions. Specifically, they become a specific case of OP_CHECKSIGEX: one which happen to contain exactly one signature and one public key to be validated. Thus, they retain identical behavior as before the redefinition.<br />
<br />
As OP_CHECKSIGEX, the function will continue to pop two parameters from the stack: one representing public key(s), and the other representing signature(s). Under the original OP_CHECKSIG, the public key portion is always 65 bytes. Under the extended OP_CHECKSIGEX, the public key portion may be greater than 65 bytes, this would represent the multi-signature formula supplied at redemption.<br />
<br />
A public key expression, whether 65 bytes or larger, constitutes an ''evaluation script'' that runs in a limited context, and only has access to an evaluation stack. An evaluation script strictly cannot read, push, pop, or otherwise reference anything on the stack(s) used in normal script processing. The evaluation stack shall be empty at the beginning of each execution of OP_CHECKSIGEX, and the OP_CHECKSIGEX operation has exactly two results: complete transaction failure, or validation success (with behavior identical to a successful OP_CHECKSIG as presently defined).<br />
<br />
It shall be noted that in Bitcoin, all 65-byte public keys begin with the byte 0x04, which is a constant that denotes an uncompressed public key. (In this context, "uncompressed" means that both the X and Y components of the public key are provided, as opposed to Y being flagged as computable from X and therefore omitted. In Bitcoin, each component is always 32 bytes; two 32-byte components plus the 0x04 prefix add up to 65 bytes.)<br />
<br />
The fact that the existing OP_CHECKSIG expects public keys starting with 0x04 is exploited in this proposal, by defining 0x04 in OP_CHECKSIGEX in the context of evaluation to simply mean, "check one ECDSA signature in uncompressed format". Therefore, an existing transaction consisting of a single public key, single signature, and transactions currently utilizing OP_CHECKSIG would<br />
become interpreted as an OP_CHECKSIGEX opcode which contains an instruction (0x04) to check a single uncompressed signature - resulting in identical behavior.<br />
<br />
By including a subset of opcodes specifically turned on for OP_CHECKSIGEX, the multi signature functionality can be included in a reduced "expression" context without the risk of adding Turing-completeness to the scripting engine, nor the risk of the ability of scripts to modify themselves. In addition, the opcodes that are currently disabled due to non-use (such as the arithmetic opcodes that evaluation would need) can be enabled in a context that greatly limits their reach, since they'll be running in an enclosed environment with highly limited data access.<br />
<br />
The signature list is a simple binary blob of digital signatures concatenated together, each of which can either be present, or intentionally omitted (leaving a null placeholder entry in the list). As already is the practice in standard Bitcoin transactions, real signatures always begins with 0x30 plus a length byte which can be used to locate the end of the signature. A placeholder is hereby defined as a single 0x00 byte.<br />
<br />
A placeholder is used to denote that a particular signature is absent and not needed. (For example, an '''(A AND B) OR C''' transaction, where only C is provided, would have two placeholders in the list to represent A and B.) Any time the evaluation script attempts to check a placeholder, no computational resources are expended on EC operations, but instead, a 0 is immediately pushed to the top of the evaluation stack.<br />
<br />
Success of the evaluation script is denoted by a 1 at the top of the private evaluation stack. Once the evaluation script is completed and control returns to the outer script, the contents of the evaluation stack are abandoned.<br />
<br />
===Proposed opcodes to be supported in evaluation environment===<br />
The following opcodes would be supported in an evaluation environment. They would not necessarily need to be enabled in the environment of regular script processing (and in fact ought not to be). Thus, they have been prefixed as EVALOP_ instead of OP_, to show they are different, even if the same constants are chosen to represent these as the corresponding OP_ version.<br />
<br />
* EVALOP_CHECKSIGU (opcode strictly defined as 0x04) - Check a single uncompressed ECDSA signature. The U stands for uncompressed. The next 64 bytes are the X and Y coordinates of the public key, and one signature is pulled from the signature list. Push 1 or 0 on the stack to denote success or failure.<br />
* EVALOP_NOP<br />
* EVALOP_INVERT - turn a 1 on top of the eval stack to a 0 and vice versa.<br />
* EVALOP_AND - pop two items off eval stack, if both 1 then push 1, else push 0.<br />
* EVALOP_OR - pop two items off eval stack, if either 1 then push 1, else push 0.<br />
* EVALOP_ADD - pop two items off eval stack, push sum.<br />
* EVALOP_DUP - duplicate top item on stack.<br />
* Comparison operators (equality, less than, greater than, etc.)<br />
* Ability to push constants 0-75 (with the exception of the repurposed opcode 0x04, which must be handled via a replacement opcode or via EVALOP_PUSHDATA1)<br />
<br />
In addition,<br />
* Operations expecting a 1 or 0 on the top of the stack shall cause transaction failure if the stack does not contain these elements or if they are not 1 or 0.<br />
* Operations shall be explicitly defined as unsigned 32-bit arithmetic, with overflows explicitly defined as causing transaction failure.<br />
* Note that none of the operations defined thus far involve stack operations involving anything other than scalar 32-bit unsigned integers (assuming "true" and "false" are denoted as 1 and 0). Notably, there is no defined need for objects such as blobs of bytes or big integers, as all of these are provided as explicit parameters to the EVALOP_CHECKSIGU operation. In the absence of a well-articulated need to utilize any other data type in this limited evaluation context, it is advisable to limit the functionality of the ''evaluation stack'' such that it only holds 32-bit unsigned integers.<br />
<br />
===Examples of use cases===<br />
<br />
All of these use cases assume the standard transaction format which is recited as follows, but modified such that pubKeyHash is called pubKeyExHash (public key expression hash), and pubKey is called pubKeyEx (public key expression).<br />
<br />
Sending funds: OP_DUP OP_HASH160 <pubKeyExHash> OP_EQUALVERIFY OP_CHECKSIGEX<br />
Redeeming funds: <sigs> <pubKeyEx><br />
<br />
<br />
A standard transaction as is known now. This transaction leaves the evaluation environment with a 1 on the top of the evaluation stack, resulting in OP_CHECKSIGEX returning true.<br />
<br />
<sigs> - contains a single signature.<br />
<pubKeyEx> - contains a single public key, i.e. 0x04 + xy i.e. EVALOP_CHECKSIGU + xy<br />
<br />
A two party, A and B transaction.<br />
<br />
<sigs> - contains two signatures, binary concatenated together<br />
<pubKeyEx> contains: EVALOP_CHECKSIGU + x1y1 + EVALOP_CHECKSIGU + x2y2 + EVALOP_AND<br />
<br />
An (A AND B) OR C, redeemed using signatures A and B<br />
<br />
<sigs> - contains two signatures and one placeholder<br />
<pubKeyEx> contains: EVALOP_CHECKSIGU + x1y1 + EVALOP_CHECKSIGU + x2y2 + EVALOP_AND + EVALOP_CHECKSIGU + x3y3 + EVALOP_OR<br />
<br />
An (A AND B) OR C, redeemed using only signature C<br />
<br />
<sigs> - contains two placeholders and one signature<br />
<pubKeyEx> contains: EVALOP_CHECKSIGU + x1y1 + EVALOP_CHECKSIGU + x2y2 + EVALOP_AND + EVALOP_CHECKSIGU + x3y3 + EVALOP_OR<br />
<br />
An m-of-n transaction, requiring (for example) 5 out of 10 signatures<br />
<br />
<sigs> - contains 10 items, a combination of signatures and placeholders<br />
<pubKeyEx> contains: EVALOP_CHECKSIGU + x1y1 +<br />
9 repetitions of: EVALOP_CHECKSIGU + xnyn + EVALOP_ADD +<br />
(constant 5) + EVALOP_GREATERTHANOREQUAL<br />
<br />
==Backwards Compatibility==<br />
<br />
New transactions are non-standard to old implementations. But old implementations will generate transactions that are fully compatible with the new format. Sending Bitcoins to multisignature addresses as defined in this proposal will not break old clients, but redeeming them will. Regardless, old implementations will be rendered incompatible once such extended transactions appear on the network.<br />
<br />
Old implementations would fail gracefully as they built their own fork of the chain that continued to include regular transaction but would omit multisig spends as well as respends of those same coins. Old clients would see and record Bitcoins paid to multisig addresses normally (since the transactions are standard and look just like non-multisig transactions), but would not be able to see those Bitcoins ever come back from multisig addresses to regular ones. The most likely failure mode an old client would see is an inability to see received Bitcoins from a new client if those coins had participated in a previous multisig transaction.<br />
<br />
Importantly, transactions in the new format still look at best like regular transactions in the old format to old clients. There is no foreseen way to trick an old client into redeeming a new transaction (for example, by exploiting a deprecated interpretation of OP_NOP as meaning "do nothing").<br />
<br />
A suggested implementation is to program the client such that the functionality is enabled only on Testnet, and on the main Bitcoin network once a certain level of voting consensus has been established into the block chain. So long as the functionality is disabled, OP_CHECKSIG shall succeed so long as the expected parameters of one single signature and one single private key are provided.<br />
<br />
==Avoiding Turing completeness surprises==<br />
In order to minimize the possibility of a later discovery that the proposal resulted in the accidental implementation of a Turing complete script engine, the following details are recommended and/or required for implementers.<br />
<br />
The implementation of the evaluation script processor MUST be implemented as a simple nested loop within the outer script processor. The evaluation script processing MUST NOT be implemented as a recursive call to the same loop that handles the outer script operations.<br />
<br />
The inner evaluation script processing loop SHOULD NOT contain any references or use any pointers to the stacks belonging to the outer loop. The inner evaluation script processing loop MUST NOT provide any access whatsoever to the stacks used by the outer loop - not read access, not write access. The inner processing loop MUST receive as its sole inputs a dedicated copy of the two binary blob parameters (''sigs'' and ''pubKeyEx'') that were popped off the stack, along with any information incidental to validating signatures (i.e. the computed hash of the transaction script). The inner processing loop MUST NOT be able to return any data to the outer loop that invoked it - other than transaction failure (which terminates script processing) or validation success (identical in behavior to the current implementation of OP_CHECKSIG returning success).<br />
<br />
==Notes==<br />
This was once informally proposed by Casascius.<br />
<br />
As it was understood by Casascius, the proposal was informally rejected, mainly on the notion that it would be silly or unclean to have a script interpreter of one type embedded within a script interpreter of another type.<br />
<br />
This proposal is being reintroduced as a BIP simply because, due to heightened concern regarding Turing completeness surprises - where a script may be able to modify its own behavior - having separate partitioned storage<br />
and operations for two different types of script content may be seen as a viable answer to the concern. The partitioning, of course, referring to the main script - which has access to control flow operations (if/then/else), as well as the ability<br />
to modify scripts run in the "evaluation context" and then that separate<br />
"evaluation" context - consisting solely of code that has access to nothing beyond its own private data, the signature validation function, and basic arithmetic options.<br />
<br />
It is believed that implementation of this BIP would be relatively easy, with changes to code being confined strictly to the addition of a single new loop that runs with in the OP_CHECKSIG[EX] portion of the script interpreter.<br />
<br />
[[Category:BIP|D]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=MtGox/API&diff=19551MtGox/API2011-11-17T08:13:55Z<p>Dooglus: I'm able to use the API without specifying username or password, so this is clearly incorrect.</p>
<hr />
<div>The [[MtGox]] API provides various methods to access different informations from the market, place orders, and more.<br />
<br />
Two APIs are available at this point: the HTTP api (available by posting to mtgox.com/code/*) and the websocket API.<br />
<br />
==Number Formats==<br />
<br />
In the "old API", currency- and amount-values (price, volume,...) were given as '''float'''. These values are likely being deprecated and replaced by fields of the same name with "_int" as suffix. These are '''fixed-decimal''', so you have to move the decimal point yourself (divide). The exponent differs based on the kind of the value.<br />
<br />
In order to convert the '''int''' to a '''decimal''' you can...<br />
<br />
{| class="wikitable"<br />
|-<br />
! kind of field !! ...divide by !! ...multiply by<br />
|-<br />
| BTC (volume, amount) || 1E8 (10,000,000) || 0.00000001<br />
|-<br />
| USD (price) || 1E5 (100,000) || 0.00001<br />
|-<br />
| JPY (price) || 1E3 (1,000) || 0.001<br />
|}<br />
<br />
Implementation advice: it's probably best to use '''int''' or '''Decimal''' (if your language/db offers such a type) in your clients. Using '''float''' will likely lead to nasty rounding problems.<br />
<br />
== currency symbols ==<br />
List of the Currency symbols you can use with the API :<br />
<br />
USD, AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, JPY, NZD, PLN, RUB, SEK, SGD, THB<br />
<br />
== HTTP API ==<br />
This API is available in <nowiki>https://mtgox.com/api/*</nowiki>, and provides various informations. It also supports making an order, a withdraw, a deposit, etc. There is also a [https://rubygems.org/gems/mtgox Ruby gem] and [[Finance::MtGox|Perl module]] for interacting with the HTTP API.<br />
<br />
=== Authentication ===<br />
<br />
<br />
Authentication is performed by signing each request using HMAC-SHA512. The request must contain an extra value "nonce" which must be an always incrementing numeric value. A reference implementation is provided here:<br />
<source lang="php"><br />
<?php<br />
<br />
function mtgox_query($path, array $req = array()) {<br />
// API settings<br />
$key = '';<br />
$secret = '';<br />
<br />
// generate a nonce as microtime, with as-string handling to avoid problems with 32bits systems<br />
$mt = explode(' ', microtime());<br />
$req['nonce'] = $mt[1].substr($mt[0], 2, 6);<br />
<br />
// generate the POST data string<br />
$post_data = http_build_query($req, '', '&');<br />
<br />
// generate the extra headers<br />
$headers = array(<br />
'Rest-Key: '.$key,<br />
'Rest-Sign: '.base64_encode(hash_hmac('sha512', $post_data, base64_decode($secret), true)),<br />
);<br />
<br />
// our curl handle (initialize if required)<br />
static $ch = null;<br />
if (is_null($ch)) {<br />
$ch = curl_init();<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br />
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')');<br />
}<br />
curl_setopt($ch, CURLOPT_URL, 'https://mtgox.com/api/'.$path);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);<br />
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);<br />
<br />
// run the query<br />
$res = curl_exec($ch);<br />
if ($res === false) throw new Exception('Could not get reply: '.curl_error($ch));<br />
$dec = json_decode($res, true);<br />
if (!$dec) throw new Exception('Invalid data received, please make sure connection is working and requested API exists');<br />
return $dec;<br />
}<br />
<br />
// example 1: get infos about the account, plus the list of rights we have access to<br />
var_dump(mtgox_query('0/info.php'));<br />
<br />
// old api (get funds)<br />
var_dump(mtgox_query('0/getFunds.php'));<br />
<br />
// trade example<br />
// var_dump(mtgox_query('0/buyBTC.php', array('amount' => 1, 'price' => 15)));<br />
</source><br />
<br />
Python version here: https://bitcointalk.org/index.php?topic=49789.msg592388#msg592388<br />
<br />
=== Cache ===<br />
<br />
All of the API methods below have cached results, ticker, depth . . . have a 10 seconds cache .<br />
No need to poll more often, you wont have more results, you could just be blocked by the prolexic anti ddos features.<br />
<br />
=== Methods API version 0===<br />
<br />
==== 0/data/getTrades.php ====<br />
This allows retrieving all trades which happened in the last 24 hours. The returned data is cached and may not reflect latest activity.<br />
<br />
Parameters:<br />
* since: Passing a tid in "since" allows retrieving all trades since that trade. The passed id is may not exist. Ie. to get all trades from the very beginning one would just call https://mtgox.com/code/data/getTrades.php?since=0 . since returns only 100 trades, and you can call the method again by passing the latest trade you have imported in since.<br />
<br />
* data is returned in standard json format like :<br />
<source lang="php"><br />
[<br />
{"date":1279408157,<br />
"price":"0.04951",<br />
"amount":"20",<br />
"price_int":"4951",<br />
"amount_int":"2000000000",<br />
"tid":"1",<br />
"price_currency":"USD",<br />
"item":"BTC",<br />
"trade_type":""<br />
"primary":"Y"<br />
},<br />
{"date":1279424586,"price":"0.05941","amount":"50.01","price_int":"5941","amount_int":"5001000000","tid":"2","price_currency":"USD","item":"BTC","trade_type":""}]<br />
</source><br />
<br />
==== 0/getDepth.php ====<br />
Get the current Market depth<br />
<br />
https://mtgox.com/api/0/data/getDepth.php?Currency=PLN<br />
<br />
https://mtgox.com/api/0/data/getDepth.php?Currency=AUD<br />
<br />
https://mtgox.com/api/0/data/getDepth.php?Currency=USD<br />
<br />
==== 0/getFunds.php ====<br />
Get your current balance<br />
<br />
https://mtgox.com/api/0/getFunds.php<br />
<br />
getfunds is now deprecated since multi currency, please use info.php<br />
<br />
==== 0/buyBTC.php ====<br />
Place an order to Buy BTC<br />
<br />
https://mtgox.com/api/0/buyBTC.php<br />
<br />
POST data: amount=#&price=#&Currency=PLN<br />
<br />
returns a list of your open orders<br />
<br />
you can omit the price to do a market order<br />
<br />
==== 0/sellBTC.php ====<br />
Place an order to Sell BTC<br />
<br />
https://mtgox.com/api/0/sellBTC.php<br />
<br />
POST data: &amount=#&price=#&Currency=PLN <br />
<br />
returns a list of your open orders<br />
<br />
you can omit the price to do a market order<br />
<br />
==== 0/getOrders.php ====<br />
Fetch a list of your open Orders<br />
<br />
https://mtgox.com/api/0/getOrders.php<br />
<br />
oid: Order ID<br />
<br />
type: 1 for sell order or 2 for buy order<br />
<br />
status: 1 for active, 2 for not enough funds<br />
<br />
==== 0/cancelOrder.php ====<br />
Cancel an order<br />
<br />
https://mtgox.com/api/0/cancelOrder.php<br />
<br />
POST data: oid=#&type=#<br />
<br />
oid: Order ID<br />
<br />
type: 1 for sell order or 2 for buy order<br />
<br />
==== 0/redeemCode.php ====<br />
Used to redeem a mtgox coupon code<br />
<br />
https://mtgox.com/api/0/redeemCode.php<br />
<br />
* call with a post parameter "code" containing the code to redeem<br />
<br />
* it will return an array with amount (float amount value of code), currency (3 letters, BTC or USD), reference (the transaction id), and status<br />
<br />
==== 0/withdraw.php ====<br />
withdraw / Send BTC<br />
<br />
https://mtgox.com/api/0/withdraw.php<br />
<br />
POST data: group1=BTC&btca=bitcoin_address_to_send_to&amount=#<br />
<br />
* pass btca parameter to withdraw to a btc adress<br />
<br />
* pass group1 for a coupon : BTC2CODE or USD2CODE<br />
<br />
* pass group1=DWUSD for a dwolla withdraw<br />
<br />
* pass green=1 to use the new greenaddress feature ( see [[GreenAddress]] )<br />
* return code and status if successful<br />
<br />
To make a withdraw in another Currency , use group1=USD2CODE and add a Currency parameter ( example Currency=EUR to get a mtgox EUR coupon )<br />
<br />
==== 0/btcAddress.php ====<br />
get a bitcoin deposit adress for your account <br />
<br />
https://mtgox.com/api/0/btcAddress.php<br />
<br />
* pass POST data "description" to add a description that will appear in your history when this BTC address receive a deposit<br />
<br />
* returns a bitcoin deposit address<br />
<br />
==== 0/history_[CUR].csv ====<br />
<br />
Allows downloading your activity history for a given currency (BTC or USD for now).<br />
<br />
https://mtgox.com/api/0/history_BTC.csv<br />
<br />
https://mtgox.com/api/0/history_USD.csv<br />
<br />
==== 0/info.php ====<br />
<br />
https://mtgox.com/api/0/info.php<br />
<br />
returns info about your account, funds, fees, API privileges . . . <br />
<br />
==== 0/ticker ====<br />
<br />
http://mtgox.com/api/0/data/ticker.php<br />
<br />
returns the current ticker :<br />
<br />
<source lang="php"><br />
{"ticker":<br />
{<br />
"high":5.70653,<br />
"low":5.4145,<br />
"avg":5.561388723,<br />
"vwap":5.610932845,<br />
"vol":55698,<br />
"last":5.56915,<br />
"buy":5.51326,<br />
"sell":5.5672<br />
}<br />
}<br />
</source><br />
<br />
the time frame for high, low, vol, avg, vwap . . . is sliding 24 hours<br />
<br />
what is vwap ? <br />
<br />
please see http://en.wikipedia.org/wiki/VWAP<br />
<br />
=== API version 0 examples ===<br />
<br />
==== all api shell type CLI ====<br />
<br />
python : http://www.goxsh.info/<br />
<br />
perl : http://pastebin.com/vEpgw5nW<br />
<br />
==== other ====<br />
<br />
https : http://stackoverflow.com/questions/7046370/https-request-with-boost-asio-and-openssl<br />
<br />
https://github.com/sje397/mtgox-plasmoid<br />
<br />
module perl : http://search.cpan.org/~mndrix/Finance-MtGox-0.02/<br />
<br />
==== gather data ====<br />
<br />
https://github.com/Lexiks/MyBitBoard<br />
<br />
==== gettrade ====<br />
<br />
bash : https://bitcointalk.org/index.php?topic=39402.0<br />
<br />
perl : http://pastebin.com/raw.php?i=pmhMXZJu<br />
<br />
==== ticker ====<br />
<br />
http://pastebin.com/pd0ZR4WY<br />
<br />
=== Methods API version 1===<br />
<br />
==== Multi Currency Ticker ====<br />
<br />
https://mtgox.com/api/1/BTCUSD/public/ticker<br />
https://mtgox.com/api/1/BTCEUR/public/ticker<br />
<br />
returns the current ticker for the selected currency :<br />
<br />
<source lang="php"><br />
{<br />
"result":"success",<br />
"return":<br />
{<br />
"high": {"value":"5.70653","value_int":"570653","display":"$5.70653","currency":"USD"},<br />
"low": {"value":"5.4145","value_int":"541450","display":"$5.41450","currency":"USD"},<br />
"avg": {"value":"5.561119626","value_int":"556112","display":"$5.56112","currency":"USD"},<br />
"vwap": {"value":"5.610480461","value_int":"561048","display":"$5.61048","currency":"USD"},<br />
"vol":<br />
{<br />
"value":"55829.58960346",<br />
"value_int":"5582958960346",<br />
"display":"55,829.58960346\u00a0BTC",<br />
"currency":"BTC"<br />
},<br />
"last_local":{"value":"5.5594","value_int":"555940","display":"$5.55940","currency":"USD"},<br />
"last_orig":{"value":"5.5594","value_int":"555940","display":"$5.55940","currency":"USD"},<br />
"last":{"value":"5.5594","value_int":"555940","display":"$5.55940","currency":"USD"},<br />
"buy":{"value":"5.53587","value_int":"553587","display":"$5.53587","currency":"USD"},<br />
"sell":{"value":"5.56031","value_int":"556031","display":"$5.56031","currency":"USD"}<br />
}<br />
</source><br />
<br />
note : last_local include only the last trade in the selected currency, last_orig include data of the original last trade ( currency,price in currency . . . ),last can be a conversion of the last trde in another currency<br />
<br />
==== Multi Currency depth ====<br />
<br />
https://mtgox.com/api/1/BTCPLN/public/depth?raw<br />
<br />
https://mtgox.com/api/1/BTCAUD/public/depth?raw<br />
<br />
==== Multi currency trades ====<br />
<br />
https://mtgox.com/api/1/BTCPLN/public/trades?raw<br />
<br />
https://mtgox.com/api/1/BTCAUD/public/trades?raw<br />
<br />
to get only the trades since a given trade id, you can add the parameter since=<trade_id><br />
<br />
https://mtgox.com/api/1/BTCUSD/public/trades?since=0<br />
<br />
https://mtgox.com/api/1/BTCEUR/public/trades?since=1316312781670700<br />
<br />
For multi currency,also returns the primary value,"Y" or "N", the primary currency is always the buyers currency<br />
<br />
A trade can appear in more than one currency, to ignore duplicates, use only the trades having primary =Y<br />
<br />
example of returned data : <br />
<source lang="php"><br />
{"date":1316312781,<br />
"price":"3.5599",<br />
"amount":"3.6900096",<br />
"price_int":"355990",<br />
"amount_int":"369000960",<br />
"tid":"1316312781670700",<br />
"price_currency":"EUR",<br />
"item":"BTC",<br />
"trade_type":"bid",<br />
"primary":"Y",<br />
"properties":"limit,mixed_currency"<br />
}<br />
</source><br />
<br />
==== Cancelled Trades ====<br />
<br />
https://mtgox.com/api/1/BTCUSD/public/cancelledtrades<br />
<br />
returns a list of all the cancelled trades this last month, list of trade ids in json format .<br />
<br />
==== Full Depth ====<br />
<br />
https://mtgox.com/api/1/BTCUSD/public/fulldepth<br />
<br />
returns full depth<br />
<br />
== Websocket API ==<br />
ported on 7/10/2011 from http://forum.bitcoin.org/index.php?topic=5855.0<br />
<br />
===Connecting===<br />
<br />
You can connect via: ws://websocket.mtgox.com/mtgox<br />
<br />
The WebSocket protocol version used is that described in [http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00 draft-ietf-hybi-thewebsocketprotocol-00] (aka draft-00).<br />
<br />
===Channels===<br />
<br />
The websocket will subscribe you to some channels automatically:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Channel ID !! Description<br />
|-<br />
| dbf1dee9-4f2e-4a08-8cb7-748919a71b21 || trades (each time a trade happens, you get something here)<br />
|-<br />
| d5f06780-30a8-4a48-a2f8-7ed181b4a13f || the mtgox ticker (lots of updates, with often the same data)<br />
|-<br />
| 24e67e0d-1cad-4cc0-9e7a-f8523ef460fe || depth information in realtime (price + amount + type... type=1=Ask, type=2=Bid)<br />
|}<br />
<br />
Additionally each user has a "own" channel which streams informations about orders (new order, deleted order, etc) and trades only the user's trades).<br />
<br />
Each message is a JSON-encoded object, with at least "op" element. The "op" element contains the operation to be done (for outgoing messages), or the type of message (for incoming messages).<br />
<br />
===Possible outgoing commands===<br />
<br />
'''unsubscribe''' Stop receiving messages from a channel (parameter "channel")<br />
<br />
===Incoming Data===<br />
<br />
====Ticker====<br />
<source lang="javascript"><br />
{<br />
"channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f",<br />
"op":"private",<br />
"origin":"broadcast",<br />
"private":"ticker",<br />
"ticker":{<br />
"buy":0.9515,<br />
"high":1,<br />
"low":0.91,<br />
"sell":0.9697,<br />
"vol":34349<br />
}<br />
}<br />
</source><br />
<br />
'''ticker''' contains the following:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Name !! Value<br />
|-<br />
| buy || highest bid as float<br />
|-<br />
| sell || lowest ask as float<br />
|-<br />
| high || maximum rate since last close as float<br />
|-<br />
| low || minimum rate since last close as float<br />
|-<br />
| vol || traded volume since last close<br />
|}<br />
<br />
====Trade====<br />
<br />
<source lang="javascript">{<br />
"channel":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21",<br />
"op":"private",<br />
"origin":"broadcast",<br />
"private":"trade",<br />
"trade":{<br />
"amount":2.71,<br />
"amount_int":"271000000",<br />
"date":1310279340,<br />
"item":"BTC",<br />
"price":14.43,<br />
"price_currency":"USD",<br />
"price_int":"1443000",<br />
"tid":"1310279340877902",<br />
"trade_type":"bid",<br />
"type":"trade"<br />
}<br />
}<br />
</source><br />
<br />
'''trade''' contains the following:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Name !! Value<br />
|-<br />
| amount || the traded amount in item (BTC), float, deprecated<br />
|-<br />
| amount_int || the traded amount * 1E8<br />
|-<br />
| date || unix timestamp of trade<br />
|-<br />
| item || What was this trade about<br />
|-<br />
| price || price per unit, float, deprecated<br />
|-<br />
| price_int || price in smallest unit as integer (5 decimals of USD, 3 in case of JPY)<br />
|-<br />
| price_currency || currency in which trade was completed<br />
|-<br />
| tid || Trade id (big integer, which is in fact trade timestamp in microseconds)<br />
|-<br />
| trade_type || Did this trade result from the execution of a bid or a ask?<br />
|-<br />
|}<br />
<br />
====Depth====<br />
<br />
Changes to the market depth data are broadcast so an up-to-date market depth can be kept by clients.<br />
<br />
<source lang="javascript">{<br />
"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe",<br />
"depth":{<br />
"currency":"USD",<br />
"item":"BTC",<br />
"price":"14.43",<br />
"price_int":"1443000",<br />
"type":1,<br />
"type_str":"ask",<br />
"volume":"-2.71",<br />
"volume_int":"-271000000"<br />
},<br />
"op":"private",<br />
"origin":"broadcast",<br />
"private":"depth"<br />
}</source><br />
<br />
'''depth''' contains the following:<br />
<br />
:{| class="wikitable"<br />
|-<br />
! Name !! Value<br />
|-<br />
| currency || the currency affected<br />
|-<br />
| item || the item (BTC)<br />
|-<br />
| price || price as a float, deprecated<br />
|-<br />
| price_int || the price at which volume change happened (5 decimal for USD, 3 for JPY)<br />
|-<br />
| type || 1=ask, 2=bid. deprecated, use type_str<br />
|-<br />
| type_str || type of order at this depth, either "ask" or "bid"<br />
|-<br />
| volume || the volume change as float, deprecated<br />
|-<br />
| volume_int || volume change * 1E8<br />
<br />
|}<br />
<br />
=== examples ===<br />
<br />
==== ticker ====<br />
javascript, using hookio : <br />
<br />
http://www.youtube.com/watch?v=KD5ljtNK72U<br />
<br />
http://github.com/hookio<br />
<br />
http://github.com/cronopio/hook.io-mtgox<br />
<br />
<br />
<br />
Another node.js project, using plain websockets (largely based on cronopio's work) :<br />
<br />
https://github.com/dlanod/node-mtgox-websocket-client<br />
<br />
==== arbitrage ====<br />
https://github.com/goteppo/ArBit<br />
<br />
==== websocket ====<br />
https://github.com/cronopio/hook.io-ws<br />
<br />
https://github.com/dlanod/node-mtgox-websocket-client</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Help:Accounts_explained&diff=19028Help:Accounts explained2011-11-08T10:04:34Z<p>Dooglus: 'sendfrom' won't overdraw default account; 'sendtoaddress' may</p>
<hr />
<div>== Introduction ==<br />
<br />
You can have different [[address|addresses]] in order to receive payments. Think of addresses as multiple postboxes around the outside of your house. Bitcoin allows accounts too. Each account owns a bunch of addresses. Taking our earlier analogy, you can imagine separate accounts as different houses. You (Bitcoin user) receive all the mail (balance shown in Bitcoin). Mail goes to a postbox (address) at one of your houses (accounts).<br />
<br />
The balance you see displayed is a total from all your accounts.<br />
<br />
== Accounts ==<br />
<br />
Bitcoin version 0.3.18 and later implements several RPC methods to maintain separate account balances in a single Bitcoin wallet. The accounts feature makes it easy to create web services that maintain a separate bitcoin balance for each customer.<br />
<br />
== Account Names ==<br />
<br />
Accounts are named with arbitrary strings; you may use any [http://www.json.org/ JSON] string other than "*" (JSON strings are sent and returned as UTF-8 encoded Unicode).<br />
<br />
Bitcoin creates two accounts automatically: it implicitly creates a default account with the empty string as its name, and it explicitly creates an account named '''Your Address''' when a new wallet is created.<br />
<br />
== The Default Account ==<br />
<br />
The default account is named with the empty string ("" in JSON). Generated coins are always credited to the default account, and the ''sendtoaddress'' method always debits the default account.<br />
<br />
== Accounts and Receiving Addresses ==<br />
<br />
Each account is associated with zero or more receiving addresses, and every receiving address is associated with exactly one account. Coins sent to a receiving address in the wallet are credited to the associated account.<br />
<br />
Accounts are associated with receiving addresses by using the ''getaccountaddress'', ''getnewaddress'' or ''setaccount'' methods.<br />
<br />
''getaccountaddress'' will return the same address until coins are received on that address; once coins have been received, it will generate and return a new address.<br />
<br />
''getnewaddress'' always generates and returns a new address.<br />
<br />
''setaccount'' changes the account associated with an existing address. Coins previously received on that address (if any) will be debited from the previous account's balance and credited to the address' new account. Note that doing so may make the previous account's balance negative.<br />
<br />
Use the ''getaddressesbyaccount'' method to list all addresses associated with an account.<br />
<br />
== Sending ==<br />
<br />
The ''sendfrom'' method sends coins and debits the specified account. It does **not** change Bitcoin's algorithm for selecting which coins in the wallet are sent-- you should think of the coins in the wallet as being mixed together when they are received. There is no way to ask Bitcoin to "create a payment transaction using the coins received from these previously received transactions."<br />
<br />
The ''sendtoaddress'' method works like ''sendfrom'', but always debits the default account.<br />
<br />
The send will fail if the account has insufficient funds, with two exceptions:<br />
<br />
- 'sendtoaddress' always succeeds if there are sufficient funds in the<br />
server's wallet. For example, if your wallet account balances were 100 BTC in account<br />
'foo' and 0 BTC in the default account, then the balances after ''sendtoaddress<br />
15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC 10.00'' would be 100 in account 'foo' and -10.00 in<br />
the default account (and the overall server balance would go from 100 to 90 BTC). On<br />
the other hand, using 'sendfrom' to send from the default account with a zero balance<br />
will fail with message "Account has insufficient funds".<br />
<br />
- The check for sufficient funds is done before paying transaction fees (if any); if a<br />
[[transaction fee]] is needed, and there are sufficient funds in the wallet, then the<br />
transaction fee will be paid and debited from the account. For example, if account<br />
'foo' contains 10 bitcoins, you ''sendfrom foo 15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC 10'',<br />
and the transaction costs 0.01, 'foo's balance will be -0.01 bitcoins.<br />
<br />
== Account -> Account Transfers ==<br />
<br />
Use the ''move'' method to transfer balances from one account to another. Moves from the default account to any other account always succeed; moves from any other account will fail if the account has insufficient funds. Moves are not broadcast to the network, and never incur transaction fees; they just adjust account balances in the wallet.<br />
<br />
== Account Balance and History==<br />
<br />
The ''getbalance'' method returns the bitcoin balance for either the entire wallet (if no argument is given) or for a particular account.<br />
<br />
The ''listtransactions <account> [N]'' method returns the last N (default 10) transactions that affected the account's balance. "listtransactions '*' [N]" will return the last N transactions for all accounts.<br />
<br />
== Typical Uses ==<br />
<br />
This section describes how typical web site code running on a web server uses the JSON-RPC API to keep track of customers' accounts.<br />
* Customer '''creates an account''' on the website: web server either assigns them a unique customer id number or uses their email address or other unique identifier, calls ''getaccountaddress "userid"'' and tells the customer to send to that address to fund their account.<br />
* Customer '''receives coins''' to fund their account: web server isn't involved.<br />
* Customer is shown their '''current balance''': ''getbalance "userid" 6'' to get their 'confirmed' balance, and subtracts it from ''getbalance "userid" 0'' to get their 'unconfirmed' balance.<br />
* Show the customer an **itemized list** of transactions: ''listtransactions "userid"''<br />
* Customer '''sends coins''' to another bitcoin address: ''sendfrom "userid" <address> <amount>''<br />
* Customer '''transfers coins''' to another customer: ''move "userid1" "userid2" <amount>''<br />
* You '''make a sale''', paid for with bitcoins in the customer's account: ''move "userid" "" <amount> 6 "purchased item"'', and if it succeeds, send them the product.<br />
* Customer is '''charged a fee''' for use of the service: ''move "userid" "FEES" <amount>'' (using special accounts like "FEES" can make your application's logic much simpler)<br />
* Customer '''purchases bitcoins''' from you: ''move "AVAILABLE" "userid" <amount>'' (assuming the bitcoins you are selling are kept track of in an "AVAILABLE" account)<br />
<br />
[[Category:Technical]]<br />
[[Category:Developer]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Difficulty&diff=17791Difficulty2011-10-07T00:58:50Z<p>Dooglus: typo</p>
<hr />
<div>''See also: [[target]]''<br />
<br />
=== What is "difficulty"? ===<br />
<br />
Difficulty is a measure of how difficult it is to find a new [[block]] compared to the easiest it can ever be.<br />
<br />
=== How often does the difficulty change? ===<br />
<br />
Every 2016 [[block|blocks]].<br />
<br />
=== What is the formula for difficulty? ===<br />
<br />
difficulty = maximum_target / current_target <br />
<br />
(target is a 256 bit number)<br />
<br />
===How is difficulty stored in blocks?===<br />
<br />
Each block stores a packed representation (called "Bits") for its actual hexadecimal [[target]]. The target can be derived from it via a predefined formula. For example, if the packed target in the block is 0x1b0404cb, the hexadecimal target is<br />
0x0404cb * 2**(8*(0x1b - 3)) = 0x00000000000404CB000000000000000000000000000000000000000000000000<br />
<br />
Note that the 0x0404cb value is a signed value in this format. The largest legal value for this field is 0x7fffff. To make a larger value you must shift it down one full byte. Also 0x008000 is the smallest positive valid value.<br />
<br />
The highest possible target (difficulty 1) is defined as 0x1d00ffff, which gives us a hex target of<br />
0x00ffff * 2**(8*(0x1d - 3)) = 0x00000000FFFF0000000000000000000000000000000000000000000000000000<br />
<br />
So the difficulty at 0x1b0404cb is therefore:<br />
0x00000000FFFF0000000000000000000000000000000000000000000000000000 /<br />
0x00000000000404CB000000000000000000000000000000000000000000000000 <br />
= 16307.420938523983<br />
<br />
Here;s a fast way to calculate difficulty. It uses a modified taylor series for the logarithm (you can see tutorials on flipcode and wikipedia) and relies on logs to transform the difficulty calculation:<br />
<br />
<source lang="cpp"><br />
#include <iostream><br />
#include <cmath><br />
<br />
inline float fast_log(float val)<br />
{<br />
int * const exp_ptr = reinterpret_cast <int *>(&val);<br />
int x = *exp_ptr;<br />
const int log_2 = ((x >> 23) & 255) - 128;<br />
x &= ~(255 << 23);<br />
x += 127 << 23;<br />
*exp_ptr = x;<br />
<br />
val = ((-1.0f/3) * val + 2) * val - 2.0f/3;<br />
return ((val + log_2) * 0.69314718f);<br />
} <br />
<br />
float difficulty(unsigned int bits)<br />
{<br />
static double max_body = fast_log(0x00ffff), scaland = fast_log(256);<br />
return exp(max_body - fast_log(bits & 0x00ffffff) + scaland * (0x1d - ((bits & 0xff000000) >> 24)));<br />
}<br />
<br />
int main()<br />
{<br />
std::cout << difficulty(0x1b0404cb) << std::endl;<br />
return 0;<br />
}<br />
</source><br />
<br />
Unfortunately I don't have much use for it in libbitcoin. Maybe some miner will find it useful.<br />
<br />
To see the math to go from the normal difficulty calculations (which require large big ints bigger than the space in any normal integer) to the calculation above, here's some python:<br />
<br />
<source lang="python"><br />
import decimal, math<br />
l = math.log<br />
e = math.e<br />
<br />
print 0x00ffff * 2**(8*(0x1d - 3)) / float(0x0404cb * 2**(8*(0x1b - 3)))<br />
print l(0x00ffff * 2**(8*(0x1d - 3)) / float(0x0404cb * 2**(8*(0x1b - 3))))<br />
print l(0x00ffff * 2**(8*(0x1d - 3))) - l(0x0404cb * 2**(8*(0x1b - 3)))<br />
print l(0x00ffff) + l(2**(8*(0x1d - 3))) - l(0x0404cb) - l(2**(8*(0x1b - 3)))<br />
print l(0x00ffff) + (8*(0x1d - 3))*l(2) - l(0x0404cb) - (8*(0x1b - 3))*l(2)<br />
print l(0x00ffff / float(0x0404cb)) + (8*(0x1d - 3))*l(2) - (8*(0x1b - 3))*l(2)<br />
print l(0x00ffff / float(0x0404cb)) + (0x1d - 0x1b)*l(2**8)<br />
</source><br />
<br />
=== What is the current difficulty? ===<br />
[http://blockexplorer.com/q/getdifficulty Current difficulty], as output by BitCoin's getDifficulty.<br />
<br />
[http://blockexplorer.com/q/estimate Estimated next difficulty]<br />
<br />
[http://bitcoin.sipa.be Graphs]<br />
<br />
=== What is the maximum difficulty? ===<br />
<br />
There is no minimum target. The maximum difficulty is roughly: maximum_target / 1 (since 0 would result in infinity), which is a ridiculously huge number (about 2^224). <br />
<br />
The actual maximum difficulty is when current_target=0, but we would not be able to calculate the difficulty if that happened. (fortunately it never will, so we're ok.)<br />
<br />
=== Can the difficulty go down? ===<br />
Yes it can. See discussion in [[target]].<br />
<br />
=== What is the minimum difficulty? ===<br />
The minimum difficulty, when the target is at the maximum allowed value, is 1.<br />
<br />
=== What network hash rate results in a given difficulty? ===<br />
The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced. If they took less than two weeks, the difficulty is increased. The change in difficulty is in proportion to the amount of time over or under two weeks the previous 2016 blocks took to find.<br />
<br />
To find a block, the hash must be less than the target. The hash is effectively a random number between 0 and 2**256-1. The offset for difficulty 1 is<br />
0xffff * 2**208<br />
and for difficulty D is<br />
(0xffff * 2**208)/D<br />
<br />
The expected number of hashes we need to calculate to find a block with difficulty D is therefore<br />
D * 2**256 / (0xffff * 2**208)<br />
or just<br />
D * 2**48 / 0xffff<br />
<br />
The difficulty is set such that the previous 2016 blocks would have been found at the rate of one every 10 minutes, so we were calculating (D * 2**48 / 0xffff) hashes in 600 seconds. That means the hash rate of the network was<br />
D * 2**48 / 0xffff / 600<br />
over the previous 2016 blocks. Can be further simplified to<br />
D * 2**32 / 600<br />
without much loss of accuracy.<br />
<br />
At difficulty 1, that is around 7 Mhashes per second.<br />
<br />
At the time of writing, the difficulty is 22012.4941572, which means that over the previous set of 2016 blocks found the average network hash rate was<br />
22012.4941572 * 2**32 / 600 = around 157 Ghashes per second.<br />
<br />
=== How soon might I expect to generate a block? ===<br />
(The [https://www.bitcointalk.org/index.php?topic=1682.0 eternal question].)<br />
<br />
The average time to find a block can be approximated by calculating:<br />
time = difficulty * 2**32 / hashrate<br />
where difficulty is the current difficulty, hashrate is the number of hashes your miner calculates per second, and time is the average in seconds between the blocks you find.<br />
<br />
For example, using Python we calculate the average time to generate a block using a 1Ghash/s mining rig when the difficulty is 20000:<br />
$ python -c "print 20000 * 2**32 / 10**9 / 60 / 60.0"<br />
23.85<br />
and find that it takes just under 24 hours on average.<br />
<br />
* Any one grinding of the hash stands the same chance of "winning" as any other. The numbers game is how many attempts your hardware can make per second.<br />
* You need to know the difficulty (above) and your khash/sec rate (reported by the client).<br />
** [[Mining Hardware Comparison]] has some stats that may help you predict what you could get.<br />
* Visit a calculator or perform the maths yourself,<br />
** http://www.alloscomp.com/bitcoin/calculator.php<br />
* Remember it's just probability! There are no guarantees you will win every N days.<br />
<br />
==Related Links==<br />
<br />
* [http://btcserv.net/bitcoin/history/ Bitcoin Difficulty History]<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]<br />
<br />
[[pl:Trudność]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Help:FAQ&diff=14482Help:FAQ2011-08-09T18:59:23Z<p>Dooglus: /* Do I need to configure my firewall to run bitcoin? */ link testnet</p>
<hr />
<div>Here you will find answers to the most commonly asked questions.<br />
<br />
== General ==<br />
=== What are bitcoins? ===<br />
Bitcoins are the unit of currency of the Bitcoin system. A commonly used shorthand for this is “BTC” to refer to a price or amount (eg: “100 BTC”).<br />
A Bitcoin isn't tangible. It is just a number associated with a [[Address|Bitcoin Address]]. See also an [[Introduction|easy intro]] to bitcoin.<br />
<br />
=== How can I get Bitcoins? ===<br />
<br />
There are a variety of ways to acquire Bitcoins:<br />
<br />
* Accept Bitcoins as payment for goods or services.<br />
* There are several services where you can [[buying bitcoins|trade them]] for traditional currency.<br />
* Find a local trader on [http://tradebitcoin.com tradebitcoin] (or somewhere else) and trade with him in cash.<br />
* Create a new [[block]] (currently yields 50 Bitcoins).<br />
* Participate in a [[Pooled mining|mining pool]].<br />
<br />
=== Can I buy Bitcoins with Paypal? ===<br />
<br />
While it's possible to find an individual who wishes to sell Bitcoin to you via Paypal, (perhaps via [http://www.bitcoin-otc.com/ #bitcoin-otc] ) most major exchanges do not allow funding through Paypal. This is due to repeated cases where someone pays for Bitcoins with Paypal, receives their Bitcoins, and then fraudulently complains to Paypal that they never received their goods. Paypal too often sides with the fraudulent buyer in this case, and so exchangers no longer allow this method of funding.<br />
<br />
Buying Bitcoins from individuals with this method is still possible, but requires mutual trust. In this case, Bitcoin seller beware.<br />
<br />
=== Where can I find a forum of Bitcoin users? ===<br />
<br />
There is no longer an "official" forum for Bitcoin. The [[Bitcoin:Community_portal#Bitcoin_Community_Forums_on_various_platforms|Community Portal]] includes links to some forums.<br />
<br />
=== How are new Bitcoins created? ===<br />
<br />
[[File:total_bitcoins_over_time_graph.png|thumb|Number of bitcoins over time, assuming a perfect 10-minute interval.]]<br />
New coins are generated by a network node each time it finds the solution to a certain mathematical problem (i.e. creates a new [[block]]), which is difficult to perform and can demonstrate a [[proof of work]]. The reward for solving a block is [[controlled inflation|automatically adjusted]] so that in the first 4 years of the Bitcoin network, 10,500,000 BTC will be created. The amount is halved each 4 years, so it will be 5,250,000 over years 4-8, 2,625,000 over years 8-12 and so on. Thus the total number of coins will approach 21,000,000 BTC over time.<br />
<br />
Blocks should be generated every 10 minutes, on average. As the number of people who attempt to generate these new coins changes, the difficulty of creating new coins changes. This happens in a manner that is agreed upon in advance by the network as a whole, based upon the time taken to generate the previous 2016 blocks. The difficulty is therefore related to the average computing resources devoted to generate these new coins over the time it took to create these previous blocks. The likelihood of somebody creating a block is based on the calculation speed of the system that they are using compared to the aggregate calculation speed of all the other systems generating blocks on the network.<br />
<br />
=== What's the current total number of Bitcoins in existence? ===<br />
<br />
[http://blockexplorer.com/q/totalbc Current count]<br />
<br />
The number of blocks times the coin value of a block is the number of coins in existence. The coin value of a block is 50 BTC for each of the first 210,000 blocks, 25 BTC for the next 210,000 blocks, then 12.5 BTC, 6.25 BTC and so on.<br />
<br />
=== How divisible are Bitcoins? ===<br />
<br />
Technically, a Bitcoin can be divided down to 8 decimals using existing data structures, so 0.00000001 BTC is the smallest amount currently possible. Discussions about and ideas for ways to provide for even smaller quantities of Bitcoins may be created in the future if the need for them ever arises.<br />
<br />
=== What do I call the various denominations of Bitcoins? ===<br />
<br />
There is a lot of discussion about the naming of these fractions of Bitcoins. The leading candidates are:<br />
<br />
* 1 BTC = 1 Bitcoin<br />
* 0.01 BTC = 1 cBTC = 1 Centi-Bitcoin (also referred to as Bitcent)<br />
* 0.001 BTC = 1 mBTC = 1 Milli-Bitcoin (also referred to as mbit (pronounced em-bit) or millibit)<br />
* 0.000 001 BTC = 1 μBTC = 1 Micro-Bitcoin (also referred to as ubit (pronounced yu-bit) or microbit)<br />
<br />
The above follows the accepted international SI units for thousandths, millionths and billionths. There are many arguments against the special case of 0.01 BTC since it is unlikely to represent anything meaningful as the Bitcoin economy grows (it certainly won't be the equivalent of 0.01 USD, GBP or EUR). Equally, the inclusion of existing national currency denominations such as "cent", "nickel", "dime", "pence", "pound", "kopek" and so on are to be discouraged. This is a worldwide currency.<br />
<br />
One exception is the "satoshi" which is smallest denomination currently possible <br />
<br />
* 0.000 000 01 BTC = 1 Satoshi (pronounced sa-toh-shee)<br />
<br />
which is so named in honour of Satoshi Nakamoto the pseudonym of the inventor of Bitcoin.<br />
<br />
For an overview of all defined units of Bitcoin (including less common and niche units), see [[Units]].<br />
<br />
Further discussion on this topic can be found on the forums here:<br />
<br />
* [http://forum.bitcoin.org/index.php?topic=14438.msg195287#msg195287 We need names]<br />
* [http://forum.bitcoin.org/index.php?topic=8282.0 What to call 0.001 BTC]<br />
<br />
=== How does the halving work when the number gets really small? ===<br />
<br />
The reward will go from 0.00000001 BTC to 0. Then no more coins will likely be created. <br />
<br />
The calculation is done as a right bitwise shift of a 64-bit signed integer, which means it is divided by 2 and rounded down. The integer is equal to the value in BTC * 100,000,000. This is how all Bitcoin balances/values are stored internally.<br />
<br />
Keep in mind that using current rules this will take nearly 100 years before it becomes an issue and Bitcoins may change considerably before that happens.<br />
<br />
=== How long will it take to generate all the coins? ===<br />
<br />
The last block that will generate coins will be block #6,929,999. This should be generated around year 2140. Then the total number of coins in circulation will remain static at 20,999,999.9769 BTC.<br />
<br />
Even if the allowed precision is expanded from the current 8 decimals, the total BTC in circulation will always be slightly below 21 million (assuming everything else stays the same). For example, with 16 decimals of precision, the end total would be 20999999.999999999496 BTC.<br />
<br />
=== If no more coins are going to be generated, will more blocks be created? ===<br />
<br />
Absolutely! Even before the creation of coins ends, the use of [[transaction fee|transaction fees]] will likely make creating new blocks more valuable from the fees than the new coins being created. When coin generation ends, what will sustain the ability to use bitcoins will be these fees entirely. There will be blocks generated after block #6,929,999.<br />
<br />
=== But if no more coins are generated, what happens when Bitcoins are lost? Won't that be a problem? ===<br />
<br />
Because of the law of supply and demand, when fewer bitcoins are available the ones that are left will be in higher demand, and therefore will have a higher value. So, as Bitcoins are lost, the remaining bitcoins will increase in value to compensate. As the value of a bitcoin increases, the number of bitcoins required to purchase an item '''de'''creases. This is a [[Deflationary spiral|deflationary economic model]]. As the average transaction size reduces, transactions will probably be denominated in sub-units of a bitcoin such as millibitcoins ("Millies") or microbitcoins ("Mikes").<br />
<br />
The Bitcoin protocol uses a base unit of one hundred-millionth of a Bitcoin ("a Satoshi"), but unused bits are available in the protocol fields that could be used to denote even smaller subdivisions.<br />
<br />
=== If every transaction is broadcast via the network, does BitCoin scale? ===<br />
The Bitcoin protocol allows lightweight clients that can use Bitcoin without downloading the entire transaction history. As traffic grows and this becomes more critical, implementations of the concept will be developed. Full network nodes will at some point become a more specialized service.<br />
<br />
With some modifications to the software, full BitCoin nodes could easily keep up with both VISA and MasterCard combined, using only fairly modest hardware (a couple of racks of machines using todays hardware). It's worth noting that the MasterCard network is structured somewhat like BitCoin itself - as a peer to peer broadcast network.<br />
<br />
Learn more about [[Scalability]].<br />
<br />
==Economy==<br />
=== Where does the value of Bitcoin stem from? What backs up Bitcoin? ===<br />
Bitcoins have value because they are accepted as payment by many. See the [[Trade|list of Bitcoin-accepting sites]].<br />
<br />
When we say that a currency is backed up by gold, we mean that there's a promise in place that you can exchange the currency for gold. In a sense, you could say that Bitcoin is "backed up" by the price tags of merchants – a price tag is a promise to exchange goods for a specified amount of currency.<br />
<br />
It's a common misconception that Bitcoins gain their value from the cost of electricity required to generate them. Cost doesn't equal value – hiring 1,000 men to shovel a big hole in the ground may be costly, but not valuable. Also, even though scarcity is a critical requirement for a useful currency, it alone doesn't make anything valuable. For example, your fingerprints are scarce, but that doesn't mean they have any exchange value.<br />
<br />
=== What if someone bought up all the existing Bitcoins? ===<br />
What if somebody bought up all the gold in the world? Well, by attempting to buy it all, the buyer would just drive the prices up until he runs out of money.<br />
<br />
Not all Bitcoins are for sale. Just as with gold, no one can buy a Bitcoin that isn't available for sale.<br />
<br />
=== Won't Bitcoin's deflationary tendencies cause a deflationary spiral? ===<br />
See the article [[Deflationary spiral]].<br />
<br />
=== Doesn't Bitcoin unfairly benefit early adopters? ===<br />
Early adopters have a large number of bitcoins now because they took a risk and invested resources in an unproven technology. By so doing, they have helped Bitcoin become what it is now and what it will be in the future (hopefully, a ubiquitous decentralized digital currency). It is only fair they will reap the benefits of their successful investment.<br />
<br />
In any case, any bitcoin generated will probably change hands dozens of time as a medium of exchange, so the profit made from the initial distribution will be insignificant compared to the total commerce enabled by Bitcoin.<br />
<br />
=== Is Bitcoin a Ponzi scheme? ===<br />
In a Ponzi Scheme, the founders persuade investors that they’ll profit. Bitcoin does not make such a guarantee. There is no central entity, just individuals building an economy.<br />
<br />
A ponzi scheme is a zero sum game. Early adopters can only profit at the expense of late adopters. Bitcoin has possible win-win outcomes. Early adopters profit from the rise in value. Late adopters profit from the usefulness of a stable and widely accepted p2p currency.<br />
<br />
The fact that early adopters benefit more doesn't alone make anything a ponzi scheme. Apple stocks aren't ponzi even though the early investors got rich.<br />
<br />
=== Is Bitcoin a bubble? ===<br />
Yes, in the same way as the euro and dollar are. They only have value in exchange and no value in use. If everyone suddenly stopped accepting your dollars, euros or bitcoins, the "bubble" would burst and their value would drop to zero. But that is unlikely to happen: even in Somalia, where the government collapsed 20 years ago, [http://en.wikipedia.org/wiki/Somali_shilling Somali shillings] are still accepted as payment.<br />
<br />
==Sending and Receiving Payments==<br />
<br />
=== Why do I have to wait 10 minutes before I can spend money I received? ===<br />
<br />
10 minutes is the average time taken to find a block. It can be significantly more or less time than that depending on luck; 10 minutes is simply the average case. <br />
<br />
Blocks (shown as "confirmations" in the GUI) are how the BitCoin achieves consensus on who owns what. Once a block is found everyone agrees that you now own those coins, so you can spend them again. Until then it's possible that some network nodes believe otherwise, if somebody is attempting to defraud the system by reversing a transaction. The more confirmations a transaction has, the less risk there is of a reversal. Only 6 blocks or 1 hour is enough to make reversal computationally impractical. This is dramatically better than credit cards which can see chargebacks occur up to three months after the original transaction!<br />
<br />
Why ten minutes specifically? It is a tradeoff chosen by Satoshi between propagation time of new blocks in large networks and the amount of work wasted due to chain splits. If that made no sense to you, don't worry. Reading [http://www.bitcoin.org/bitcoin.pdf the technical paper] should make things clearer.<br />
<br />
=== Do you have to wait 10 minutes in order to buy or sell things with BitCoin? ===<br />
<br />
No, it's reasonable to sell things without waiting for a confirmation as long as the transaction is not of high value.<br />
<br />
When people ask this question they are usually thinking about applications like supermarkets or snack machines, as discussed in [http://www.bitcoin.org/smf/index.php?topic=423.msg3819#msg3819 this thread from July 2010]. Zero confirmation transactions still show up in the GUI, but you cannot spend them. You can however reason about the risk involved in assuming you ''will'' be able to spend them in future. In general, selling things that are fairly cheap (like snacks, digital downloads etc) for zero confirmations will not pose a problem if you are running a well connected node.<br />
<br />
=== I sent some bitcoins and they haven't arrived yet! Where are they? ===<br />
<br />
Don't panic! There are a number of reasons why your bitcoins might not show up yet, and a number of ways to diagnose them. First of all, check the current max block count by going [http://blockexplorer.com/q/getblockcount here] and comparing that to the number in the bottom right hand corner of your client. If these numbers are different by more than 1 or 2 then you need to wait for your block chain to download. If not, then it's possible that your transaction hasn't been included in a block yet. You can check pending transactions in the network by going [http://bitcoincharts.com/bitcoin/ here] and then searching for your address. If the transaction is listed here then it's a matter of waiting until it gets included in a block before it will show in your client. Bear in mind that if the transaction is based on a coin that was in a recent transaction then it will take longer to transfer e.g. someone just sent you a coin, if you send that again, it will take a while to transfer unless you put a large (0.01) fee on it. Transactions with 0 fees might take hours or days to be included in a block.<br />
<br />
=== Why does my Bitcoin address keep changing? ===<br />
<br />
Whenever the address listed in "Your address" receives a transaction, Bitcoin replaces it with a new address. This is meant to encourage you to use a new address for every transaction, which enhances [[anonymity]]. All of your old addresses are still usable: you can see them in ''Settings -> Your Receiving Addresses''.<br />
<br />
===How much will the transaction fee be?===<br />
<br />
Some transactions might require a [[transaction fee]] for them to get confirmed in a timely manner. The transaction fee is processed by and received by the bitcoin miner. The most recent version of the Bitcoin client will estimate an appropriate fee when a fee might be required.<br />
<br />
The fee is added to the payment amount. For example, if you are sending a 1.234 BTC payment and the client requires a 0.0005 BTC fee, then 1.2345 BTC will be subtracted from the wallet balance for the entire transaction and the address for where the payment was sent will receive a payment of 1.234 BTC.<br />
<br />
Because the fee is related to the amount of data that makes up the transaction and not to the amount of bitcoins being sent, the fee may seem extremely low (0.0005 BTC for a 1,000 BTC transfer) or unfairly high (0.004 BTC for a 0.02 BTC payment, or about 20%). If you are receiving tiny amounts (e.g., as small payments from a mining pool) then fees when sending will be higher than if your activity follows a more normal consumer or business transaction pattern.<br />
<br />
==Networking==<br />
=== Do I need to configure my firewall to run bitcoin? ===<br />
<br />
Bitcoin will connect to other nodes, usually on tcp port 8333. You will need to allow outgoing TCP connections to port 8333 if you want to allow your bitcoin client to connect to many nodes. Bitcoin will also try to connect to IRC (tcp port 6667) to meet other nodes to connect to. [[Testnet]] uses tcp port 18333 instead of 8333.<br />
<br />
If you want to restrict your firewall rules to a few ips and/or don't want to allow IRC connection, you can find stable nodes in the [[Fallback Nodes|fallback nodes list]]. If your provider blocks the common IRC ports, note that lfnet also listens on port 7777. Connecting to this alternate port currently requires either recompiling Bitcoin, or changing routing rules. For example, on Linux you can evade a port 6667 block by doing something like this:<br />
<br />
echo 173.246.103.92 irc.lfnet.org >> /etc/hosts<br />
iptables -t nat -A OUTPUT -p tcp --dest 173.246.103.92 --dport 6667 -j DNAT --to-destination :7777 -m comment --comment "bitcoind irc connection"<br />
<br />
=== How does the peer finding mechanism work? ===<br />
Bitcoin finds peers primarily by connecting to an IRC server (channel #bitcoin on irc.lfnet.org). If a connection to the IRC server cannot be established (like when connecting through TOR), an in-built node list will be used and the nodes will be queried for more node addresses.<br />
<br />
==Mining==<br />
===What is mining?===<br />
Mining is the process of spending computation power to find valid blocks and thus create new Bitcoins.<br />
<br />
Technically speaking, mining is the calculation of a [[hash]] of the a block header, which includes among other things a reference to the previous block, a hash of a set of transactions and a [[nonce]]. If the hash value is found to be less than the current [[target]] (which is inversely proportional to the [[difficulty]]), a new block is formed and the miner gets 50 newly generated Bitcoins. If the hash is not less than the current target, a new nonce is tried, and a new hash is calculated. This is done millions of times per second by each miner.<br />
<br />
===Why was the "Generate coin" option of the client software removed?===<br />
<br />
In the early days of Bitcoin, it was easy for anyone to find new blocks using standard CPUs. As more and more people started mining, the [[difficulty]] of finding new blocks has greatly increased to the point where the average time for a CPU to find a single block can be many years. The only cost-effective method of mining is using a high-end graphics card with special software (see also [[Why a GPU mines faster than a CPU]]) and/or joining a [[Bitcoin Pool|mining pool]]. Since solo CPU mining is essentially useless, it was removed from the GUI of the Bitcoin software.<br />
<br />
===Is mining used for some useful computation?===<br />
The computations done when mining are internal to Bitcoin and not related to any other distributed computing projects. They serve the purpose of securing the Bitcoin network, which is useful.<br />
<br />
===Is it not a waste of energy?===<br />
Spending energy on creating a free monetary system is hardly a waste. Also, services necessary for the operation of currently widespread monetary systems, such as banks and credit card companies, also spend energy, arguably more than Bitcoin would.<br />
<br />
===Why don't we use calculations that are also useful for some other purpose?===<br />
To provide security for the Bitcoin network, the calculations involved need to have some very specific features. These features are incompatible with leveraging the computation for other purposes.<br />
<br />
===How does the proof-of-work system help secure Bitcoin?===<br />
To give a general idea of the mining process, imagine this setup:<br />
<br />
payload = <some data related to things happening on the Bitcoin network><br />
nonce = 1<br />
hash = [http://en.wikipedia.org/wiki/SHA2 SHA2]( [http://en.wikipedia.org/wiki/SHA2 SHA2]( payload + nonce ) )<br />
<br />
The work performed by a miner consists of repeatedly increasing "nonce" until<br />
the hash function yields a value, that has the rare property of being below a certain<br />
target threshold. (In other words: The hash "starts with a certain number of zeroes",<br />
if you display it in the fixed-length representation, that is typically used.)<br />
<br />
As can be seen, the mining process doesn't compute anything special. It merely<br />
tries to find a number (also referred to as nonce) which - in combination with the payload -<br />
results in a hash with special properties.<br />
<br />
The advantage of using such a mechanism consists of the fact, that it is very easy to check a result: Given<br />
the payload and a specific nonce, only a single call of the hashing function<br />
is needed to verify that the hash has the required properties. Since there is no<br />
known way to find these hashes other than brute force, this can be used as a "proof of work"<br />
that someone invested a lot of computing power to find the correct nonce for this payload.<br />
<br />
This feature is then used in the Bitcoin network to secure various aspects. An attacker<br />
that wants to introduce malicious payload data into the network, will need to do the<br />
required proof of work before it will be accepted. And as long as honest miners have more<br />
computing power, they can always outpace an attacker.<br />
<br />
Also see [http://en.wikipedia.org/wiki/SHA2 SHA2] and [http://en.wikipedia.org/wiki/Proof-of-work_system Proof-of-work system] on Wikipedia.<br />
<br />
==Help==<br />
===I'd like to learn more. Where can I get help?===<br />
<br />
* Read the [[Introduction|introduction to bitcoin]] <br />
* See the videos, podcasts, and blog posts from the [[Press]]<br />
* Read and post on the [[Bitcoin:Community_portal#Bitcoin_Community_Forums|forums]]<br />
* Chat on one of the [[Bitcoin:Community_portal#IRC_Chat|Bitcoin IRC]] channels<br />
* Listen to [http://omegataupodcast.net/2011/03/59-bitcoin-a-digital-decentralized-currency/ this podcast], which goes into the details of how bitcoin works<br />
<br />
==See Also==<br />
<br />
* [[Man page]]<br />
* [[Introduction]]<br />
<br />
[[de:FAQ]]<br />
[[zh-cn:FAQ]]<br />
[[fr:FAQ]]<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Help:FAQ&diff=14481Help:FAQ2011-08-09T18:58:35Z<p>Dooglus: /* Do I need to configure my firewall to run bitcoin? */ show testnet port</p>
<hr />
<div>Here you will find answers to the most commonly asked questions.<br />
<br />
== General ==<br />
=== What are bitcoins? ===<br />
Bitcoins are the unit of currency of the Bitcoin system. A commonly used shorthand for this is “BTC” to refer to a price or amount (eg: “100 BTC”).<br />
A Bitcoin isn't tangible. It is just a number associated with a [[Address|Bitcoin Address]]. See also an [[Introduction|easy intro]] to bitcoin.<br />
<br />
=== How can I get Bitcoins? ===<br />
<br />
There are a variety of ways to acquire Bitcoins:<br />
<br />
* Accept Bitcoins as payment for goods or services.<br />
* There are several services where you can [[buying bitcoins|trade them]] for traditional currency.<br />
* Find a local trader on [http://tradebitcoin.com tradebitcoin] (or somewhere else) and trade with him in cash.<br />
* Create a new [[block]] (currently yields 50 Bitcoins).<br />
* Participate in a [[Pooled mining|mining pool]].<br />
<br />
=== Can I buy Bitcoins with Paypal? ===<br />
<br />
While it's possible to find an individual who wishes to sell Bitcoin to you via Paypal, (perhaps via [http://www.bitcoin-otc.com/ #bitcoin-otc] ) most major exchanges do not allow funding through Paypal. This is due to repeated cases where someone pays for Bitcoins with Paypal, receives their Bitcoins, and then fraudulently complains to Paypal that they never received their goods. Paypal too often sides with the fraudulent buyer in this case, and so exchangers no longer allow this method of funding.<br />
<br />
Buying Bitcoins from individuals with this method is still possible, but requires mutual trust. In this case, Bitcoin seller beware.<br />
<br />
=== Where can I find a forum of Bitcoin users? ===<br />
<br />
There is no longer an "official" forum for Bitcoin. The [[Bitcoin:Community_portal#Bitcoin_Community_Forums_on_various_platforms|Community Portal]] includes links to some forums.<br />
<br />
=== How are new Bitcoins created? ===<br />
<br />
[[File:total_bitcoins_over_time_graph.png|thumb|Number of bitcoins over time, assuming a perfect 10-minute interval.]]<br />
New coins are generated by a network node each time it finds the solution to a certain mathematical problem (i.e. creates a new [[block]]), which is difficult to perform and can demonstrate a [[proof of work]]. The reward for solving a block is [[controlled inflation|automatically adjusted]] so that in the first 4 years of the Bitcoin network, 10,500,000 BTC will be created. The amount is halved each 4 years, so it will be 5,250,000 over years 4-8, 2,625,000 over years 8-12 and so on. Thus the total number of coins will approach 21,000,000 BTC over time.<br />
<br />
Blocks should be generated every 10 minutes, on average. As the number of people who attempt to generate these new coins changes, the difficulty of creating new coins changes. This happens in a manner that is agreed upon in advance by the network as a whole, based upon the time taken to generate the previous 2016 blocks. The difficulty is therefore related to the average computing resources devoted to generate these new coins over the time it took to create these previous blocks. The likelihood of somebody creating a block is based on the calculation speed of the system that they are using compared to the aggregate calculation speed of all the other systems generating blocks on the network.<br />
<br />
=== What's the current total number of Bitcoins in existence? ===<br />
<br />
[http://blockexplorer.com/q/totalbc Current count]<br />
<br />
The number of blocks times the coin value of a block is the number of coins in existence. The coin value of a block is 50 BTC for each of the first 210,000 blocks, 25 BTC for the next 210,000 blocks, then 12.5 BTC, 6.25 BTC and so on.<br />
<br />
=== How divisible are Bitcoins? ===<br />
<br />
Technically, a Bitcoin can be divided down to 8 decimals using existing data structures, so 0.00000001 BTC is the smallest amount currently possible. Discussions about and ideas for ways to provide for even smaller quantities of Bitcoins may be created in the future if the need for them ever arises.<br />
<br />
=== What do I call the various denominations of Bitcoins? ===<br />
<br />
There is a lot of discussion about the naming of these fractions of Bitcoins. The leading candidates are:<br />
<br />
* 1 BTC = 1 Bitcoin<br />
* 0.01 BTC = 1 cBTC = 1 Centi-Bitcoin (also referred to as Bitcent)<br />
* 0.001 BTC = 1 mBTC = 1 Milli-Bitcoin (also referred to as mbit (pronounced em-bit) or millibit)<br />
* 0.000 001 BTC = 1 μBTC = 1 Micro-Bitcoin (also referred to as ubit (pronounced yu-bit) or microbit)<br />
<br />
The above follows the accepted international SI units for thousandths, millionths and billionths. There are many arguments against the special case of 0.01 BTC since it is unlikely to represent anything meaningful as the Bitcoin economy grows (it certainly won't be the equivalent of 0.01 USD, GBP or EUR). Equally, the inclusion of existing national currency denominations such as "cent", "nickel", "dime", "pence", "pound", "kopek" and so on are to be discouraged. This is a worldwide currency.<br />
<br />
One exception is the "satoshi" which is smallest denomination currently possible <br />
<br />
* 0.000 000 01 BTC = 1 Satoshi (pronounced sa-toh-shee)<br />
<br />
which is so named in honour of Satoshi Nakamoto the pseudonym of the inventor of Bitcoin.<br />
<br />
For an overview of all defined units of Bitcoin (including less common and niche units), see [[Units]].<br />
<br />
Further discussion on this topic can be found on the forums here:<br />
<br />
* [http://forum.bitcoin.org/index.php?topic=14438.msg195287#msg195287 We need names]<br />
* [http://forum.bitcoin.org/index.php?topic=8282.0 What to call 0.001 BTC]<br />
<br />
=== How does the halving work when the number gets really small? ===<br />
<br />
The reward will go from 0.00000001 BTC to 0. Then no more coins will likely be created. <br />
<br />
The calculation is done as a right bitwise shift of a 64-bit signed integer, which means it is divided by 2 and rounded down. The integer is equal to the value in BTC * 100,000,000. This is how all Bitcoin balances/values are stored internally.<br />
<br />
Keep in mind that using current rules this will take nearly 100 years before it becomes an issue and Bitcoins may change considerably before that happens.<br />
<br />
=== How long will it take to generate all the coins? ===<br />
<br />
The last block that will generate coins will be block #6,929,999. This should be generated around year 2140. Then the total number of coins in circulation will remain static at 20,999,999.9769 BTC.<br />
<br />
Even if the allowed precision is expanded from the current 8 decimals, the total BTC in circulation will always be slightly below 21 million (assuming everything else stays the same). For example, with 16 decimals of precision, the end total would be 20999999.999999999496 BTC.<br />
<br />
=== If no more coins are going to be generated, will more blocks be created? ===<br />
<br />
Absolutely! Even before the creation of coins ends, the use of [[transaction fee|transaction fees]] will likely make creating new blocks more valuable from the fees than the new coins being created. When coin generation ends, what will sustain the ability to use bitcoins will be these fees entirely. There will be blocks generated after block #6,929,999.<br />
<br />
=== But if no more coins are generated, what happens when Bitcoins are lost? Won't that be a problem? ===<br />
<br />
Because of the law of supply and demand, when fewer bitcoins are available the ones that are left will be in higher demand, and therefore will have a higher value. So, as Bitcoins are lost, the remaining bitcoins will increase in value to compensate. As the value of a bitcoin increases, the number of bitcoins required to purchase an item '''de'''creases. This is a [[Deflationary spiral|deflationary economic model]]. As the average transaction size reduces, transactions will probably be denominated in sub-units of a bitcoin such as millibitcoins ("Millies") or microbitcoins ("Mikes").<br />
<br />
The Bitcoin protocol uses a base unit of one hundred-millionth of a Bitcoin ("a Satoshi"), but unused bits are available in the protocol fields that could be used to denote even smaller subdivisions.<br />
<br />
=== If every transaction is broadcast via the network, does BitCoin scale? ===<br />
The Bitcoin protocol allows lightweight clients that can use Bitcoin without downloading the entire transaction history. As traffic grows and this becomes more critical, implementations of the concept will be developed. Full network nodes will at some point become a more specialized service.<br />
<br />
With some modifications to the software, full BitCoin nodes could easily keep up with both VISA and MasterCard combined, using only fairly modest hardware (a couple of racks of machines using todays hardware). It's worth noting that the MasterCard network is structured somewhat like BitCoin itself - as a peer to peer broadcast network.<br />
<br />
Learn more about [[Scalability]].<br />
<br />
==Economy==<br />
=== Where does the value of Bitcoin stem from? What backs up Bitcoin? ===<br />
Bitcoins have value because they are accepted as payment by many. See the [[Trade|list of Bitcoin-accepting sites]].<br />
<br />
When we say that a currency is backed up by gold, we mean that there's a promise in place that you can exchange the currency for gold. In a sense, you could say that Bitcoin is "backed up" by the price tags of merchants – a price tag is a promise to exchange goods for a specified amount of currency.<br />
<br />
It's a common misconception that Bitcoins gain their value from the cost of electricity required to generate them. Cost doesn't equal value – hiring 1,000 men to shovel a big hole in the ground may be costly, but not valuable. Also, even though scarcity is a critical requirement for a useful currency, it alone doesn't make anything valuable. For example, your fingerprints are scarce, but that doesn't mean they have any exchange value.<br />
<br />
=== What if someone bought up all the existing Bitcoins? ===<br />
What if somebody bought up all the gold in the world? Well, by attempting to buy it all, the buyer would just drive the prices up until he runs out of money.<br />
<br />
Not all Bitcoins are for sale. Just as with gold, no one can buy a Bitcoin that isn't available for sale.<br />
<br />
=== Won't Bitcoin's deflationary tendencies cause a deflationary spiral? ===<br />
See the article [[Deflationary spiral]].<br />
<br />
=== Doesn't Bitcoin unfairly benefit early adopters? ===<br />
Early adopters have a large number of bitcoins now because they took a risk and invested resources in an unproven technology. By so doing, they have helped Bitcoin become what it is now and what it will be in the future (hopefully, a ubiquitous decentralized digital currency). It is only fair they will reap the benefits of their successful investment.<br />
<br />
In any case, any bitcoin generated will probably change hands dozens of time as a medium of exchange, so the profit made from the initial distribution will be insignificant compared to the total commerce enabled by Bitcoin.<br />
<br />
=== Is Bitcoin a Ponzi scheme? ===<br />
In a Ponzi Scheme, the founders persuade investors that they’ll profit. Bitcoin does not make such a guarantee. There is no central entity, just individuals building an economy.<br />
<br />
A ponzi scheme is a zero sum game. Early adopters can only profit at the expense of late adopters. Bitcoin has possible win-win outcomes. Early adopters profit from the rise in value. Late adopters profit from the usefulness of a stable and widely accepted p2p currency.<br />
<br />
The fact that early adopters benefit more doesn't alone make anything a ponzi scheme. Apple stocks aren't ponzi even though the early investors got rich.<br />
<br />
=== Is Bitcoin a bubble? ===<br />
Yes, in the same way as the euro and dollar are. They only have value in exchange and no value in use. If everyone suddenly stopped accepting your dollars, euros or bitcoins, the "bubble" would burst and their value would drop to zero. But that is unlikely to happen: even in Somalia, where the government collapsed 20 years ago, [http://en.wikipedia.org/wiki/Somali_shilling Somali shillings] are still accepted as payment.<br />
<br />
==Sending and Receiving Payments==<br />
<br />
=== Why do I have to wait 10 minutes before I can spend money I received? ===<br />
<br />
10 minutes is the average time taken to find a block. It can be significantly more or less time than that depending on luck; 10 minutes is simply the average case. <br />
<br />
Blocks (shown as "confirmations" in the GUI) are how the BitCoin achieves consensus on who owns what. Once a block is found everyone agrees that you now own those coins, so you can spend them again. Until then it's possible that some network nodes believe otherwise, if somebody is attempting to defraud the system by reversing a transaction. The more confirmations a transaction has, the less risk there is of a reversal. Only 6 blocks or 1 hour is enough to make reversal computationally impractical. This is dramatically better than credit cards which can see chargebacks occur up to three months after the original transaction!<br />
<br />
Why ten minutes specifically? It is a tradeoff chosen by Satoshi between propagation time of new blocks in large networks and the amount of work wasted due to chain splits. If that made no sense to you, don't worry. Reading [http://www.bitcoin.org/bitcoin.pdf the technical paper] should make things clearer.<br />
<br />
=== Do you have to wait 10 minutes in order to buy or sell things with BitCoin? ===<br />
<br />
No, it's reasonable to sell things without waiting for a confirmation as long as the transaction is not of high value.<br />
<br />
When people ask this question they are usually thinking about applications like supermarkets or snack machines, as discussed in [http://www.bitcoin.org/smf/index.php?topic=423.msg3819#msg3819 this thread from July 2010]. Zero confirmation transactions still show up in the GUI, but you cannot spend them. You can however reason about the risk involved in assuming you ''will'' be able to spend them in future. In general, selling things that are fairly cheap (like snacks, digital downloads etc) for zero confirmations will not pose a problem if you are running a well connected node.<br />
<br />
=== I sent some bitcoins and they haven't arrived yet! Where are they? ===<br />
<br />
Don't panic! There are a number of reasons why your bitcoins might not show up yet, and a number of ways to diagnose them. First of all, check the current max block count by going [http://blockexplorer.com/q/getblockcount here] and comparing that to the number in the bottom right hand corner of your client. If these numbers are different by more than 1 or 2 then you need to wait for your block chain to download. If not, then it's possible that your transaction hasn't been included in a block yet. You can check pending transactions in the network by going [http://bitcoincharts.com/bitcoin/ here] and then searching for your address. If the transaction is listed here then it's a matter of waiting until it gets included in a block before it will show in your client. Bear in mind that if the transaction is based on a coin that was in a recent transaction then it will take longer to transfer e.g. someone just sent you a coin, if you send that again, it will take a while to transfer unless you put a large (0.01) fee on it. Transactions with 0 fees might take hours or days to be included in a block.<br />
<br />
=== Why does my Bitcoin address keep changing? ===<br />
<br />
Whenever the address listed in "Your address" receives a transaction, Bitcoin replaces it with a new address. This is meant to encourage you to use a new address for every transaction, which enhances [[anonymity]]. All of your old addresses are still usable: you can see them in ''Settings -> Your Receiving Addresses''.<br />
<br />
===How much will the transaction fee be?===<br />
<br />
Some transactions might require a [[transaction fee]] for them to get confirmed in a timely manner. The transaction fee is processed by and received by the bitcoin miner. The most recent version of the Bitcoin client will estimate an appropriate fee when a fee might be required.<br />
<br />
The fee is added to the payment amount. For example, if you are sending a 1.234 BTC payment and the client requires a 0.0005 BTC fee, then 1.2345 BTC will be subtracted from the wallet balance for the entire transaction and the address for where the payment was sent will receive a payment of 1.234 BTC.<br />
<br />
Because the fee is related to the amount of data that makes up the transaction and not to the amount of bitcoins being sent, the fee may seem extremely low (0.0005 BTC for a 1,000 BTC transfer) or unfairly high (0.004 BTC for a 0.02 BTC payment, or about 20%). If you are receiving tiny amounts (e.g., as small payments from a mining pool) then fees when sending will be higher than if your activity follows a more normal consumer or business transaction pattern.<br />
<br />
==Networking==<br />
=== Do I need to configure my firewall to run bitcoin? ===<br />
<br />
Bitcoin will connect to other nodes, usually on tcp port 8333. You will need to allow outgoing TCP connections to port 8333 if you want to allow your bitcoin client to connect to many nodes. Bitcoin will also try to connect to IRC (tcp port 6667) to meet other nodes to connect to. Testnet uses tcp port 18333 instead of 8333.<br />
<br />
If you want to restrict your firewall rules to a few ips and/or don't want to allow IRC connection, you can find stable nodes in the [[Fallback Nodes|fallback nodes list]]. If your provider blocks the common IRC ports, note that lfnet also listens on port 7777. Connecting to this alternate port currently requires either recompiling Bitcoin, or changing routing rules. For example, on Linux you can evade a port 6667 block by doing something like this:<br />
<br />
echo 173.246.103.92 irc.lfnet.org >> /etc/hosts<br />
iptables -t nat -A OUTPUT -p tcp --dest 173.246.103.92 --dport 6667 -j DNAT --to-destination :7777 -m comment --comment "bitcoind irc connection"<br />
<br />
=== How does the peer finding mechanism work? ===<br />
Bitcoin finds peers primarily by connecting to an IRC server (channel #bitcoin on irc.lfnet.org). If a connection to the IRC server cannot be established (like when connecting through TOR), an in-built node list will be used and the nodes will be queried for more node addresses.<br />
<br />
==Mining==<br />
===What is mining?===<br />
Mining is the process of spending computation power to find valid blocks and thus create new Bitcoins.<br />
<br />
Technically speaking, mining is the calculation of a [[hash]] of the a block header, which includes among other things a reference to the previous block, a hash of a set of transactions and a [[nonce]]. If the hash value is found to be less than the current [[target]] (which is inversely proportional to the [[difficulty]]), a new block is formed and the miner gets 50 newly generated Bitcoins. If the hash is not less than the current target, a new nonce is tried, and a new hash is calculated. This is done millions of times per second by each miner.<br />
<br />
===Why was the "Generate coin" option of the client software removed?===<br />
<br />
In the early days of Bitcoin, it was easy for anyone to find new blocks using standard CPUs. As more and more people started mining, the [[difficulty]] of finding new blocks has greatly increased to the point where the average time for a CPU to find a single block can be many years. The only cost-effective method of mining is using a high-end graphics card with special software (see also [[Why a GPU mines faster than a CPU]]) and/or joining a [[Bitcoin Pool|mining pool]]. Since solo CPU mining is essentially useless, it was removed from the GUI of the Bitcoin software.<br />
<br />
===Is mining used for some useful computation?===<br />
The computations done when mining are internal to Bitcoin and not related to any other distributed computing projects. They serve the purpose of securing the Bitcoin network, which is useful.<br />
<br />
===Is it not a waste of energy?===<br />
Spending energy on creating a free monetary system is hardly a waste. Also, services necessary for the operation of currently widespread monetary systems, such as banks and credit card companies, also spend energy, arguably more than Bitcoin would.<br />
<br />
===Why don't we use calculations that are also useful for some other purpose?===<br />
To provide security for the Bitcoin network, the calculations involved need to have some very specific features. These features are incompatible with leveraging the computation for other purposes.<br />
<br />
===How does the proof-of-work system help secure Bitcoin?===<br />
To give a general idea of the mining process, imagine this setup:<br />
<br />
payload = <some data related to things happening on the Bitcoin network><br />
nonce = 1<br />
hash = [http://en.wikipedia.org/wiki/SHA2 SHA2]( [http://en.wikipedia.org/wiki/SHA2 SHA2]( payload + nonce ) )<br />
<br />
The work performed by a miner consists of repeatedly increasing "nonce" until<br />
the hash function yields a value, that has the rare property of being below a certain<br />
target threshold. (In other words: The hash "starts with a certain number of zeroes",<br />
if you display it in the fixed-length representation, that is typically used.)<br />
<br />
As can be seen, the mining process doesn't compute anything special. It merely<br />
tries to find a number (also referred to as nonce) which - in combination with the payload -<br />
results in a hash with special properties.<br />
<br />
The advantage of using such a mechanism consists of the fact, that it is very easy to check a result: Given<br />
the payload and a specific nonce, only a single call of the hashing function<br />
is needed to verify that the hash has the required properties. Since there is no<br />
known way to find these hashes other than brute force, this can be used as a "proof of work"<br />
that someone invested a lot of computing power to find the correct nonce for this payload.<br />
<br />
This feature is then used in the Bitcoin network to secure various aspects. An attacker<br />
that wants to introduce malicious payload data into the network, will need to do the<br />
required proof of work before it will be accepted. And as long as honest miners have more<br />
computing power, they can always outpace an attacker.<br />
<br />
Also see [http://en.wikipedia.org/wiki/SHA2 SHA2] and [http://en.wikipedia.org/wiki/Proof-of-work_system Proof-of-work system] on Wikipedia.<br />
<br />
==Help==<br />
===I'd like to learn more. Where can I get help?===<br />
<br />
* Read the [[Introduction|introduction to bitcoin]] <br />
* See the videos, podcasts, and blog posts from the [[Press]]<br />
* Read and post on the [[Bitcoin:Community_portal#Bitcoin_Community_Forums|forums]]<br />
* Chat on one of the [[Bitcoin:Community_portal#IRC_Chat|Bitcoin IRC]] channels<br />
* Listen to [http://omegataupodcast.net/2011/03/59-bitcoin-a-digital-decentralized-currency/ this podcast], which goes into the details of how bitcoin works<br />
<br />
==See Also==<br />
<br />
* [[Man page]]<br />
* [[Introduction]]<br />
<br />
[[de:FAQ]]<br />
[[zh-cn:FAQ]]<br />
[[fr:FAQ]]<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Miner_fees&diff=12175Miner fees2011-07-01T00:57:30Z<p>Dooglus: /* Technical info */ confirm priority threshold</p>
<hr />
<div>[[File:fee.png|thumb|Receiving a transaction fee of 0.44 BC]]<br />
Transaction fees may be included with any transfer of bitcoins from one address to another. At the moment, many [[transactions]] are typically processed in a way where no fee is expected at all, but for transactions which draw coins from many bitcoin addresses and therefore have a large data size, a small transaction fee is usually expected.<br />
<br />
The transaction fee is processed by and received by the bitcoin miner. When a new bitcoin block is generated with a successful hash, the information for all of the transactions is included with the block and all transaction fees are collected by that user creating the block, who is free to assign those fees to himself.<br />
<br />
Transaction fees are voluntary on the part of the person making the bitcoin transaction, as the person attempting to make a transaction can include any fee or none at all in the transaction. On the other hand, nobody mining new bitcoins necessarily needs to accept the transactions and include them in the new block being created. The transaction fee is therefore an incentive on the part of the bitcoin user to make sure that a particular transaction will get included into the next block which is generated.<br />
<br />
It is envisioned that over time the cumulative effect of collecting transaction fees will allow somebody creating new blocks to "earn" more bitcoins than will be mined from new bitcoins created by the new block itself. This is also an incentive to keep trying to create new blocks even if the value of the newly created block from the mining activity is zero in the far future.<br />
<br />
It works like this:<br />
* Whoever sends the transaction is often able to guess an appropriate fee based on their own fee rules. The [[Original Bitcoin client|original client]] will always assess the transaction, and if a fee will typically be expected, it will not allow you to send the transaction without the calculated fee.<br />
* The user is prompted to confirm the fee before the transaction is sent.<br />
* The sender makes a transaction with more coins in the ''In'' portion than the ''Out'' portion so that there are “leftovers” not assigned to any address.<br />
* Whoever ends up publishing the [[block]] which contains this transaction will take these (and any other) leftover coins. They are included with their normal generated coins and is an extra bonus for creating the block.<br />
* If a generating node receives a transaction that should include a transaction fee but doesn't, they may refuse to include it in their blocks. It might be included in a later block if someone is willing to accept it. Generators can't force a certain fee on transactions -- they can only accept or reject the transaction's “fee offer”.<br />
[[File:lfm_fee.png|thumb|This balance is made entirely of 0.01 BTC cents. Since sending them requires a lot of data, a very large fee is required.]]<br />
<br />
Different bitcoin clients and different versions have different rules for determining which transactions to accept and how large of a fee to send.<br />
<br />
Current default rules for the original Bitcoin client (Bitcoin 0.3.20)<br />
* 0.01 BTC fee if sending any transaction less than 0.01 BTC. This is to help prevent DoS attacks against the network. Remember: fees are not network-enforced, so it's still ''possible'' to send these small transactions without the fee -- you just have to generate the blocks that contain them yourself (after modifying Bitcoin).<br />
* 0.01 BTC fee per kilobyte of transaction, but:<br />
** If the blocksize (size of all transactions currently waiting to be included in a block) is less than 27 kB, transactions are free.<br />
** If the blocksize is more than 250 kB, transactions get increasingly more expensive as the blocksize approaches the limit of 500 kB. Sending a transaction when the blocksize is 400 kB will cost 5 times the normal amount; sending when it's 499 kB will cost 500x, etc.<br />
* Transactions within each fee tier are prioritized based on several factors. Most importantly, a transaction has more priority if the coins it is using have a lot of confirmations. Someone spamming the network will almost certainly be re-using the same coins, which will lower the priority of their transactions. Priority is also increased for transactions with more BTC, and reduced for transactions with more data.<br />
* If the blocksize is over 4kB, free transactions in the above rules are only allowed if the transaction's priority is above a certain level.<br />
<br />
Note that if you want to send a transaction with less than the default rules, or if you are a miner and want to include them in your blocks, you may need to peer with the [[Free transaction relay policy|Free transaction relay network]].<br />
<br />
An advantage for bitcoin users to include a transaction fee is that the likelihood of getting a transaction included into the next block is going to be higher than if a transaction fee is not included. This is a trade off of time vs. money put forward on the transaction fees, as you can be patient with a low or non-existent fee included in a transaction, or you can make sure that the transaction is processed immediately by including a higher fee than is typical.<br />
<br />
The rules are far from set in stone, and the network can support many different rules simultaneously. If there are 10 generating nodes that never require a transaction fee and your client is modified to never send any transaction fee, then your transactions will eventually be picked up by one of those free nodes when they generate a block, though it will probably take a very long time. In the far future, different rules about transaction fees among generating nodes will probably create a clear choice between fees and transaction speed. For example, you might choose to spend 2% for a guaranteed spot in the next block or 0.01% for the transaction to be sent in a few hours.<br />
<br />
As an example, clients that have block generation turned off don't know what the current blocksize is, and will therefore never pay a fee on transactions under 10 kilobytes. If you notice that your sent transactions take a very long time to accrue confirmations, this is possibly the cause. If this happens a lot (probably because the network is under attack), run Bitcoin with the -paytxfee switch: -paytxfee=0.01 will force a minimum fee of 0.01 per kilobyte for all sent transactions, which will prioritize your transactions over all free transactions.<br />
[[File:feesend.png|thumb|Sending a transaction when the sender doesn't have enough money to actually pay the fee]]<br />
<br />
ArtForz, who makes up a large percentage of the network's CPU power, never charged transaction fees (even for micro-transactions) for a period of several months.<br />
<br />
==Technical info==<br />
<br />
Transaction priority is calculated as a value-weighted sum of input age, divided by transaction size in bytes:<br />
priority = sum(input_value_in_base_units * input_age)/size_in_bytes<br />
Transactions need to have a priority of above 57,600,000 to avoid the enforced limit (as of client version 0.3.21). This threshold is written in the code as COIN * 144 / 250, suggesting that the threshold represents a one day old, 1 btc coin (144 is the expected number of blocks per day) and a transaction size of 250 bytes.<br />
<br />
So, for example, a transaction that has 2 inputs, one of 5 btc with 10 confirmations, and one of 2 btc with 3 confirmations, and has a size of 500bytes, will have a priority of<br />
(500000000 * 10 + 200000000 * 3) / 500 = 11,800,000<br />
<br />
==See Also==<br />
<br />
* [[Free transaction relay policy]]<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]<br />
[[Category:Mining]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Satoshi_Nakamoto&diff=3030Satoshi Nakamoto2011-02-01T13:52:44Z<p>Dooglus: /* Possible Motives */ formatting</p>
<hr />
<div>[[File:Satoshi-nakamoto.gif|thumb|200px|right|Picture of Satoshi Nakamoto.]]<br />
<br />
'''Satoshi Nakamoto''' is the founder of [[Bitcoin]] and initial author of the [[Original Bitcoin client]]. He has said in a p2p foundation profile<ref name="p2p_f_profile">[http://p2pfoundation.ning.com/profile/SatoshiNakamoto Satoshi Nakamoto profile on P2P Foundation]</ref> that he is from Japan. Beyond that, not much is known about him. He has been working on Bitcoin for more than two years.<ref> [http://www.bitcoin.org/smf/index.php?topic=453.msg4068#msg4068]</ref><br />
<br />
==Possible Motives==<br />
<br />
He left some clues about why he is doing this project with the inclusion of the following text in the [[Genesis block]], "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks".<br />
<br />
Some interesting quotes:<br />
<blockquote><p>Yes, [we will not find a solution to political problems in cryptography,] but we can win a major battle in the arms race and gain a new territory of <br />
freedom for several years.</p><br />
<br />
<p>Governments are good at cutting off the heads of a centrally controlled <br />
networks like Napster, but pure P2P networks like Gnutella and Tor seem to be <br />
holding their own. [http://www.mail-archive.com/cryptography@metzdowd.com/msg09971.html]</p></blockquote><br />
<br />
<blockquote>It's very attractive to the libertarian viewpoint if we can explain it <br />
properly. I'm better with code than with words though. [http://www.mail-archive.com/cryptography@metzdowd.com/msg10001.html]</blockquote><br />
<br />
==Possible identity==<br />
<br />
His identity and/or nationality are in doubt. While the few bits of information available<ref name="p2p_f_profile"/> about him point to Japan, he never wrote a single line of Japanese, the Bitcoin client has no Japanese version and there is no Japanese page on [http://bitcoin.org bitcoin.org].<br />
<br />
He is entirely unknown outside of Bitcoin as far as anyone can tell, and his PGP key was created just months prior to the date of the genesis block. He seems to be very familiar with the cryptography mailing list, but there are no non-Bitcoin posts from him on it. Some have speculated that his entire identity was created in advance in order to protect himself or the network. Perhaps he chose the name Satoshi because it can mean "wisdom" or "reason".<br />
<br />
==External links==<br />
* [http://www.bitcoin.org/Satoshi_Nakamoto.asc Satoshi's PGP public key]<br />
* [http://sourceforge.net/users/s_nakamoto SourceForge page]<br />
<br />
==Notes==<br />
<references/><br />
[[Category:Bitcoiners]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Difficulty&diff=2892Difficulty2011-01-28T22:30:45Z<p>Dooglus: /* How soon might I expect to generate a block? */ show maths for estimating time to find a block</p>
<hr />
<div>''See also: [[target]]''<br />
<br />
=== What is "difficulty"? ===<br />
<br />
Difficulty is a measure of how difficult it is to find a new [[block]] compared to the easiest it can ever be.<br />
<br />
=== How often does the difficulty change? ===<br />
<br />
Every 2016 [[block|blocks]].<br />
<br />
=== What is the formula for difficulty? ===<br />
<br />
difficulty = maximum_target / current_target <br />
<br />
(target is a 256 bit number)<br />
<br />
===How is difficulty stored in blocks?===<br />
<br />
Difficulty is stored in blocks as a 4 byte integer, and the actual hexadecimal [[target]] is derived from it via a predefined formula. For example, if the difficulty in the block is 0x1b0404cb, the hexadecimal target is<br />
0x0404cb * 2**(8*(0x1b - 3)) = 0x00000000000404CB000000000000000000000000000000000000000000000000<br />
<br />
The highest possible target (difficulty 1) is defined as 0x1d00ffff, which gives us a hex target of<br />
0x00ffff * 2**(8*(0x1d - 3)) = 0x00000000FFFF0000000000000000000000000000000000000000000000000000<br />
<br />
So the difficulty at 0x1b0404cb is therefore:<br />
0x00000000FFFF0000000000000000000000000000000000000000000000000000 /<br />
0x00000000000404CB000000000000000000000000000000000000000000000000 <br />
= 16307.420938523983<br />
<br />
=== What is the current difficulty? ===<br />
[http://blockexplorer.com/q/getdifficulty Current difficulty], as output by BitCoin's getDifficulty.<br />
<br />
[http://nullvoid.org/bitcoin/difficultiez.php Difficulty History]<br />
<br />
=== What is the maximum difficulty? ===<br />
The maximum difficulty is roughly: maximum_target / 1, which is a ridiculously huge number (about 2^224). <br />
<br />
The actual maximum difficulty is when current_target=0, but we would not be able to calculate the difficulty if that happened. (fortunately it never will, so we're ok.)<br />
<br />
=== Can the difficulty go down? ===<br />
Yes it can. See discussion in [[target]].<br />
<br />
=== What is the minimum difficulty? ===<br />
The minimum difficulty, when the target is at the maximum allowed value, is 1.<br />
<br />
=== What network hash rate results in a given difficulty? ===<br />
The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced. If they took less than two weeks, the difficulty is increased. The change in difficulty is in proportion to the amount of time over or under two weeks the previous 2016 blocks took to find.<br />
<br />
To find a block, the hash must be less than the target. The hash is effectively a random number between 0 and 2**256-1. The offset for difficulty 1 is<br />
0xffff * 2**208<br />
and for difficulty D is<br />
0xffff * 2**208)/D<br />
<br />
The expected number of hashes we need to calculate to find a block with difficulty D is therefore<br />
D * 2**256 / (0xffff * 2**208)<br />
or just<br />
D * 2**48 / 0xffff<br />
<br />
The difficulty is set such that the previous 2016 blocks would have been found at the rate of one every 10 minutes, so we were calculating (D * 2**48 / 0xffff) hashes in 600 seconds. That means the hash rate of the network was<br />
D * 2**48 / 0xffff / 600<br />
over the previous 2016 blocks. Can be further simplified to<br />
D * 2**32 / 600<br />
without much loss of accuracy.<br />
<br />
At difficulty 1, that is around 7 Mhashes per second.<br />
<br />
At the time of writing, the difficulty is 22012.4941572, which means that over the previous set of 2016 blocks found the average network hash rate was<br />
22012.4941572 * 2**32 / 600 = around 157 Ghashes per second.<br />
<br />
=== How soon might I expect to generate a block? ===<br />
(The [https://www.bitcoin.org/smf/index.php?topic=1682.0 eternal question].)<br />
<br />
The average time to find a block can be approximated by calculating:<br />
time = difficulty * 2**32 / hashrate<br />
where difficulty is the current difficulty, hashrate is the number of hashes your miner calculates per second, and time is the average in seconds between the blocks you find.<br />
<br />
For example, using Python we calculate the average time to generate a block using a 1Ghash/s mining rig when the difficulty is 20000:<br />
$ python -c "print 20000 * 2**32 / 10**9 / 60 / 60.0"<br />
23.85<br />
and find that it takes just under 24 hours on average.<br />
<br />
* Any one grinding of the hash stands the same chance of "winning" as any other. The numbers game is how many attempts your hardware can make per second.<br />
* You need to know the difficulty (above) and your khash/sec rate (reported by the client).<br />
** [[Mining Hardware Comparison]] has some stats that may help you predict what you could get.<br />
* Visit a calculator or perform the maths yourself,<br />
** http://www.alloscomp.com/bitcoin/calculator.php<br />
* Remember it's just probability! There are no guarantees you will win every N days.<br />
<br />
{{fromold|difficulty}}<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Difficulty&diff=2886Difficulty2011-01-28T20:29:26Z<p>Dooglus: show how to calculate network hashing rate from current difficulty</p>
<hr />
<div>''See also: [[target]]''<br />
<br />
=== What is "difficulty"? ===<br />
<br />
Difficulty is a measure of how difficult it is to find a new [[block]] compared to the easiest it can ever be.<br />
<br />
=== How often does the difficulty change? ===<br />
<br />
Every 2016 [[block|blocks]].<br />
<br />
=== What is the formula for difficulty? ===<br />
<br />
difficulty = maximum_target / current_target <br />
<br />
(target is a 256 bit number)<br />
<br />
===How is difficulty stored in blocks?===<br />
<br />
Difficulty is stored in blocks as a 4 byte integer, and the actual hexadecimal [[target]] is derived from it via a predefined formula. For example, if the difficulty in the block is 0x1b0404cb, the hexadecimal target is<br />
0x0404cb * 2**(8*(0x1b - 3)) = 0x00000000000404CB000000000000000000000000000000000000000000000000<br />
<br />
The highest possible target (difficulty 1) is defined as 0x1d00ffff, which gives us a hex target of<br />
0x00ffff * 2**(8*(0x1d - 3)) = 0x00000000FFFF0000000000000000000000000000000000000000000000000000<br />
<br />
So the difficulty at 0x1b0404cb is therefore:<br />
0x00000000FFFF0000000000000000000000000000000000000000000000000000 /<br />
0x00000000000404CB000000000000000000000000000000000000000000000000 <br />
= 16307.420938523983<br />
<br />
=== What is the current difficulty? ===<br />
[http://blockexplorer.com/q/getdifficulty Current difficulty], as output by BitCoin's getDifficulty.<br />
<br />
[http://nullvoid.org/bitcoin/difficultiez.php Difficulty History]<br />
<br />
=== What is the maximum difficulty? ===<br />
The maximum difficulty is roughly: maximum_target / 1, which is a ridiculously huge number (about 2^224). <br />
<br />
The actual maximum difficulty is when current_target=0, but we would not be able to calculate the difficulty if that happened. (fortunately it never will, so we're ok.)<br />
<br />
=== Can the difficulty go down? ===<br />
Yes it can. See discussion in [[target]].<br />
<br />
=== What is the minimum difficulty? ===<br />
The minimum difficulty, when the target is at the maximum allowed value, is 1.<br />
<br />
=== What network hash rate results in a given difficulty? ===<br />
The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced. If they took less than two weeks, the difficulty is increased. The change in difficulty is in proportion to the amount of time over or under two weeks the previous 2016 blocks took to find.<br />
<br />
To find a block, the hash must be less than the target. The hash is effectively a random number between 0 and 2**256-1. The offset for difficulty 1 is<br />
0xffff * 2**208<br />
and for difficulty D is<br />
0xffff * 2**208)/D<br />
<br />
The expected number of hashes we need to calculate to find a block with difficulty D is therefore<br />
D * 2**256 / (0xffff * 2**208)<br />
or just<br />
D * 2**48 / 0xffff<br />
<br />
The difficulty is set such that the previous 2016 blocks would have been found at the rate of one every 10 minutes, so we were calculating (D * 2**48 / 0xffff) hashes in 600 seconds. That means the hash rate of the network was<br />
D * 2**48 / 0xffff / 600<br />
over the previous 2016 blocks. Can be further simplified to<br />
D * 2**32 / 600<br />
without much loss of accuracy.<br />
<br />
At difficulty 1, that is around 7 Mhashes per second.<br />
<br />
At the time of writing, the difficulty is 22012.4941572, which means that over the previous set of 2016 blocks found the average network hash rate was<br />
22012.4941572 * 2**32 / 600 = around 157 Ghashes per second.<br />
<br />
=== How soon might I expect to generate a block? ===<br />
(The [https://www.bitcoin.org/smf/index.php?topic=1682.0 eternal question].)<br />
<br />
* Any one grinding of the hash stands the same chance of "winning" as any other. The numbers game is how many attempts your hardware can make per second.<br />
* You need to know the difficulty (above) and your khash/sec rate (reported by the client).<br />
** [[Mining Hardware Comparison]] has some stats that may help you predict what you could get.<br />
* Visit a calculator or perform the maths yourself,<br />
** http://www.alloscomp.com/bitcoin/calculator.php<br />
* Remember it's just probability! There are no guarantees you will win every N days.<br />
<br />
{{fromold|difficulty}}<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Buying_bitcoins&diff=2407Buying bitcoins2011-01-19T07:44:45Z<p>Dooglus: /* Small amounts */ spelling</p>
<hr />
<div>One issue currently facing a newcomer to bitcoin is, how do I get some? While there is the [[bitcoin faucet]] that can get you started with a small fraction of a coin, when getting larger amounts the user faces an abundance of choice. This page will cut through the clutter, and help direct you to the right exchanger for your needs.<br />
<br />
==Large amounts==<br />
<br />
For large amounts of bitcoin (USD 1000 or more), you probably would get the best rate if you deposit funds via bank wire, ACH, Euro bank transfer, or via [[Liberty Reserve]] into a major exchange. The following exchanges are currently available that take currency deposits:<br />
<br />
* [[MtGox]]<br />
* [[Bitcoin Central]]<br />
* Other [[:Category:Exchanges|Exchanges]]<br />
<br />
==Small amounts==<br />
<br />
For smaller amounts, bank transfer fees or Liberty Reserve conversion fees are usually too expensive. Thus other methods are usually a better choice. The following exchanges will enable you to acquire smaller amounts of bitcoin at reasonable rates:<br />
<br />
* [[CoinPal]] accepts [[PayPal]] for purchases of small lots of bitcoin.<br />
* [[Bitcoin 4 cash|Bitcoin 4 Cash]] will sell you bitcoins in exchange for cash in the mail.<br />
* [[Bitcoin Morpheus]] will sell you bitcoins in exchange for cash in the mail.<br />
* [[bitcoin-otc]] IRC trading marketplace will usually have people willing to deal for small and larger amounts using various payment methods, including PayPal, [[Dwolla]], Linden Dollars, etc.<br />
<br />
==eWallet==<br />
<br />
Some [[:Category:Services|services]] hold your bitcoins in an [[eWallet]] and provide funding methods.<br />
<br />
* [[YouTipIt]] Add funds with PayPal.<br />
<br />
[[Category:Exchanges]]<br />
[[Category:Introduction]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Block_chain&diff=2406Block chain2011-01-19T07:42:51Z<p>Dooglus: spelling</p>
<hr />
<div>[[File:blockchain.png|thumb|Blocks in the main chain (black) are the longest series of blocks that go from the genesis block (green) to the current block. Orphan blocks (purple) are blocks that are not in the longest chain.]]<br />
<br />
Every [[block]] contains a [[hash]] of the previous block. This has the effect of creating a chain of blocks from the [[genesis block]] to the current block. Each block is guaranteed to come after the previous block chronologically because the previous block's hash would otherwise not be known. The blocks thus form a history of the bitcoin state, with which address each bitcoin was assigned at a given time, it is not possible to change the contents of any block without invalidating the successive blocks (because its hash would change).<br />
<br />
Each block contains a [[Proof-of-work]] that protects the block chain. Generators will build on the valid chain that contains the most work (blocks don't necessarily contain the same amount of work).<br />
<br />
When two blocks are generated referencing the same previous block the block chain forks. This can happen for a number of reasons. If two blocks are generated simultaneously, the one that is built on by the next block will form the future chain. More serious forks can occur in a bug is found in the client which allows an invalid block chain to form, the chain will be recognised as invalid by future versions. As long as such invalid chains are recognized as such by at least 50% of computation power, the old block chain will be abandoned when more work has been put into the new one. Malicious clients attempting to fork the block chain (and thus alter transaction history) will not succeed unless they can perform work faster than normal clients (this is very unlikely).<br />
<br />
Blocks in shorter chains (or invalid chains) are called "orphan blocks", and while they are stored, they are not used for anything. When a block becomes an orphan block, all of its valid transactions are re-added to the pool of queued transactions and will be included in another block. The 50 BTC reward for the orphan block will be lost, which is why a network-enforced 100-block maturation time for generations exists.<br />
<br />
Because a block can only reference one previous block, it is impossible for two forked chains to merge.<br />
<br />
[[Category:Technical]]<br />
[[Category:Vocabulary]]</div>Dooglushttps://tests.bitcoin.it/w/index.php?title=Bitcoin_symbol&diff=2405Bitcoin symbol2011-01-19T07:41:20Z<p>Dooglus: grammer, capitalisation</p>
<hr />
<div>There is no official Bitcoin symbol as of December 2010, however the ''BTC'' abbreviation is the most universally accepted form.<br />
<br />
== Unicode symbol ==<br />
<br />
There is a discussion over [http://www.bitcoin.org/smf/index.php?topic=369.0 which Unicode symbol might be the best suited] for bitcoin.<br />
<br />
It has lead to the following options:<br />
<br />
* <font style="font-size:1.5em;">฿</font><br />
** Pro: Gives a currency-like look (it is the symbol for an existing currency, the Thai Baht, but other currency symbols often get reused, like the $); displayed correctly on all known OSes<br />
** Cons: It is already a currency, and might confuse people<br />
* <font style="font-size:1.5em;">☃</font><br />
** Cons: Wait, what?<br />
* <font style="font-size:1.5em;">Ⓑ ⓑ</font><br />
** Cons: Does not display properly for everyone<br />
* <font style="font-size:1.5em;">ᴃ</font><br />
* <font style="font-size:1.5em;">␢</font><br />
* <font style="font-size:1.5em;">β</font><br />
* <font style="font-size:1.5em;">¤</font><br />
* <font style="font-size:1.5em;">Ƅ</font><br />
* <font style="font-size:1.5em;">∄</font><br />
* <font style="font-size:1.5em;">ℬ</font><br />
* <font style="font-size:1.5em;">ઘ</font><br />
** Cons: No visible relation to Bitcoin<br />
* <font style="font-size:1.5em;">ϭ</font><br />
** Cons: No visible relation to Bitcoin<br />
* [[Image:Bitcoin Symbol Suggestion circled struck-through B.png|20px]]<br />
** Cons: Does not exist in the Unicode standard<br />
* [[Image:Bitcoin Symbol Suggestion rotated power.png|20px]]<br />
** Cons: Does not exist in the Unicode standard<br />
* <font style="font-size:1.5em;">ⓢ</font></div>Dooglus