<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Genjix</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Genjix"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Genjix"/>
	<updated>2026-05-08T01:52:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sx/Stealth&amp;diff=47489</id>
		<title>Sx/Stealth</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sx/Stealth&amp;diff=47489"/>
		<updated>2014-05-20T14:10:24Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Replaced content with &amp;quot;Please see the [http://sx.dyne.org/stealth.html SX tutorial on stealth payments].&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please see the [http://sx.dyne.org/stealth.html SX tutorial on stealth payments].&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sx/Stealth&amp;diff=43757</id>
		<title>Sx/Stealth</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sx/Stealth&amp;diff=43757"/>
		<updated>2014-01-16T12:34:05Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Created page with &amp;quot;This new feature in SX should be considered experimental for the time being. This page will be updated accordingly.  There are 2 people in our scenario: Mr. Sender and Mr. Rec...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This new feature in SX should be considered experimental for the time being. This page will be updated accordingly.&lt;br /&gt;
&lt;br /&gt;
There are 2 people in our scenario: Mr. Sender and Mr. Receiver.&lt;br /&gt;
&lt;br /&gt;
SX main website: http://sx.dyne.org/&lt;br /&gt;
&lt;br /&gt;
== Mr. Receiver generates a new seed ==&lt;br /&gt;
&lt;br /&gt;
The receiving person generates a new secret:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sx stealth-new&lt;br /&gt;
Secret: c8edfa93b0475d617de98643673ddbd3f25b08a98261a2b3f913ea29990ef6f6&lt;br /&gt;
Address: SxjHZmrj1GrtuyW8dLmtYbNsLTEUGCQzpbk6iFRHEiBiZ5Z8Nq8EVt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mr. Receiver puts his address somewhere public like on an internet forum or website somewhere.&lt;br /&gt;
&lt;br /&gt;
== Mr. Sender finds the pubkey and wants to send some BTC ==&lt;br /&gt;
&lt;br /&gt;
Armed with the address of the recipient, the sender now wants to generate a securely anonymous address to send funds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sx stealth-send&lt;br /&gt;
sx stealth-send ADDRESS&lt;br /&gt;
$ sx stealth-send SxjHZmrj1GrtuyW8dLmtYbNsLTEUGCQzpbk6iFRHEiBiZ5Z8Nq8EVt&lt;br /&gt;
Nonce: 03f3f8509a9ac713d269670119862416f377428fa1b40119fa418c3f24a610b11f&lt;br /&gt;
Address: 1vTNCd9NtWS77aPsfGWMeqNP1jsfbGQZ4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mr. Sender can send funds to 1vTNCd9NtWS77aPsfGWMeqNP1jsfbGQZ4. As long as the receiving party has knowledge of the nonce somehow, he can recover the funds.&lt;br /&gt;
&lt;br /&gt;
Mr. Sender transmits the nonce to Mr. Receiver. As long as they both keep their identities hidden, the public knowledge of the nonce does not matter. For instance, Mr. Sender might choose to put it in the blockchain so that Mr. Receiver is able to retrieve the value (assuming he&#039;s scanning for such a nonce periodically). Or he might send it to him over encrypted email, or post it publically on a forum somewhere where Mr. Sender knows that Mr. Receiver expects to see this nonce.&lt;br /&gt;
&lt;br /&gt;
== Mr. Receiver takes the nonce and attempts to see if it&#039;s a payment for him ==&lt;br /&gt;
&lt;br /&gt;
Mr. Receiver kept his secret key from earlier which he can use to regenerate the private keys in order to send funds transmitted to him. Using the nonce, he attempts to recreate the address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sx stealth-recv&lt;br /&gt;
sx stealth-recv SECRET NONCE&lt;br /&gt;
$ sx stealth-recv c8edfa93b0475d617de98643673ddbd3f25b08a98261a2b3f913ea29990ef6f6 03f3f8509a9ac713d269670119862416f377428fa1b40119fa418c3f24a610b11f&lt;br /&gt;
Address: 1vTNCd9NtWS77aPsfGWMeqNP1jsfbGQZ4&lt;br /&gt;
Private key: 5JDUsvi6bGL5M3Wk2qvgrEHvp3proSRStHakfwtsdMfauXekqR4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone linked to a transaction on the blockchain and posted a nonce on a forum somewhere. He attempts to recreate the Bitcoin address, and notices that the address in the linked transaction combined with the provided nonce matches what he gets! The money was destined for him.&lt;br /&gt;
&lt;br /&gt;
He can now spend it by importing the private key into his Bitcoin wallet.&lt;br /&gt;
&lt;br /&gt;
== Thanks ==&lt;br /&gt;
&lt;br /&gt;
Shout outs to: Jeremy Spilman for creating the [https://gist.github.com/jspilman/8396495 first implementation] - I reviewed it heavily ;) and Peter Todd (and others) for coming up with the idea / popularising it.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=IRC_channels&amp;diff=43649</id>
		<title>IRC channels</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=IRC_channels&amp;diff=43649"/>
		<updated>2014-01-10T15:38:43Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of the following Bitcoin-related IRC channels are available on [http://www.freenode.net Freenode]:&lt;br /&gt;
&lt;br /&gt;
There are also a Bitcoin integrated web chat network, [http://www.coinchat.org/r:uk1&lt;br /&gt;
CoinChat]:&lt;br /&gt;
&lt;br /&gt;
==Bitcoin Project==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Description&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin}} || General Bitcoin-related discussion.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-dev}} || Bitcoin software development. ([http://bitcoinstats.com/irc/bitcoin-dev/logs/ history])&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-politics}} || Discuss politics with other Bitcoin users.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-gaming}} || Bitcoin gamers hangout.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bc-news}} || RSS News related to Bitcoin.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-marketing}} || Marketing and promotion of bitcoin&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-gentoo}} || Gentoo community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-watch|text=[[Bitcoin-Watch|#bitcoin-watch]]}} || Streaming Bitcoin transactions, including market data.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-bots}} ||  Bot and bot-related discussion; trading bots, IRC bots, utility bots.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-police}} || [[Bitcoin Police]] Investigates incidents related to Bitcoin.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-court}} || [[Bitcoin Court]]  Settles disputes between parties.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tweets}} || Automated announce of bitcoin-related tweets.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-pricetalk}} || ALL Discussion Remotely Related to Bitcoin Price goes here&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-church}} || [[Bitcoin Church]] Discussion of our savior Satoshi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Local communities===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| {{Freenode IRC|bitcoin-otc-eu}} || European OTC trading marketplace.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-otc-ru}} || Russian OTC trading marketplace.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-otc-uk}} ||United kingdom OTC Trading Marketplace.Founder Angus Bates.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-aus}} || Aussie bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-br}} || Brazilian bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-cad}} || Canadian bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-cn}} || Chinese bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-dk}} || Danish bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-de}} || German bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-il}} || Israeli bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-nl}} || Dutch bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-romania}} || Romanian bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-ve}} || Venezuelan bitcoin community.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|btc.chat}} || Russian bitcoin community.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Mining Related Communities==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Description&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|avalon}} || Discussion and support specific to [[Avalon]] mining machine&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-mining}} || Discussion and support related to mining.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-fpga}} || Discussion and support specific to FPGA mining.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|cgminer}} || Discussion and support specific to [[CGMiner]] mining ASIC/FPGA/GPU.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|btc.chat.miners}} || Russian discussion of mining specification.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|eligius}} || [[Eligius]] mining pool community (also support for [[BFGMiner]] and [[Eloipool]])&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|give-me-coins}} || [[Give Me COINS]] mining pool community&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|ozcoin}} || [[Ozco.in]] mining pool community&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;small&amp;gt;[irc://irc.foonetic.net/xkcd-bitcoin IRC] [http://irc.lc/foonetic/xkcd-bitcoin/Miner@@@ Web]&amp;lt;/small&amp;gt; #xkcd-bitcoin || [https://en.bitcoin.it/wiki/XKCD_Pool XKCD Pool]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;small&amp;gt;[irc://irc.quakenet.org/bitcoins.lc IRC] [http://irc.lc/quakenet/bitcoins.lc/Miner@@@ Web]&amp;lt;/small&amp;gt; #bitcoins.lc @ Quakenet || [http://www.bitcoins.lc Bitcoins.lc Pool] &lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bithasher}}  || Bit Pool Mining&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|p2pool}}  || [[P2Pool]] decentralized mining pool&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|btcserv}} || [[Btcserv.net]] Mining Pool Community&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitminter}} || [[BitMinter]] Mining Pool Community&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|kncminer}} || [[KNCMiner]] ASIC Mining Hardware Vendor Discussion&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Communities for Exchanges and Trading==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Description&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-assets}} || Discussion of securities and other asset investments. [http://bitcoin-assets.com bitcoin-assets.com].&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-assets-trades}} || Streaming assets market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-auction}} || Live auctions over IRC.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-market}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-aud}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-bgn}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-brl}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-cad}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-chf}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-eur}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-gbp}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-hkd}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-inr}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-jpy}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-nzd}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-pln}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-rub}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-sek}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-sgd}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-sll}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-thb}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-usd}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-markets-zar}} || Streaming market data (only), no chat.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-otc|text=[[bitcoin-otc|#bitcoin-otc]]}} || Over-the-counter trading marketplace and discussion. ([http://bitcoinstats.com/irc/bitcoin-otc/logs/ history])&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-escrow}} || Third party escrow agents.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-otc-ticker|bitcoin-otc-ticker}} || Streaming market data form the [[#bitcoin-otc]] order book.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-otc-ratings|bitcoin-otc-ratings}} || Updates to ratings on the [[#bitcoin-otc]] Web of Trust.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-pit}} || Only over-the-counter trading.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers}} || Bitcoin tickers for all bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-aud}} || Bitcoin tickers for AUD bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-bgn}} || Bitcoin tickers for BGN bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-brl}} || Bitcoin tickers for BRL bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-cad}} || Bitcoin tickers for CAD bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-chf}} || Bitcoin tickers for CHF bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-eur}} || Bitcoin tickers for EUR bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-gbp}} || Bitcoin tickers for GBP bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-hkd}} || Bitcoin tickers for HKD bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-inr}} || Bitcoin tickers for INR bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-jpy}} || Bitcoin tickers for JPY bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-nzd}} || Bitcoin tickers for NZD bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-pln}} || Bitcoin tickers for PLN bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-rub}} || Bitcoin tickers for RUB bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-sek}} || Bitcoin tickers for SEK bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-sgd}} || Bitcoin tickers for SGD bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-sll}} || Bitcoin tickers for SLL bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-thb}} || Bitcoin tickers for THB bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-usd}} || Bitcoin tickers for USD bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-tickers-zar}} || Bitcoin tickers for ZAR bitcoin markets&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-wot|bitcoin-wot}} || Distributed Web of Trust (WoT) system for [[#bitcoin-otc]].&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|btc.chat.traders}} || Russian community discussion about trades/exchanges.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|#mtgox-chat}} || [[#MtGox]] chat (Note the pound sign (#) is part of the channel name)&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|mtgox}} || [[MtGox]] support&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|mtgoxlive}} || [[MtGox Live]] real-time view of trading&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|mtgox-news}} || Mt. Gox topics from Twitter.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|mtgox-rt}} || Mt. Gox real-time tape (executed trades).&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-rt}} || Real-time tape (executed trades).&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|localbitcoins-chat}} || [[LocalBitcoins.com]] exchange support&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|Coinabul}} || [http://Coinabul.com Coinabul]&#039;s customer support and news channel. Selling gold and silver for Bitcoin.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Related Communities==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Description&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|opentransactions}} || [[Open Transactions]] project.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|namecoin}} || [[Namecoin]] and the [[Dot-bit]] project.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|twister}} || [[Twister]], P2P microblogging discussion.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|darkwallet}} || [[DarkWallet]] and libbitcoin/Obelisk discussion &amp;amp; development channel.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|electrum}} || [[Electrum]], lightweight bitcoin client.&lt;br /&gt;
|-&lt;br /&gt;
| {{Freenode IRC|bitcoin-stackexchange}} || Discussion complementing [http://bitcoin.stackexchange.com Bitcoin StackExchange].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[pl:Kanały IRC]]&lt;br /&gt;
[[ro:Canale]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38780</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38780"/>
		<updated>2013-06-18T17:41:23Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Code Updates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
One property of Bitcoin messages is their fixed number of fields. This keeps the format simple and easily understood. Adding optional fields to messages will cause deserialisation issues when other fields come after the optional one.&lt;br /&gt;
&lt;br /&gt;
As an example, the length of version messages might be checked to ensure the byte stream is consistent. With optional fields, this checking is no longer possible. This is desirable to check for consistency inside internal deserialization code, and proper formatting of version messages originating from other nodes. In the future with diversification of the Bitcoin network, it will become desirable to enforce this kind of strict adherance to standard messages with field length compliance with every protocol version.&lt;br /&gt;
&lt;br /&gt;
Another property of fixed-length field messages is the ability to pass stream operators around for deserialization. This property is also lost, as now the deserialisation code must know the remaining length of bytes to parse. The parser now requires an additional piece of information (remaining size of the stream) for parsing instead of being a dumb reader.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
When a node creates an outgoing connection, it will immediately [[Version Handshake|advertise]] its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || int32_t || Identifies protocol version being used by the node&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || bitfield of features to be enabled for this connection&lt;br /&gt;
|-&lt;br /&gt;
| 8 || timestamp || int64_t || standard UNIX timestamp in seconds&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_recv || net_addr || The network address of the node receiving this message&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| version &amp;gt;= 106&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_from || net_addr || The network address of the node emitting this message&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.&lt;br /&gt;
|-&lt;br /&gt;
| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || start_height || int32_t || The last block received by the emitting node&lt;br /&gt;
|-&lt;br /&gt;
| 1 || relay || bool || Whether the remote peer should announce relayed transactions or not, see [[BIP 0037]], since version &amp;gt;= 70001&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;verack&amp;quot; packet shall be sent if the version packet was accepted.&lt;br /&gt;
&lt;br /&gt;
The following services are currently assigned:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NODE_NETWORK || This node can be asked for full blocks instead of just headers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Code Updates ===&lt;br /&gt;
&lt;br /&gt;
fRelayTx is added to the PushMessage() call inside PushVersion() (net.cpp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void CNode::PushVersion()&lt;br /&gt;
{&lt;br /&gt;
    /// when NTP implemented, change to just nTime = GetAdjustedTime()&lt;br /&gt;
    int64 nTime = (fInbound ? GetAdjustedTime() : GetTime());&lt;br /&gt;
    CAddress addrYou = (addr.IsRoutable() &amp;amp;&amp;amp; !IsProxy(addr) ? addr : CAddress(CService(&amp;quot;0.0.0.0&amp;quot;,0)));&lt;br /&gt;
    CAddress addrMe = GetLocalAddress(&amp;amp;addr);&lt;br /&gt;
    RAND_bytes((unsigned char*)&amp;amp;nLocalHostNonce, sizeof(nLocalHostNonce));&lt;br /&gt;
    printf(&amp;quot;send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n&amp;quot;, PROTOCOL_VERSION, nBestHeight, addrMe.ToString().c_str(), addrYou.ToString().c_str(), addr.ToString().c_str());&lt;br /&gt;
    PushMessage(&amp;quot;version&amp;quot;, PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,&lt;br /&gt;
                nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector&amp;lt;string&amp;gt;()),&lt;br /&gt;
                nBestHeight, true);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the protocol version is increased from 70001 to 70002.&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=38779</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=38779"/>
		<updated>2013-06-18T17:39:45Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Greg Maxwell &amp;lt;gmaxwell@gmail.com&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
Those proposing changes should consider that ultimately consent may rest with the consensus of the Bitcoin users (see also: [[economic majority]]).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Final&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0018|18]]&lt;br /&gt;
| hashScriptCheck&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Replaced&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0022|22]]&lt;br /&gt;
| getblocktemplate - Fundamentals&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0023|23]]&lt;br /&gt;
| getblocktemplate - Pooled Mining&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0032|32]]&lt;br /&gt;
| Hierarchical Deterministic Wallets&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Draft&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0033|33]]&lt;br /&gt;
| Stratized Nodes&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0034|34]]&lt;br /&gt;
| Block v2, Height in coinbase&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0035|35]]&lt;br /&gt;
| mempool message&lt;br /&gt;
| Jeff Garzik&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0036|36]]&lt;br /&gt;
| Custom Services&lt;br /&gt;
| Stefan Thomas&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0037|37]]&lt;br /&gt;
| Bloom filtering&lt;br /&gt;
| Mike Hearn and Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|- &lt;br /&gt;
| [[BIP 0039|39]]&lt;br /&gt;
| Deterministic key mnemonics&lt;br /&gt;
| Slush&lt;br /&gt;
| BIP number allocated&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0040|40]]&lt;br /&gt;
| Stratum wire protocol&lt;br /&gt;
| Slush&lt;br /&gt;
| BIP number allocated&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0041|41]]&lt;br /&gt;
| Stratum mining protocol&lt;br /&gt;
| Slush&lt;br /&gt;
| BIP number allocated&lt;br /&gt;
&amp;lt;!-- 42-49 reserved for stratum extensions --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0050|50]]&lt;br /&gt;
| March 2013 Chain Fork Post-Mortem&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Draft&lt;br /&gt;
&amp;lt;!-- 50 series reserved for a group of post-mortems --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0060|60]]&lt;br /&gt;
| Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Draft&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;br /&gt;
&lt;br /&gt;
[[es:Propuestas de mejora de Bitcoin]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38743</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38743"/>
		<updated>2013-06-16T09:37:26Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
One property of Bitcoin messages is their fixed number of fields. This keeps the format simple and easily understood. Adding optional fields to messages will cause deserialisation issues when other fields come after the optional one.&lt;br /&gt;
&lt;br /&gt;
As an example, the length of version messages might be checked to ensure the byte stream is consistent. With optional fields, this checking is no longer possible. This is desirable to check for consistency inside internal deserialization code, and proper formatting of version messages originating from other nodes. In the future with diversification of the Bitcoin network, it will become desirable to enforce this kind of strict adherance to standard messages with field length compliance with every protocol version.&lt;br /&gt;
&lt;br /&gt;
Another property of fixed-length field messages is the ability to pass stream operators around for deserialization. This property is also lost, as now the deserialisation code must know the remaining length of bytes to parse. The parser now requires an additional piece of information (remaining size of the stream) for parsing instead of being a dumb reader.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
When a node creates an outgoing connection, it will immediately [[Version Handshake|advertise]] its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || int32_t || Identifies protocol version being used by the node&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || bitfield of features to be enabled for this connection&lt;br /&gt;
|-&lt;br /&gt;
| 8 || timestamp || int64_t || standard UNIX timestamp in seconds&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_recv || net_addr || The network address of the node receiving this message&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| version &amp;gt;= 106&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_from || net_addr || The network address of the node emitting this message&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.&lt;br /&gt;
|-&lt;br /&gt;
| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || start_height || int32_t || The last block received by the emitting node&lt;br /&gt;
|-&lt;br /&gt;
| 1 || relay || bool || Whether the remote peer should announce relayed transactions or not, see [[BIP 0037]], since version &amp;gt;= 70001&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;verack&amp;quot; packet shall be sent if the version packet was accepted.&lt;br /&gt;
&lt;br /&gt;
The following services are currently assigned:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NODE_NETWORK || This node can be asked for full blocks instead of just headers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Code Updates ===&lt;br /&gt;
&lt;br /&gt;
fRelayTx is added to the PushMessage() call inside PushVersion() (net.cpp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void CNode::PushVersion()&lt;br /&gt;
{&lt;br /&gt;
    /// when NTP implemented, change to just nTime = GetAdjustedTime()&lt;br /&gt;
    int64 nTime = (fInbound ? GetAdjustedTime() : GetTime());&lt;br /&gt;
    CAddress addrYou = (addr.IsRoutable() &amp;amp;&amp;amp; !IsProxy(addr) ? addr : CAddress(CService(&amp;quot;0.0.0.0&amp;quot;,0)));&lt;br /&gt;
    CAddress addrMe = GetLocalAddress(&amp;amp;addr);&lt;br /&gt;
    RAND_bytes((unsigned char*)&amp;amp;nLocalHostNonce, sizeof(nLocalHostNonce));&lt;br /&gt;
    printf(&amp;quot;send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n&amp;quot;, PROTOCOL_VERSION, nBestHeight, addrMe.ToString().c_str(), addrYou.ToString().c_str(), addr.ToString().c_str());&lt;br /&gt;
    PushMessage(&amp;quot;version&amp;quot;, PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,&lt;br /&gt;
                nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector&amp;lt;string&amp;gt;()),&lt;br /&gt;
                nBestHeight, fRelayTxes);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the protocol version is increased from 70001 to 70002.&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38742</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38742"/>
		<updated>2013-06-16T09:34:17Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
One property of Bitcoin messages is their fixed number of fields. This keeps the format simple and easily understood. Adding optional fields to messages will cause deserialisation issues when other fields come after the optional one.&lt;br /&gt;
&lt;br /&gt;
As an example, the length of version messages might be checked to ensure the byte stream is consistent. With optional fields, this checking is no longer possible. This is desirable to check for consistency inside internal deserialization code, and proper formatting of version messages originating from other nodes. In the future with diversification of the Bitcoin network, it will become desirable to enforce this kind of strict adherance to standard messages with field length compliance with every protocol version.&lt;br /&gt;
&lt;br /&gt;
Another property of fixed-length field messages is the ability to pass stream operators around for deserialization. This property is also lost, as now the deserialisation code must know the remaining length of bytes to parse. The parser now requires an additional piece of information (remaining size of the stream) for parsing instead of being a dumb reader.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
== version ==&lt;br /&gt;
&lt;br /&gt;
When a node creates an outgoing connection, it will immediately [[Version Handshake|advertise]] its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || int32_t || Identifies protocol version being used by the node&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || bitfield of features to be enabled for this connection&lt;br /&gt;
|-&lt;br /&gt;
| 8 || timestamp || int64_t || standard UNIX timestamp in seconds&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_recv || net_addr || The network address of the node receiving this message&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| version &amp;gt;= 106&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_from || net_addr || The network address of the node emitting this message&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.&lt;br /&gt;
|-&lt;br /&gt;
| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || start_height || int32_t || The last block received by the emitting node&lt;br /&gt;
|-&lt;br /&gt;
| 1 || relay || bool || Whether the remote peer should announce relayed transactions or not, see [[BIP 0037]], since version &amp;gt;= 70001&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;verack&amp;quot; packet shall be sent if the version packet was accepted.&lt;br /&gt;
&lt;br /&gt;
The following services are currently assigned:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NODE_NETWORK || This node can be asked for full blocks instead of just headers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38741</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38741"/>
		<updated>2013-06-16T09:34:01Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
One property of Bitcoin messages is their fixed number of fields. This keeps the format simple and easily understood. Adding optional fields to messages will cause deserialisation issues when other fields come after the optional one.&lt;br /&gt;
&lt;br /&gt;
As an example, the length of version messages might be checked to ensure the byte stream is consistent. With optional fields, this checking is no longer possible. This is desirable to check for consistency inside internal deserialization code, and proper formatting of version messages originating from other nodes. In the future with diversification of the Bitcoin network, it will become desirable to enforce this kind of strict adherance to standard messages with field length compliance with every protocol version.&lt;br /&gt;
&lt;br /&gt;
Another property of fixed-length field messages is the ability to pass stream operators around for deserialization. This property is also lost, as now the deserialisation code must know the remaining length of bytes to parse. The parser now requires an additional piece of information (remaining size of the stream) for parsing instead of being a dumb reader.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
When a node creates an outgoing connection, it will immediately [[Version Handshake|advertise]] its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.&lt;br /&gt;
&lt;br /&gt;
Payload:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Size !! Description !! Data type !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || version || int32_t || Identifies protocol version being used by the node&lt;br /&gt;
|-&lt;br /&gt;
| 8 || services || uint64_t || bitfield of features to be enabled for this connection&lt;br /&gt;
|-&lt;br /&gt;
| 8 || timestamp || int64_t || standard UNIX timestamp in seconds&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_recv || net_addr || The network address of the node receiving this message&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;| version &amp;gt;= 106&lt;br /&gt;
|-&lt;br /&gt;
| 26 || addr_from || net_addr || The network address of the node emitting this message&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.&lt;br /&gt;
|-&lt;br /&gt;
| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || start_height || int32_t || The last block received by the emitting node&lt;br /&gt;
|-&lt;br /&gt;
| 1 || relay || bool || Whether the remote peer should announce relayed transactions or not, see [[BIP 0037]], since version &amp;gt;= 70001&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;verack&amp;quot; packet shall be sent if the version packet was accepted.&lt;br /&gt;
&lt;br /&gt;
The following services are currently assigned:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NODE_NETWORK || This node can be asked for full blocks instead of just headers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38740</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38740"/>
		<updated>2013-06-16T09:31:41Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Design rationale */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
One property of Bitcoin messages is their fixed number of fields. This keeps the format simple and easily understood. Adding optional fields to messages will cause deserialisation issues when other fields come after the optional one.&lt;br /&gt;
&lt;br /&gt;
As an example, the length of version messages might be checked to ensure the byte stream is consistent. With optional fields, this checking is no longer possible. This is desirable to check for consistency inside internal deserialization code, and proper formatting of version messages originating from other nodes. In the future with diversification of the Bitcoin network, it will become desirable to enforce this kind of strict adherance to standard messages with field length compliance with every protocol version.&lt;br /&gt;
&lt;br /&gt;
Another property of fixed-length field messages is the ability to pass stream operators around for deserialization. This property is also lost, as now the deserialisation code must know the remaining length of bytes to parse. The parser now requires an additional piece of information (remaining size of the stream) for parsing instead of being a dumb reader.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38739</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38739"/>
		<updated>2013-06-16T09:31:29Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
One property of Bitcoin messages is their fixed number of fields. This keeps the format simple and easily understood. Adding optional fields to messages will cause deserialisation issues when other fields come after the optional one.&lt;br /&gt;
&lt;br /&gt;
As an example, the length of version messages might be checked to ensure the byte stream is consistent. With optional fields, this checking is no longer possible. This is desirable to check for consistency inside internal deserialization code, and proper formatting of version messages originating from other nodes. In the future with diversification of the Bitcoin network, it will become desirable to enforce this kind of strict adherance to standard messages with field length compliance with every protocol version.&lt;br /&gt;
&lt;br /&gt;
Another property of fixed-length field messages is the ability to pass stream operators around for deserialization. This property is also lost, as now the deserialisation code must know the remaining length of bytes to parse. The parser now requires an additional piece of information (remaining size of the stream) for parsing instead of being a dumb reader.&lt;br /&gt;
&lt;br /&gt;
==Design rationale==&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38738</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38738"/>
		<updated>2013-06-16T09:25:01Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced a new flag to version messages which says whether to relay new transaction messages to that node.&lt;br /&gt;
&lt;br /&gt;
The protocol version was upgraded to 70001, and the (now accepted) BIP 0037 became implemented.&lt;br /&gt;
&lt;br /&gt;
The implementation is problematic because the RelayTransactions flag is an optional part of the version message stream.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
==Design rationale==&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38737</id>
		<title>BIP 0060</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0060&amp;diff=38737"/>
		<updated>2013-06-16T09:21:38Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Created page with &amp;quot;{{bip}}  &amp;lt;pre&amp;gt;   BIP: 60   Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)   Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;   Status: Draft   Type: Standards Track   ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 60&lt;br /&gt;
  Title: Fixed Length &amp;quot;version&amp;quot; Message (Relay-Transactions Field)&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 16-06-2013&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
==Design rationale==&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This document is placed in the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Thin_Client_Security&amp;diff=33220</id>
		<title>Thin Client Security</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Thin_Client_Security&amp;diff=33220"/>
		<updated>2012-11-30T16:03:27Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Block Height vs. Depth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Recently there have been a number of proposals for bitcoin clients which do not store a complete copy of every block in the entire block chain.  This page will refer to all such clients as &amp;quot;thin clients&amp;quot;.  This page is meant to be a place to try to make sense of the security and trust implications of the various schemes.&lt;br /&gt;
&lt;br /&gt;
== Block Height vs. Depth ==&lt;br /&gt;
&lt;br /&gt;
It is important to distinguish between block height verification and block depth verification.&lt;br /&gt;
&lt;br /&gt;
A client verifies the height H of a block by checking that there are H block &#039;&#039;&#039;before&#039;&#039;&#039; it, all of which are well-formed and obey the maximum-difficulty-adjustment-rate rule.  Currently only the Satoshi client and libbitcoin does block height verification.  Block height is the fundamental anchor of trustless security in the Bitcoin system.&lt;br /&gt;
&lt;br /&gt;
A client verifies the depth D of a block by checking that there are D blocks &#039;&#039;&#039;after&#039;&#039;&#039; it (also called &amp;quot;confirmations&amp;quot;), all of which are well-formed.  SPV clients substitute block depth for block height as a transaction validity check.  All clients use block depth as a measure of the liklihood of a [[Chain_Reorganization|blockchain reorganization]] producing a new longer fork which excludes the transaction (i.e. [[Orphan_Block|orphaning]] its block).&lt;br /&gt;
&lt;br /&gt;
See also [https://bitcointalk.org/index.php?topic=88208.msg987429#msg987429 some comments on probabilistic verification of block height].&lt;br /&gt;
&lt;br /&gt;
== Full-Chain Clients ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;thick&amp;quot; bitcoin client downloads a copy of the entire chain, including all transactions (not just headers).  It will be used as the reference point for security comparisions below.&lt;br /&gt;
&lt;br /&gt;
=== Block &#039;&#039;&#039;Height&#039;&#039;&#039; as a Transaction Validity Check ===&lt;br /&gt;
&lt;br /&gt;
A full-chain client trusts the difficultywise-longest [https://en.bitcoin.it/wiki/Protocol_rules#Blocks well-formed] blockchain it can find.  Any transaction on the difficultywise-longest well-formed chain is considered valid.  Therefore, the validity of a transaction is determined by its height -- i.e. how many blocks come &#039;&#039;before&#039;&#039; it.  A transaction&#039;s &#039;&#039;depth&#039;&#039; (the number of blocks &#039;&#039;after&#039;&#039; it) is used to determine the likelihood of the transaction being invalidated due to the emergence of a longer fork.&lt;br /&gt;
&lt;br /&gt;
== Header-Only Clients ==&lt;br /&gt;
&lt;br /&gt;
These client downloads a complete copy of the headers for all blocks in the entire blockchain.  This means that the download and storage requirements scale linearly with the amount of time since bitcoin was invented; it would be preferable to have the scaling be logarithmic or even constant.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Payment Verification (SPV) ===&lt;br /&gt;
&lt;br /&gt;
This scheme is described in section 8 of the [http://bitcoin.org/bitcoin.pdf original bitcoin whitepaper].&lt;br /&gt;
&lt;br /&gt;
==== Block &#039;&#039;&#039;Depth&#039;&#039;&#039; as a Transaction Validity Check ====&lt;br /&gt;
&lt;br /&gt;
As Satoshi writes, &amp;quot;[the thin client] can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&amp;quot;  If we take &amp;quot;X&amp;quot; to be the &amp;quot;number of blocks added after it&amp;quot;, then SPV essentially trusts that a transaction X blocks deep in the chain does not have inputs which were already spent further back in the chain.  Therefore, the validity of a transaction is determined by its depth -- i.e. how many blocks come &#039;&#039;after&#039;&#039; it.  Other thin client protocols also include this assumption.&lt;br /&gt;
&lt;br /&gt;
This is very different from the trust model in the &amp;quot;thick&amp;quot; client: the thick client verifies that a transaction&#039;s inputs are unspent by actually checking the whole chain up to that point -- there is no &amp;quot;X blocks deep&amp;quot; involved here.  The thick client uses &amp;quot;X blocks deep&amp;quot; (aka &amp;quot;confirmations&amp;quot;) only once it has already decided that a transaction is valid (i.e. no [[Double-spending|double-spends]]).  At that point it uses &amp;quot;X blocks deep&amp;quot; to decide how likely it is that a longer fork in the chain will emerge which excludes that transaction.&lt;br /&gt;
&lt;br /&gt;
It is very important to understand how the same property (&amp;quot;X blocks deep&amp;quot;) is used to verify two different properties in the thick client and SPV cases.  &#039;&#039;&#039;The thick client never uses block depth as a measure of transaction validity; the SPV client does&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This is a concern in a situation where an SPV client is subjected to a double-spend attack by somebody who controls its network connection.  For example, suppose you are at a wi-fi cafe and are paying for something using your smartphone -- the cafe owner controls your network connection.  Satoshi acknowledges this implicitly when he writes that &amp;quot;the verification is reliable as long as honest nodes control the network&amp;quot; -- to be completely pedantic, this means that the verification is reliable as long as honest nodes control &#039;&#039;&#039;the part of the network that the SPV client is able to communicate with&#039;&#039;&#039;.  In an attack-by-ISP scenario this may not be a sufficiently strong security property.  The attacker would not need to overpower &amp;quot;the rest of the network&amp;quot; because the client is unable to communicate with it.&lt;br /&gt;
&lt;br /&gt;
==== [[BitCoinJ]] ====&lt;br /&gt;
&lt;br /&gt;
Simplified Payment Verification is the verification mechanism used in [[BitCoinJ]].&lt;br /&gt;
&lt;br /&gt;
A security analysis of some of the issues in BitcoinJ can be found [http://code.google.com/p/bitcoinj/wiki/SecurityModel here]; however:&lt;br /&gt;
&lt;br /&gt;
* The claim that &amp;quot;picking 10 nodes and requiring all of them to be consistent needs much less trust&amp;quot; overlooks the problem of [https://en.bitcoin.it/wiki/Weaknesses#Cancer_nodes &amp;quot;cancer nodes&amp;quot;] and [http://en.wikipedia.org/wiki/Sybil_attack Sybil attacks].&lt;br /&gt;
* Many of the security claims are qualified by some form of &amp;quot;if you don&#039;t think an attacker controls your internet connection&amp;quot;; see the previous section for a discussion of why this is problematic.&lt;br /&gt;
&lt;br /&gt;
==== [https://bitcointalk.org/index.php?topic=128055.0 picocoin] ====&lt;br /&gt;
&lt;br /&gt;
Simplified Payment Verification is the verification mechanism used in picocoin.&lt;br /&gt;
&lt;br /&gt;
The library (libccoin) that picocoin is based on includes code for validating scripts and blocks; this could potentially be used to implement a full-chain client.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unused Output Tree in the Blockchain (UOT) ===&lt;br /&gt;
&lt;br /&gt;
There have been several proposals (the first appears to be [https://bitcointalk.org/index.php?topic=21995.0 this one] by gmaxwell, who called it an &amp;quot;open transaction tree&amp;quot;, although the term &amp;quot;open&amp;quot; is now taken to mean &amp;quot;not yet mined into the blockchain&amp;quot; rather than &amp;quot;unspent&amp;quot;) to form a tree of unused transaction outputs at each block in the chain, hash it as a Merkle tree, and encode the root hash in the block chain (probably as part of the coinbase input).  This will be called an Unused Output Tree (UOT).  The first detailed proposal so far appears to be [https://en.bitcoin.it/wiki/User:DiThi/MTUT Alberto Torres&#039; proposal]; etotheipi&#039;s [https://bitcointalk.org/index.php?topic=88208.0 ultimate blockchain compression] is a variant of this.&lt;br /&gt;
&lt;br /&gt;
If such UOT hashes were included in the blockchain, a client which shipped with a [https://en.bitcoin.it/wiki/Vocabulary checkpoint] block that had a UOT would only need to download blocks after the checkpoint.  Moreover, once the client had downloaded those blocks and confirmed their UOTs, it could discard all but the most recent block containing a UOT.&lt;br /&gt;
&lt;br /&gt;
This would also let a thin client reduce the question of &amp;quot;is this output unspent&amp;quot; to the question of &amp;quot;is this block super-well-formed&amp;quot; where &amp;quot;well-formed&amp;quot; means &amp;quot;well-formed according to the normal blockchain rules and additionally has an Unused Output Tree which is accurate and truthful&amp;quot;.  This is still a long way from the low level of trust involved in the thick client, but it is a major improvement over all existing proposals.&lt;br /&gt;
&lt;br /&gt;
It is unlikely that bitcoin would ever arrive at a state where every single block had a UOT, since this would require upgrading 100% of the miners on the network, or else convincing enough miners to reject blocks which do not contain a UOT.  The latter strategy risks creating blockchain forks, which can be expensive (in reward terms) to miners.  Therefore, any UOT strategy would need to cope with the fact that not every block contains a UOT.&lt;br /&gt;
&lt;br /&gt;
Hostile miners may insert blocks into the chain which have what claims to be a UOT, but which is actually invalid.  It is unlikely that such blocks could be kept out of the chain because, again, this would require adding a new block well-formedness criterion, and miners implementing this new criterion would risk &amp;quot;mining on the wrong side&amp;quot; of a fork, which could cost them a lot of money.  Therefore, any UOT strategy would need to cope with the fact that not every block containing a UOT entry can be trusted.&lt;br /&gt;
&lt;br /&gt;
Note that at the present moment no standard format for such Unused Output Tree hashes has been agreed upon, nor do any of the blocks in the chain contain them.  The [https://bitcointalk.org/index.php?topic=91954 ultraprune] feature added to bitcoind-0.8 maintains a similar data structure on the client&#039;s disk.  It does not put this data structure or its hash anywhere in the blockchain.&lt;br /&gt;
&lt;br /&gt;
== Server-Trusting Clients ==&lt;br /&gt;
&lt;br /&gt;
These clients involve some (usually low) level of trust in the server they rely upon.  Mechanisms for authenticating the server, and for confirming that the server has not been compromised, are usually not explained.&lt;br /&gt;
&lt;br /&gt;
All thin clients listed below currently connect to a single server, and are vulnerable to an attack similar to a double-spend. The attack can be run by that single server - the server can just lie to them that they received a Bitcoin transaction, and they, assuming the server does not lie, perform some service, transfer funds or send goods without actually receiving any Bitcoin in exchange. Therefore, they are implicitly trusting it.&lt;br /&gt;
&lt;br /&gt;
Future enhancements have been suggested that will have the client talk to multiple servers and broadcast transactions and query all of them.  Unfortunately it is well known to security researchers that this does not actually increase security; it simply makes the exploits more complicated and difficult to find.  Security researchers have a name for this phenomenon: it is called a &amp;quot;Sybil attack&amp;quot;&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Sybil_attack&amp;lt;/ref&amp;gt;.  [https://bitcointalk.org/index.php?topic=88208.msg975201#msg975201 This post] on bitcointalk explains how some governments (notably Iran and China) already perform these sorts of attacks on their own citizens, with the coerced assistance of SSL certificate authorities.&lt;br /&gt;
&lt;br /&gt;
Clients with a checkpoint (even a very old one) that download and validate the headers for the whole blockchain are [http://bitcoinmedia.com/the-irc-bootstrap-method-is-flawed/#comment-4243 not vulnerable] to Sybil attacks in the following sense: they can always ensure that an attack would cost more than the amount being stolen.&lt;br /&gt;
&lt;br /&gt;
=== [[BCCAPI]] ===&lt;br /&gt;
&lt;br /&gt;
=== [[Electrum]] ===&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* A [http://sourceforge.net/mailarchive/message.php?msg_id=28633866 thread] on bitcoin-dev&lt;br /&gt;
* A [http://bitcoin.stackexchange.com/questions/2584/is-reclaiming-disk-space-already-implemented-how-effective-will-it-be/2589 question] on bitcoin.stackexchange.com&lt;br /&gt;
* The [https://en.bitcoin.it/wiki/Weaknesses#Cancer_nodes &amp;quot;cancer nodes&amp;quot;] paragraph explains some of the issues with thin clients that base security on trusting whatever &amp;quot;a majority of the IP addresses I can see&amp;quot; say.&lt;br /&gt;
* [http://bitcoin.stackexchange.com/questions/2613/how-secure-are-various-models-of-bitcoin-clients related discussion on Stack Exchange]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[category:Clients]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=30167</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=30167"/>
		<updated>2012-08-27T21:50:42Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
Those proposing changes should consider that ultimately consent may rest with the [[economic majority]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0018|18]]&lt;br /&gt;
| hashScriptCheck&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Replaced&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0022|22]]&lt;br /&gt;
| getblocktemplate - Fundamentals&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0023|23]]&lt;br /&gt;
| getblocktemplate - Pooled Mining&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0032|32]]&lt;br /&gt;
| Hierarchical Deterministic Wallets&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Draft&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0033|33]]&lt;br /&gt;
| Stratized Nodes&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0034|34]]&lt;br /&gt;
| Block v2, Height in coinbase&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0035|35]]&lt;br /&gt;
| mempool message&lt;br /&gt;
| Jeff Garzik&lt;br /&gt;
| Accepted&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0035&amp;diff=30166</id>
		<title>BIP 0035</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0035&amp;diff=30166"/>
		<updated>2012-08-27T21:50:01Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 35&lt;br /&gt;
  Title: mempool message&lt;br /&gt;
  Author: Jeff Garzik &amp;lt;jgarzik@exmulti.com&amp;gt;&lt;br /&gt;
  Status: Accepted&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 2012-08-16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Make a network node&#039;s transaction memory pool accessible via a new &amp;quot;mempool&amp;quot; message.  Extend the existing &amp;quot;getdata&amp;quot; message behavior to permit accessing the transaction memory pool.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
Several use cases make it desireable to expose a network node&#039;s transaction memory pool:&lt;br /&gt;
# SPV clients, wishing to obtain zero-confirmation transactions sent or received.&lt;br /&gt;
# Miners, to avoid missing lucrative fees, downloading existing network transactions after a restart.&lt;br /&gt;
# Remote network diagnostics.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
# The mempool message is defined as an empty message where pchCommand == &amp;quot;mempool&amp;quot;&lt;br /&gt;
# Upon receipt of a &amp;quot;mempool&amp;quot; message, the node will respond   with an &amp;quot;inv&amp;quot; message containing MSG_TX hashes of all the transactions in the node&#039;s transaction memory pool, if any.&lt;br /&gt;
# The typical node behavior in response to an &amp;quot;inv&amp;quot; is &amp;quot;getdata&amp;quot;. However, the reference Satoshi implementation ignores requests for transaction hashes outside that which is recently relayed. To support &amp;quot;mempool&amp;quot;, an implementation must extend its &amp;quot;getdata&amp;quot; message support to querying the memory pool.&lt;br /&gt;
# Feature discovery is enabled by checking two &amp;quot;version&amp;quot; message attributes:&lt;br /&gt;
## Protocol version &amp;gt;= 60002&lt;br /&gt;
## NODE_NETWORK bit set in nServices&lt;br /&gt;
&lt;br /&gt;
Note that existing implementations drop &amp;quot;inv&amp;quot; messages with a vector size &amp;gt; 50000.&lt;br /&gt;
&lt;br /&gt;
==Backward compatibility==&lt;br /&gt;
&lt;br /&gt;
Older clients remain 100% compatible and interoperable after this change.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
https://github.com/bitcoin/bitcoin/pull/1641&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0034&amp;diff=30165</id>
		<title>BIP 0034</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0034&amp;diff=30165"/>
		<updated>2012-08-27T21:49:49Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 34&lt;br /&gt;
  Title: Block v2, Height in Coinbase&lt;br /&gt;
  Author: Gavin Andresen &amp;lt;gavinandresen@gmail.com&amp;gt;&lt;br /&gt;
  Status: Accepted&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 2012-07-06&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Bitcoin blocks and transactions are versioned binary structures. Both currently use version 1. This BIP introduces an upgrade path for versioned transactions and blocks. A unique value is added to newly produced coinbase transactions, and blocks are updated to version 2.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
# Clarify and exercise the mechanism whereby the bitcoin network collectively consents to upgrade transaction or block binary structures, rules and behaviors.&lt;br /&gt;
# Enforce block and transaction uniqueness, and assist unconnected block validation.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
# Treat transactions with a version greater than 1 as non-standard (official Satoshi client will not mine or relay them).&lt;br /&gt;
# Add height as the first item in the coinbase transaction&#039;s scriptSig, and increase block version to 2. The format of the height is &amp;quot;serialized CScript&amp;quot; -- first byte is number of bytes in the number (will be 0x03 on main net for the next 300 or so years), following bytes are little-endian representation of the number.  Height is the height of the mined block in the block chain, where the genesis block is height zero (0).&lt;br /&gt;
# 75% rule: If 750 of the last 1,000 blocks are version 2 or greater, reject invalid version 2 blocks. (testnet3: 51 of last 100)&lt;br /&gt;
# 95% rule (&amp;quot;Point of no return&amp;quot;): If 950 of the last 1,000 blocks are version 2 or greater, reject all version 1 blocks. (testnet3: 75 of last 100)&lt;br /&gt;
&lt;br /&gt;
==Backward compatibility==&lt;br /&gt;
&lt;br /&gt;
All older clients are compatible with this change. Users and merchants should not be impacted. Miners are strongly recommended to upgrade to version 2 blocks. Once 95% of the miners have upgraded to version 2, the remainder will be orphaned if they fail to upgrade.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
https://github.com/bitcoin/bitcoin/pull/1526&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0022&amp;diff=30164</id>
		<title>BIP 0022</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0022&amp;diff=30164"/>
		<updated>2012-08-27T21:49:37Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 22&lt;br /&gt;
  Title: getblocktemplate - Fundamentals&lt;br /&gt;
  Author: Luke Dashjr &amp;lt;luke+bip22@dashjr.org&amp;gt;&lt;br /&gt;
  Status: Accepted&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 28-02-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
This BIP describes a new JSON-RPC method for &amp;quot;smart&amp;quot; Bitcoin miners and proxies.&lt;br /&gt;
Instead of sending a simple block header for hashing, the entire block structure is sent, and left to the miner to (optionally) customize and assemble.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
===Block Template Request===&lt;br /&gt;
&lt;br /&gt;
A JSON-RPC method is defined, called &amp;quot;getblocktemplate&amp;quot;.&lt;br /&gt;
It accepts exactly one argument, which MUST be an Object of request parameters.&lt;br /&gt;
If the request parameters include a &amp;quot;mode&amp;quot; key, that is used to explicitly select between the default &amp;quot;template&amp;quot; request or a [[BIP 0023#Block Proposal|&amp;quot;proposal&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
Block template creation can be influenced by various parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|template request&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| capabilities || Array of Strings || SHOULD contain a list of the following, to indicate client-side support: [[#Optional: Long Polling|&amp;quot;longpoll&amp;quot;]], &amp;quot;coinbasetxn&amp;quot;, &amp;quot;coinbasevalue&amp;quot;, [[BIP 0023#Block Proposal|&amp;quot;proposal&amp;quot;]], [[BIP 0023#Logical Services|&amp;quot;serverlist&amp;quot;]], &amp;quot;workid&amp;quot;, and any of the [[BIP 0023#Mutations|mutations]]&lt;br /&gt;
|-&lt;br /&gt;
| mode || String || MUST be &amp;quot;template&amp;quot; or omitted&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
getblocktemplate MUST return a JSON Object containing the following keys:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3| template&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| bits || String || the compressed difficulty in hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| curtime || Number || the current time as seen by the server (recommended for block time) - note this is not necessarily the system clock, and must fall within the mintime/maxtime rules&lt;br /&gt;
|-&lt;br /&gt;
| height || Number || the height of the block we are looking for&lt;br /&gt;
|-&lt;br /&gt;
| previousblockhash || String || the hash of the previous block, in big-endian hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| sigoplimit || Number || number of sigops allowed in blocks&lt;br /&gt;
|-&lt;br /&gt;
| sizelimit || Number || number of bytes allowed in blocks&lt;br /&gt;
|-&lt;br /&gt;
| transactions || Array of Objects || Objects containing [[#Transactions Object Format|information for Bitcoin transactions]] (excluding coinbase)&lt;br /&gt;
|-&lt;br /&gt;
| version || Number || always 1 or 2 (at least for bitcoin) - clients MUST understand the implications of the version they use (eg, comply with [[BIP 0034]] for version 2)&lt;br /&gt;
|-&lt;br /&gt;
| coinbaseaux || Object || data that SHOULD be included in the coinbase&#039;s scriptSig content. Only the values (hexadecimal byte-for-byte) in this Object should be included, not the keys. This does not include the block height, which is required to be included in the scriptSig by [[BIP 0034]]. It is advisable to encode values inside &amp;quot;PUSH&amp;quot; opcodes, so as to not inadvertantly expend SIGOPs (which are counted toward limits, despite not being executed).&lt;br /&gt;
|-&lt;br /&gt;
| coinbasetxn || Object || [[#Transactions Object Format|information for coinbase transaction]]&lt;br /&gt;
|-&lt;br /&gt;
| coinbasevalue || Number || total funds available for the coinbase (in Satoshis)&lt;br /&gt;
|-&lt;br /&gt;
| workid || String || if provided, this value must be returned with results (see [[#Block Submission|Block Submission]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transactions Object Format ====&lt;br /&gt;
&lt;br /&gt;
The Objects listed in the response&#039;s &amp;quot;transactions&amp;quot; key contains these keys:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|template &amp;quot;transactions&amp;quot; element&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| data || String || transaction data encoded in hexadecimal (byte-for-byte)&lt;br /&gt;
|-&lt;br /&gt;
| depends || Array of Numbers || other transactions before this one (by 1-based index in &amp;quot;transactions&amp;quot; list) that must be present in the final block if this one is; if key is not present, dependencies are unknown and clients MUST NOT assume there aren&#039;t any&lt;br /&gt;
|-&lt;br /&gt;
| fee || Number || difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn&#039;t one&lt;br /&gt;
|-&lt;br /&gt;
| hash || String || hash/id encoded in little-endian hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| required || Boolean || if provided and true, this transaction must be in the final block&lt;br /&gt;
|-&lt;br /&gt;
| sigops || Number || total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren&#039;t any&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Only the &amp;quot;data&amp;quot; key is required, but servers should provide the others if they are known.&lt;br /&gt;
&lt;br /&gt;
===Block Submission===&lt;br /&gt;
&lt;br /&gt;
A JSON-RPC method is defined, called &amp;quot;submitblock&amp;quot;, to submit potential blocks (or shares).&lt;br /&gt;
It accepts two arguments:&lt;br /&gt;
the first is always a String of the hex-encoded block data to submit;&lt;br /&gt;
the second is an Object of parameters, and is optional if parameters are not needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=3|submitblock parameters (2nd argument)&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| workid || String || if the server provided a workid, it MUST be included with submissions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This method MUST return either null (when a share is accepted), a String describing briefly the reason the share was rejected, or an Object of these with a key for each merged-mining chain the share was submitted to.&lt;br /&gt;
&lt;br /&gt;
===Optional: Long Polling===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | template request&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| capabilities || Array of Strings || miners which support long polling SHOULD provide a list including the String &amp;quot;longpoll&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| longpollid || String || &amp;quot;longpollid&amp;quot; of job to monitor for expiration; required and valid only for long poll requests&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | template&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| longpollid || String || unique identifier for long poll request; MUST be omitted if the server does not support long polling&lt;br /&gt;
|-&lt;br /&gt;
| longpolluri || String || if provided, an alternate URI to use for long poll requests&lt;br /&gt;
|-&lt;br /&gt;
| submitold || Boolean || only relevant for long poll responses: indicates if work received prior to this response remains potentially valid (default) and should have its shares submitted; if false, the miner may wish to discard its share queue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the server supports long polling, it MUST include a &amp;quot;longpollid&amp;quot; key in block templates.&lt;br /&gt;
It MAY supply the &amp;quot;longpolluri&amp;quot; key with a relative or absolute URI, which MAY specify a completely different resource than the original connection, including port number.&lt;br /&gt;
If &amp;quot;longpolluri&amp;quot; is provided by the server, clients MUST only attempt to use that URI for longpoll requests.&lt;br /&gt;
&lt;br /&gt;
Clients MAY start a longpoll request with a standard JSON-RPC request (in the case of HTTP transport, POST with data) and same authorization, setting the &amp;quot;longpollid&amp;quot; parameter in the request to the value provided by the server.&lt;br /&gt;
&lt;br /&gt;
This request SHOULD NOT be processed nor answered by the server until it wishes to replace the current block data as identified by the &amp;quot;longpollid&amp;quot;.&lt;br /&gt;
Clients SHOULD make this request with a very long request timeout and MUST accept servers sending a partial response in advance (such as HTTP headers with &amp;quot;chunked&amp;quot; Transfer-Encoding), and only delaying the completion of the final JSON response until processing.&lt;br /&gt;
&lt;br /&gt;
Upon receiving a completed response:&lt;br /&gt;
* Only if &amp;quot;submitold&amp;quot; is provided and false, the client MAY discard the results of past operations and MUST begin working on the new work immediately.&lt;br /&gt;
* The client SHOULD begin working on the new work received as soon as possible, if not immediately.&lt;br /&gt;
* The client SHOULD make a new request to the same long polling URI.&lt;br /&gt;
&lt;br /&gt;
If a client receives an incomplete or invalid response, it SHOULD retry the request with an exponential backoff.&lt;br /&gt;
Clients MAY implement this backoff with limitations (such as maximum backoff time) or any algorithm as deemed suitable.&lt;br /&gt;
It is, however, forbidden to simply retry immediately with no delay after more than one failure.&lt;br /&gt;
In the case of a &amp;quot;Forbidden&amp;quot; response (for example, HTTP 403), a client SHOULD NOT attempt to retry without user intervention.&lt;br /&gt;
&lt;br /&gt;
===Optional: Template Tweaking===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | template request&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| sigoplimit || Number or Boolean || maximum number of sigops to include in template&lt;br /&gt;
|-&lt;br /&gt;
| sizelimit || Number or Boolean || maximum number of bytes to use for the entire block&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;sigoplimit&amp;quot; and &amp;quot;sizelimit&amp;quot;, negative values and zero are offset from the server-determined block maximum.&lt;br /&gt;
If a Boolean is provided and true, the default limit is used; if false, the server is instructed not to use any limits on returned template.&lt;br /&gt;
Servers SHOULD respect these desired maximums, but are NOT required to:&lt;br /&gt;
clients SHOULD check that the returned template satisfies their requirements appropriately.&lt;br /&gt;
&lt;br /&gt;
===Appendix: Example Rejection Reasons===&lt;br /&gt;
Possible reasons a share may be rejected include, but are not limited to:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=2| share rejection reasons&lt;br /&gt;
|-&lt;br /&gt;
! Reason !! Description&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-flag || the server detected a feature-signifying flag that it does not allow&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-length || the coinbase was too long (bitcoin limit is 100 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-prefix || the server only allows appending to the coinbase, but it was modified beyond that&lt;br /&gt;
|-&lt;br /&gt;
| bad-diffbits || &amp;quot;bits&amp;quot; were changed&lt;br /&gt;
|-&lt;br /&gt;
| bad-prevblk || the previous-block is not the one the server intends to build on&lt;br /&gt;
|-&lt;br /&gt;
| bad-txnmrklroot || the block header&#039;s merkle root did not match the transaction merkle tree&lt;br /&gt;
|-&lt;br /&gt;
| bad-txns || the server didn&#039;t like something about the transactions in the block&lt;br /&gt;
|-&lt;br /&gt;
| bad-version || the version was wrong&lt;br /&gt;
|-&lt;br /&gt;
| duplicate || the server already processed this block data&lt;br /&gt;
|-&lt;br /&gt;
| high-hash || the block header did not hash to a value lower than the specified target&lt;br /&gt;
|-&lt;br /&gt;
| rejected || a generic rejection without details&lt;br /&gt;
|-&lt;br /&gt;
| stale-prevblk || the previous-block is no longer the one the server intends to build on&lt;br /&gt;
|-&lt;br /&gt;
| stale-work || the work this block was based on is no longer accepted&lt;br /&gt;
|-&lt;br /&gt;
| time-invalid || the time was not acceptable&lt;br /&gt;
|-&lt;br /&gt;
| time-too-new || the time was too far in the future&lt;br /&gt;
|-&lt;br /&gt;
| time-too-old || the time was too far in the past&lt;br /&gt;
|-&lt;br /&gt;
| unknown-user || the user submitting the block was not recognized&lt;br /&gt;
|-&lt;br /&gt;
| unknown-work || the template or workid could not be identified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
bitcoind&#039;s JSON-RPC server can no longer support the load of generating the work required to productively mine Bitcoin, and external software specializing in work generation has become necessary.&lt;br /&gt;
At the same time, new independent node implementations are maturing to the point where they will also be able to support miners.&lt;br /&gt;
&lt;br /&gt;
A common standard for communicating block construction details is necessary to ensure compatibility between the full nodes and work generation software.&lt;br /&gt;
&lt;br /&gt;
==Rationale==&lt;br /&gt;
Why not just deal with transactions as hashes (txids)?&lt;br /&gt;
* Servers might not have access to the transaction database, or miners may wish to include transactions not broadcast to the network as a whole.&lt;br /&gt;
* Miners may opt not to do full transaction verification, and may not have access to the transaction database on their end.&lt;br /&gt;
&lt;br /&gt;
What is the purpose of &amp;quot;workid&amp;quot;?&lt;br /&gt;
* If servers allow all mutations, it may be hard to identify which job it is based on. While it may be possible to verify the submission by its content, it is much easier to compare it to the job issued. It is very easy for the miner to keep track of this. Therefore, using a &amp;quot;workid&amp;quot; is a very cheap solution to enable more mutations.&lt;br /&gt;
&lt;br /&gt;
Why should &amp;quot;sigops&amp;quot; be provided for transactions?&lt;br /&gt;
* Due to the [[BIP 0016]] changes regarding rules on block sigops, it is impossible to count sigops from the transactions themselves (the sigops in the scriptCheck must also be included in the count).&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
&lt;br /&gt;
* [https://gitorious.org/bitcoin/eloipool Eloipool]&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/936/files bitcoind]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[BIP 0023|BIP 23: getblocktemplate - Pooled Mining]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28843</id>
		<title>Electrum/TODO</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28843"/>
		<updated>2012-07-17T20:53:37Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* More fancy currency conversion calculations.&lt;br /&gt;
* Button to go from full -&amp;gt; lite mode.&lt;br /&gt;
&lt;br /&gt;
== Easy ==&lt;br /&gt;
&lt;br /&gt;
* Settings option to choose gui (gtk, qt, lite)&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28802</id>
		<title>Electrum/TODO</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28802"/>
		<updated>2012-07-16T22:32:55Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Easy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* More fancy currency conversion calculations.&lt;br /&gt;
* Button to go from full -&amp;gt; lite mode.&lt;br /&gt;
&lt;br /&gt;
== Easy ==&lt;br /&gt;
&lt;br /&gt;
* Settings option to choose gui (gtk, qt, lite)&lt;br /&gt;
* -h and help are different&lt;br /&gt;
* signmessage crash&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28477</id>
		<title>Electrum/TODO</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28477"/>
		<updated>2012-07-07T11:39:05Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* More fancy currency conversion calculations.&lt;br /&gt;
* Button to go from full -&amp;gt; lite mode.&lt;br /&gt;
&lt;br /&gt;
== Easy ==&lt;br /&gt;
&lt;br /&gt;
* Settings option to choose gui (gtk, qt, lite)&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28476</id>
		<title>Electrum/TODO</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28476"/>
		<updated>2012-07-07T11:23:33Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* More fancy currency conversion calculations.&lt;br /&gt;
* Button to go from full -&amp;gt; lite mode.&lt;br /&gt;
&lt;br /&gt;
== Easy ==&lt;br /&gt;
&lt;br /&gt;
* Settings option to choose gui (gtk, qt, lite)&lt;br /&gt;
* Settings option to save last selected currency setting.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28459</id>
		<title>Electrum/TODO</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28459"/>
		<updated>2012-07-06T20:04:12Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Receive button should select random *unused* address (0 BTC balance).&lt;br /&gt;
* More fancy currency conversion calculations.&lt;br /&gt;
* Button to go from full -&amp;gt; lite mode.&lt;br /&gt;
&lt;br /&gt;
== Easy ==&lt;br /&gt;
&lt;br /&gt;
* Settings option to choose gui (gtk, qt, lite)&lt;br /&gt;
* Settings option to save last selected currency setting.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28458</id>
		<title>Electrum/TODO</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum/TODO&amp;diff=28458"/>
		<updated>2012-07-06T19:54:14Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Created page with &amp;quot;* Receive button should select random *unused* address (0 BTC balance). * Settings option to choose gui (gtk, qt, lite) * Settings option to save last selected currency settin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Receive button should select random *unused* address (0 BTC balance).&lt;br /&gt;
* Settings option to choose gui (gtk, qt, lite)&lt;br /&gt;
* Settings option to save last selected currency setting.&lt;br /&gt;
* More fancy currency conversion calculations.&lt;br /&gt;
* Button to go from full -&amp;gt; lite mode.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Electrum&amp;diff=28457</id>
		<title>Electrum</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Electrum&amp;diff=28457"/>
		<updated>2012-07-06T19:52:08Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Electrum_logo.png|400px]][[Image:Capture-Electrum.png|right|600px|screenshot of Electrum with its Qt gui]]&lt;br /&gt;
&lt;br /&gt;
[http://ecdsa.org/electrum Electrum] is a lightweight Bitcoin client, based on a client-server protocol. &lt;br /&gt;
It was released on november 5, 2011.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Main features:&#039;&#039;&#039;&lt;br /&gt;
* Encrypted wallet: the file that contains your bitcoins is protected with a password. You are protected from thieves.&lt;br /&gt;
* Deterministic key generation: If you lose your wallet, you can recover it from its seed. You are protected from your own mistakes.&lt;br /&gt;
* Instant on: the client does not download the blockchain, it requests that information from a server. No delays, always up-to-date.&lt;br /&gt;
* Transactions are signed locally: Your private keys are not shared with the server. You do not have to trust the server with your money.&lt;br /&gt;
* Freedom and Privacy: The server does not store user accounts. You are not tied to a particular server, and the server does not need to know you.&lt;br /&gt;
* No scripts: Electrum does not download any script. A compromised server cannot send you arbitrary code and steal your bitcoins.&lt;br /&gt;
* No single point of failure: The server code is open source, anyone can run a server.&lt;br /&gt;
* Firewall friendly: The client does not need to open a port, it simply polls the server for updates.&lt;br /&gt;
* Free software: Gnu GPL v3. Anyone can audit the code.&lt;br /&gt;
* Written in Python. The code is short, and easy to review.&lt;br /&gt;
* Support for Bitcoin URIs, signed URIs and Bitcoin aliases&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Graphical User Interfaces===&lt;br /&gt;
Electrum has two GUIs: one that is based on Gtk, and a newer one based on Qt. The Qt GUI is enabled by default. To use the gtk interface, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./electrum -g gtk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition, Electrum has a rich set of commands for the command line interface.&lt;br /&gt;
&lt;br /&gt;
===Brain Wallet===&lt;br /&gt;
&lt;br /&gt;
Electrum uses a type 2 deterministic key generation algorithm.&lt;br /&gt;
This means that all the keys are derived from a seed.&lt;br /&gt;
&lt;br /&gt;
Typical seeds have 128 bits of entropy. Electrum provides mnemonic code in order to represent the seed.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
*hexadecimal: 431a62f1c86555d3c45e5c4d9e10c8c7 &lt;br /&gt;
*mnemonic: &amp;quot;constant forest adore false green weave stop guy fur freeze giggle clock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can display the seed with the command line interface. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./electrum seed&lt;br /&gt;
Password:&lt;br /&gt;
431a62f1c86555d3c45e5c4d9e10c8c7 &amp;quot;constant forest adore false green weave stop guy fur freeze giggle clock&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple wallets===&lt;br /&gt;
Electrum uses one single file per wallet. Your default wallet is located in your user account.&lt;br /&gt;
If you want to use another wallet, use the -w option followed by the wallet path and name:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./electrum -w /path/to/my/wallet/wallet_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Export and import addresses===&lt;br /&gt;
&lt;br /&gt;
You can export your private keys using the &#039;addresses&#039; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./electrum addresses -ak&lt;br /&gt;
Password:&lt;br /&gt;
1LGoehbyeX4QBEPK1a6dhyaoMQZfqg5LKX:5JBSttEGhjEcPidSovW66Rin2EZ6LEHZ2qx8Pu2RqqNaDTBVWaF   &lt;br /&gt;
1KcsBJa2cCxVkGJfSsg5bUeXN7Y5uLa8mP:5KiP4uiNT6KG8jnXbainCM8rDWRrgxt3PAyut4FFpDoCo1Rh6VM   &lt;br /&gt;
1PXsn7LVXTccGhJPTUL8r2EGB4fF9kvex3:5Kj8mvBJReyk8xEBMx5cTnciQCxto5JmudiTPkqwMcd61Kf1Jqc   &lt;br /&gt;
1KteSFTAphyByLTtUfFiVQ9s7fMVmx7c2h:5JeZ3FTbWcksLt3PKydd5U9p952UQRHwv3LoxzCA9LZ7V2bku5p   &lt;br /&gt;
1GE5ZChAobeTEPLHDCDDKTSg3XvLkcQFjS:5JwtGEygTwF2nouhRVzW3w5DWZd1sCgxLtnd1v51wjkbUrp5sqH   &lt;br /&gt;
12YNehfAoYTiwjTXULwaZqTCauu2D61fq6:5Jvcq19ePCXKcVun4n7US99CsrEByUK2kgxXBA3rBVBqYZjhfwD  [change] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are two options in this example:&lt;br /&gt;
* option -a means: &#039;list all addresses&#039;. if you don&#039;t use it, change addresses are not listed.&lt;br /&gt;
* option -k means: display the private keys&lt;br /&gt;
&lt;br /&gt;
You can also import addresses into an electrum wallet, with the &#039;import&#039; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./electrum import 1LGoehbyeX4QBEPK1a6dhyaoMQZfqg5LKX:5JBSttEGhjEcPidSovW66Rin2EZ6LEHZ2qx8Pu2RqqNaDTBVWaF&lt;br /&gt;
keypair imported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that imported keys do not belong to the deterministic sequence of your wallet; if you import keys in a wallet, you must back it up!&lt;br /&gt;
&lt;br /&gt;
===Offline wallet===&lt;br /&gt;
&lt;br /&gt;
It is possible to create a transaction on an offline computer,&lt;br /&gt;
and to broadcast them from another computer, with a wallet that does not have the seed or private keys.&lt;br /&gt;
&lt;br /&gt;
====How to prepare an offline wallet ====&lt;br /&gt;
*step 1: create a wallet on your offline computer&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[offline]$ electrum -o -w wallet create&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*step 2: extract the seed from your wallet file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[offline]$ electrum -o -w wallet deseed &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will remove the seed from &#039;wallet&#039;, and save it to a file named &#039;wallet.seed&#039;&lt;br /&gt;
*step 3: transfer the deseeded wallet to the online computer (for example with a usb stick)&lt;br /&gt;
*step 4: run electrum on the online computer; this will synchronize your wallet with the bitcoin network, and you will be able to monitor incoming transactions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[online]$ electrum -w wallet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====How to send a transaction with an offline wallet====&lt;br /&gt;
*step 1: copy the synchronized wallet file to your offline computer, in the directory where the seed is.&lt;br /&gt;
*step 2: restore the seed in the wallet file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[offline]$ electrum -w wallet reseed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*step 3: create the transaction&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[offline]$ electrum -w wallet mktx &amp;lt;recipient&amp;gt; &amp;lt;amount&amp;gt;  &amp;gt;  tx_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*step 4: with the usb stick, copy the transaction to the online computer:&lt;br /&gt;
*step 5: broadcast the transaction on the online computer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[online]$ electrum -w wallet sendtx  `cat tx_file`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List of commands ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command !! description !! syntax !! requires password !! needs to be online&lt;br /&gt;
|-&lt;br /&gt;
| addresses || show your list of addresses, optionally with private keys. || addresses [-a] [-b] [-k] || iff -k || no&lt;br /&gt;
|-&lt;br /&gt;
| balance || shows the balance of your wallet or of an address || balance [address] || no || yes&lt;br /&gt;
|-&lt;br /&gt;
| contacts || print your list of contacts || contacts || no || no&lt;br /&gt;
|-&lt;br /&gt;
| create || create a new wallet || create || no || no&lt;br /&gt;
|-&lt;br /&gt;
| deseed || Remove seed from wallet and store it to .seed file  || deseed || no || no&lt;br /&gt;
|-&lt;br /&gt;
| eval || call python eval || eval &amp;lt;expression&amp;gt; || no || no&lt;br /&gt;
|-&lt;br /&gt;
| help || display the help for a command || help [command] || no || no&lt;br /&gt;
|-&lt;br /&gt;
| history || print the transaction history || history || no || yes&lt;br /&gt;
|-&lt;br /&gt;
| import || import a keypair || import &amp;lt;address:private_key&amp;gt; || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| label || change the label of a transaction or address || label &amp;lt;label&amp;gt; || no || no&lt;br /&gt;
|-&lt;br /&gt;
| mktx || create a transaction and dump it || mktx [-s sourceaddr] [-c changeaddr] [-f fee] &amp;lt;address&amp;gt; &amp;lt;amount&amp;gt;  || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| password || update your password || password || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| payto || create and broadcast a transaction || payto [-s sourceaddr] [-c changeaddr] [-f fee] &amp;lt;address&amp;gt; &amp;lt;amount&amp;gt; || yes || yes&lt;br /&gt;
|-&lt;br /&gt;
| reseed || take seed from .seed file and add it to wallet (it checks that keys are consistent). || reseed || no || no&lt;br /&gt;
|-&lt;br /&gt;
| restore || restore a wallet from seed || restore || no || yes&lt;br /&gt;
|-&lt;br /&gt;
| sendtx || broadcast a transaction || sendtx &amp;lt;tx&amp;gt; || no || yes&lt;br /&gt;
|-&lt;br /&gt;
| seed || print your seed || seed || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| signmessage || sign a message (as in bitcoind) || signmessage &amp;lt;address&amp;gt; &amp;lt;message&amp;gt; || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| validateaddress || check is the argument is a valid bitcoin address || validateaddress &amp;lt;address&amp;gt; || no || no&lt;br /&gt;
|-&lt;br /&gt;
| verifymessage || verify a message (as in bitcoind) || verifymessage &amp;lt;address&amp;gt; &amp;lt;signature&amp;gt; &amp;lt;message&amp;gt; || no || no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Electrum was announced November 5, 2011&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=50936.0 Electrum - a new thin client]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Electrum/Documentation]] : General documentation of the Electrum client&lt;br /&gt;
* [[Electrum/Translation]]&lt;br /&gt;
* [[Electrum/TODO]]&lt;br /&gt;
* [[Thin Client Security]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://ecdsa.org/electrum Electrum] project website&lt;br /&gt;
* [https://gitorious.org/electrum Electrum] project source (gitorius)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Clients]]&lt;br /&gt;
[[Category:Open Source]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0034&amp;diff=28455</id>
		<title>BIP 0034</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0034&amp;diff=28455"/>
		<updated>2012-07-06T18:06:53Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Protected &amp;quot;BIP 0034&amp;quot; (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 34&lt;br /&gt;
  Title: Block v2, Height in Coinbase&lt;br /&gt;
  Author: Gavin Andresen &amp;lt;gavinandresen@gmail.com&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 2012-07-06&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
Bitcoin blocks and transactions are versioned binary structures. Both currently use version 1. This BIP introduces an upgrade path for versioned transactions and blocks. A unique value is added to newly produced coinbase transactions, and blocks are updated to version 2.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
# Clarify and exercise the mechanism whereby the bitcoin network collectively consents to upgrade transaction or block binary structures, rules and behaviors.&lt;br /&gt;
# Enforce block and transaction uniqueness, and assist unconnected block validation.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
# Treat transactions with a version greater than 1 as non-standard (official Satoshi client will not mine or relay them).&lt;br /&gt;
# Add height as the first item in the coinbase transaction&#039;s scriptSig, and increase block version to 2. The format of the height is &amp;quot;serialized CScript&amp;quot; -- first byte is number of bytes in the number (will be 0x03 on main net for the next 300 or so years), following bytes are little-endian representation of the number.  Height is the height of the mined block in the block chain, where the genesis block is height zero (0).&lt;br /&gt;
# 75% rule: If 750 of the last 1,000 blocks are version 2 or greater, reject invalid version 2 blocks. (testnet3: 51 of last 100)&lt;br /&gt;
# 95% rule (&amp;quot;Point of no return&amp;quot;): If 950 of the last 1,000 blocks are version 2 or greater, reject all version 1 blocks. (testnet3: 75 of last 100)&lt;br /&gt;
&lt;br /&gt;
==Backward compatibility==&lt;br /&gt;
&lt;br /&gt;
All older clients are compatible with this change. Users and merchants should not be impacted. Miners are strongly recommended to upgrade to version 2 blocks. Once 95% of the miners have upgraded to version 2, the remainder will be orphaned if they fail to upgrade.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
https://github.com/bitcoin/bitcoin/pull/1526&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Intersango&amp;diff=28356</id>
		<title>Intersango</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Intersango&amp;diff=28356"/>
		<updated>2012-06-30T11:56:36Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[currency exchange|exchange]] offering multiple trading markets for trading bitcoins against multiple currencies.&lt;br /&gt;
&lt;br /&gt;
Traders add funds and then place orders to buy and sell.  Intersango acts as an escrow. The site charges no trading fees.&lt;br /&gt;
&lt;br /&gt;
[[Bitcoin Consultancy]] operates the exchange.&lt;br /&gt;
&lt;br /&gt;
Intersango has a trading [https://bitcoinconsultancy.com/wiki/index.php/Intersango/API API]&lt;br /&gt;
&lt;br /&gt;
==Trading==&lt;br /&gt;
===Buying===&lt;br /&gt;
&lt;br /&gt;
A buy order is executed partially or in full when the price bid can be matched against a sell order that is at or below the bid amount.&lt;br /&gt;
&lt;br /&gt;
===Selling===&lt;br /&gt;
&lt;br /&gt;
A sell order is executed partially or in full when the price asked can be matched against a buy order that is at or above the ask amount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No Fee (for a limited time).&lt;br /&gt;
&lt;br /&gt;
==Adding Funds==&lt;br /&gt;
===BTC===&lt;br /&gt;
&lt;br /&gt;
There are no fees incurred when when transferring bitcoins for deposit.  Funds are available once [[confirmation|confirmed]] (4 confirms), a process that can take roughly forty minutes.&lt;br /&gt;
&lt;br /&gt;
===EUR===&lt;br /&gt;
The exchange accepts SEPA bank transfers for deposit.  A 5 PLN fee is taken by the bank. No additional fees is taken.&lt;br /&gt;
&lt;br /&gt;
===PLN===&lt;br /&gt;
The exchange accepts polish bank transfers for deposit.  There are no fees.&lt;br /&gt;
&lt;br /&gt;
===USD===&lt;br /&gt;
The exchange accepts [[Dwolla]] transfers (no fee), bank wire transfers and ACH.  There are no fees.&lt;br /&gt;
&lt;br /&gt;
===GBP===&lt;br /&gt;
The exchange accepts standard UK GBP bank transfers.&lt;br /&gt;
&lt;br /&gt;
==Withdrawing Funds==&lt;br /&gt;
&lt;br /&gt;
===BTC===&lt;br /&gt;
Bitcoins may be withdrawn at no charge.&lt;br /&gt;
&lt;br /&gt;
===EUR===&lt;br /&gt;
Withdrawals as SEPA transfers.  A fee of 5 PLN is taken by the bank.  No additional fee is charged.&lt;br /&gt;
&lt;br /&gt;
===PLN===&lt;br /&gt;
Withdrawals as standard polish PLN bank transfers.&lt;br /&gt;
&lt;br /&gt;
===USD===&lt;br /&gt;
Withdrawals are through [[Dwolla]].  There is no fee incurred from the exchange for withdrawing funds.&lt;br /&gt;
&lt;br /&gt;
===GBP===&lt;br /&gt;
Withdrawals as standard UK GBP bank transfers.&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
&lt;br /&gt;
See the [https://intersango.com/api.php API page] for more info.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import httplib&lt;br /&gt;
import urllib&lt;br /&gt;
import json&lt;br /&gt;
&lt;br /&gt;
class Intersango:&lt;br /&gt;
    ORDER_QUEUED = &#039;queued&#039;&lt;br /&gt;
    ORDER_OPEN = &#039;open&#039;&lt;br /&gt;
    ORDER_EXPIRED = &#039;expired&#039;&lt;br /&gt;
    ORDER_CANCELLED = &#039;cancelled&#039;&lt;br /&gt;
    ORDER_FULFILLED = &#039;fulfilled&#039;&lt;br /&gt;
&lt;br /&gt;
    BUY = &#039;false&#039;&lt;br /&gt;
    SELL = &#039;true&#039;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, api_key):&lt;br /&gt;
        self.connection = httplib.HTTPSConnection(&#039;intersango.com&#039;)&lt;br /&gt;
        self.api_key = api_key&lt;br /&gt;
&lt;br /&gt;
    def make_request(self, page, params={}):&lt;br /&gt;
        headers = {&amp;quot;Content-type&amp;quot;: &amp;quot;application/x-www-form-urlencoded&amp;quot;,&lt;br /&gt;
                   &amp;quot;Connection&amp;quot;: &amp;quot;Keep-Alive&amp;quot;, &amp;quot;Keep-Alive&amp;quot;: 30,&lt;br /&gt;
                   &amp;quot;Accept&amp;quot;: &amp;quot;text/plain&amp;quot;}&lt;br /&gt;
        if type(params) == dict:&lt;br /&gt;
            params[&#039;api_key&#039;] = self.api_key&lt;br /&gt;
        elif type(params) == list:&lt;br /&gt;
            params.append((&#039;api_key&#039;, self.api_key))&lt;br /&gt;
        else:&lt;br /&gt;
            raise TypeError(&#039;Unknown parameter list type&#039;)&lt;br /&gt;
        params = urllib.urlencode(params)&lt;br /&gt;
        base_url = &#039;/api/authenticated/v0.1/%s.php&#039;%page&lt;br /&gt;
        self.connection.request(&#039;POST&#039;, base_url, params, headers)&lt;br /&gt;
        response = self.connection.getresponse()&lt;br /&gt;
        if response.status == 404:&lt;br /&gt;
            return None&lt;br /&gt;
        return json.loads(response.read())&lt;br /&gt;
&lt;br /&gt;
    def accounts(self):&lt;br /&gt;
        return self.make_request(&#039;listAccounts&#039;)&lt;br /&gt;
&lt;br /&gt;
    def orders(self, account_id, states=[], last_order_id=None):&lt;br /&gt;
        params = [(&#039;account_id&#039;, account_id)]&lt;br /&gt;
        for state in states:&lt;br /&gt;
            params.append((&#039;states[]&#039;, state))&lt;br /&gt;
        if last_order_id is not None:&lt;br /&gt;
            params.append((&#039;last_order_id&#039;, last_order_id))&lt;br /&gt;
        return self.make_request(&#039;listOrders&#039;, params)&lt;br /&gt;
&lt;br /&gt;
    def deposits(self, account_id):&lt;br /&gt;
        return self.make_request(&#039;listDeposits&#039;, {&#039;account_id&#039;: account_id})&lt;br /&gt;
&lt;br /&gt;
    def withdrawals(self, account_id):&lt;br /&gt;
        return self.make_request(&#039;listWithdrawalRequests&#039;,&lt;br /&gt;
                                 {&#039;account_id&#039;: account_id})&lt;br /&gt;
&lt;br /&gt;
    def place_limit_order(self, quantity, rate, is_selling, base_id, quote_id):&lt;br /&gt;
        params = {&#039;quantity&#039;: quantity, &#039;rate&#039;: rate, &#039;selling&#039;: is_selling,&lt;br /&gt;
                  &#039;base_account_id&#039;: base_id, &#039;quote_account_id&#039;: quote_id}&lt;br /&gt;
        return self.make_request(&#039;placeLimitOrder&#039;, params)&lt;br /&gt;
&lt;br /&gt;
    def cancel_order(self, account_id, order_id):&lt;br /&gt;
        params = {&#039;account_id&#039;: account_id, &#039;order_id&#039;: order_id}&lt;br /&gt;
        return self.make_request(&#039;requestCancelOrder&#039;, params)&lt;br /&gt;
&lt;br /&gt;
    def cancel_withdrawal(self, account_id, withdrawal_request_id):&lt;br /&gt;
        params = {&#039;account_id&#039;: account_id, &lt;br /&gt;
                  &#039;withdrawal_request_id&#039;: withdrawal_request_id}&lt;br /&gt;
        return self.make_request(&#039;cancelWithdrawalRequest&#039;, params)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    intersango = Intersango(&#039;3223kdkk323h32kj3hkj23233j&#039;)&lt;br /&gt;
    print &#039;Accounts: &#039;, intersango.accounts()&lt;br /&gt;
    print &#039;Orders: &#039;, \&lt;br /&gt;
        intersango.orders(411289412410, &lt;br /&gt;
            [Intersango.ORDER_CANCELLED, Intersango.ORDER_FULFILLED])&lt;br /&gt;
    print &#039;Deposits: &#039;, intersango.deposits(861502532543)&lt;br /&gt;
    print &#039;Withdrawals: &#039;, intersango.withdrawals(702703681384)&lt;br /&gt;
    intersango.place_limit_order(&#039;1&#039;, &#039;2.0&#039;, Intersango.BUY, &lt;br /&gt;
                                 861502521543, 411982412410)&lt;br /&gt;
    intersango.cancel_order(412989412410, 21724)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
The service was launched on July 6, 2011&amp;lt;ref&amp;gt;[http://forum.bitcoin.org/index.php?topic=26543.0 Intersango.com EUR exchange is now live]&amp;lt;/ref&amp;gt;.  The Intersango [[:Category:Open Source|open source]] software that the exchange runs on was announced on March 17, 2011&amp;lt;ref&amp;gt;[https://bitcointalk.org/index.php?topic=4579.0 Free Bitcoin exchange software- Intersango]&amp;lt;/ref&amp;gt;.  In September, 2011 the exchange began using a new version of the Intersango open source exchange project with two currency markets (BTC/EUR, BTC/USD) live under the Intersango brand and plans made for the third (BTC/GBP) when [[Britcoin]] accounts are migrated at a future date.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Buying bitcoins]]&lt;br /&gt;
* [[Selling bitcoins]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [https://intersango.com Intersango] EUR exchange website&lt;br /&gt;
* [http://gitorious.org/intersango Intersango] exchange project on Gitorious&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Exchanges]]&lt;br /&gt;
[[Category:eWallets]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27378</id>
		<title>BIP 0015</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27378"/>
		<updated>2012-06-01T14:03:31Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Namecoin ID */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 15&lt;br /&gt;
  Title: BIP Aliases&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Deferred&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 10-12-2011&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using vanilla bitcoin, to send funds to a destination, an address in the form 1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ is needed. The problem with using addresses is they are not easy to remember. An analogy can be thought if one were required to enter the IP address of their favourite websites if domain names did not exist.&lt;br /&gt;
&lt;br /&gt;
This document aims to layout through careful argument, a bitcoin alias system. This is a big modification to the protocol that is not easily changed in the future and has big ramifications. There is impetus in getting it correct the first time. Aliases have to be robust and secure.&lt;br /&gt;
&lt;br /&gt;
== Schemes ==&lt;br /&gt;
&lt;br /&gt;
Here are a few different proposals and the properties of each system.&lt;br /&gt;
&lt;br /&gt;
=== FirstBits ===&lt;br /&gt;
&lt;br /&gt;
FirstBits is a proposal for using the blockchain as an address book.&lt;br /&gt;
&lt;br /&gt;
When bitcoins are sent to an address, that address becomes recorded in the blockchain. It is therefore known that this address exists or did exist by simply seeing that there was a payment to that address. FirstBits is a method to have a memorable alias. One first converts the address to lower-case, then takes the first few unique characters. This is your FirstBits alias.&lt;br /&gt;
&lt;br /&gt;
As an example, brmlab hackerspace in Prague has an address for purchasing food or drink, or making donations:&lt;br /&gt;
&lt;br /&gt;
  1BRMLAB7nryYgFGrG8x9SYaokb8r2ZwAsX&lt;br /&gt;
&lt;br /&gt;
Their FirstBits alias becomes:&lt;br /&gt;
&lt;br /&gt;
  1brmlab&lt;br /&gt;
&lt;br /&gt;
It is enough information to be given the FirstBits alias &#039;&#039;1brmlab&#039;&#039;. When someone wishes to make a purchase, without FirstBits, they either have to type out their address laboriously by hand, scan their QR code (which requires a mobile handset that this author does not own) or find their address on the internet to copy and paste into the client to send bitcoins. FirstBits alleviates this impracticality by providing an easy method to make payments.&lt;br /&gt;
&lt;br /&gt;
Together with Vanitygen (vanity generator), it becomes possible to create memorable unique named addresses. Addresses that are meaningful, rather than an odd assemblage of letters and numbers but add context to the destination.&lt;br /&gt;
&lt;br /&gt;
However FirstBits has its own problems. One is that the possible aliases one is able to generate is limited by the available computing power available. It may not be feasible to generate a complete or precise alias that is wanted- only approximates may be possible. It is also computationally resource intensive which means a large expenditure of power for generating unique aliases in the future, and may not scale up to the level of individuals at home or participants with hand-held devices in an environment of ubiquitous computing.&lt;br /&gt;
&lt;br /&gt;
FirstBits scales extremely poorly as the network grows. Each indexer or lookup node needs to keep track of every bitcoin address ever in existence and provide a fast lookup from the aliases to those addresses. As the network grows linearly, the number of addresses should grow exponentially (assuming a networked effect of (n-1)*(n-2)/2) rapidly making this scheme unfeasible.&lt;br /&gt;
&lt;br /&gt;
Light clients of the partial merkle root types become dependent on a trusted third party for their alias lookups. The cost of storing every bitcoin address is too high considering their typical use-case on low-resource devices. This factor more than the others, means this scheme is sub-optimal and must be rejected.&lt;br /&gt;
&lt;br /&gt;
=== DNS TXT Records ===&lt;br /&gt;
&lt;br /&gt;
DNS allows TXT records to be created containing arbitrary data. In a bitcoin alias system, a custom format mutually agreed upon by a BIP standard would be used to store mappings to bitcoin addresses from domain names. How such a format would look is out of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
An issue is that it requires people who wish to create such mappings to be familiar with configuring DNS records, and be able to run the necessary toolsets to insert the correct data. Although not a huge concern, it is a usability issue.&lt;br /&gt;
&lt;br /&gt;
Security wise, DNS is unsafe and insecure by design. It is possible to spoof records by being on the same network as another host. A number of revisions to mitigate the issue under the guise of DNSSEC have been in the works since the 1990s and are still being rolled out.&lt;br /&gt;
&lt;br /&gt;
As of Dec 2011, DNSSEC is still not yet a defacto standard on the internet. Should a participant in the bitcoin network wish to use DNS TXT records, they would in addition to having to configure DNS, be able to setup DNSSEC. This may not be feasible, especially where some registrars provide access to DNS through a web interface only.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of DNS TXT records is that updating a record takes time. This encourages people to not use new addresses per transaction which has certain security issues.&lt;br /&gt;
&lt;br /&gt;
=== Server Service ===&lt;br /&gt;
&lt;br /&gt;
Aside from using DNS TXT records, another possibility is using the domain name system to lookup hosts and then contact a service running on a predefined port to get the bitcoin address.&lt;br /&gt;
&lt;br /&gt;
# User wishes to send to foo@bar.net&lt;br /&gt;
# Client uses DNS to find the IP address of bar.net: 123.123.123.123&lt;br /&gt;
# Client connects to port 123.123.123.123:4567 and requests the bitcoin address for the user &#039;&#039;foo&#039;&#039;&lt;br /&gt;
# Server responds with the address or error code and terminates the connection.&lt;br /&gt;
# Client sends the funds to the address&lt;br /&gt;
&lt;br /&gt;
The service would be responsible for providing the mechanisms for changing and storing the mappings on their service. A front-end web interface could be provided to users wishing to use the service and customise their accounts on the server.&lt;br /&gt;
&lt;br /&gt;
This approach has the positive aspect of providing the best flexibility for the implementer to store the records however they wish in a database or plaintext file, and then serve them up quickly using a small server side daemon typically written in C. This approach is highly scalable.&lt;br /&gt;
&lt;br /&gt;
However this approach also suffers the problem of being reliant on DNS and hence also being vulnerable to spoofing. Hence DNSSEC is also required. This approach is slightly better than the DNS TXT records though since it makes inserting new users and modifying aliases very easy which allows people to run these server services more cheaply.&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Web Service ===&lt;br /&gt;
&lt;br /&gt;
HTTPS provides an additional layer of security by encrypting the connection, providing much needed privacy for users. Together with using Certificate Authorities, it fixes the issue with using DNSSEC since an error would be thrown up were someone to try to spoof a domain name on the local network.&lt;br /&gt;
&lt;br /&gt;
When trying to send to:&lt;br /&gt;
&lt;br /&gt;
  genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
The request is broken into the handle (genjix) and domain (foo.org) at the last occurrence of the @. The client then constructs a request that will query for the address.&lt;br /&gt;
&lt;br /&gt;
  https://foo.org/bitcoin-alias/?handle=genjix&lt;br /&gt;
&lt;br /&gt;
bitcoin-alias has been chosen as the query suffix because it allows this system to co-exist easily within another web root without the fear of name clashes.&lt;br /&gt;
&lt;br /&gt;
The query will then return an address which is used to make the payment.&lt;br /&gt;
&lt;br /&gt;
  1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ&lt;br /&gt;
&lt;br /&gt;
The details of whether a unique address is returned per query, whether an address is fetched from a pre-existing pool of addresses, and so on is an implementation detail unique to every server. How alias to address mappings are setup is dependent on the site which could have a web-interface and be providing a free service to users or be a private customised service serving pre-existing addresses. This is left up to sysop policy, and deliberately not defined here.&lt;br /&gt;
&lt;br /&gt;
A web service is trivial to setup and the cost is low. There are many free out of the box providers on the net that allows anyone with the most basic knowledge of web technologies to create their own website. By providing users with a package, anybody can quickly set themselves up with a bitcoin alias. It could be something as simple as a PHP script that the user edits with their custom settings and uploads themselves to their website.&lt;br /&gt;
&lt;br /&gt;
It also scales reasonably- anybody wishing to run a naming service can attach a backend with a variety of database technologies then provide a web frontend for users to customise and create their own aliases.&lt;br /&gt;
&lt;br /&gt;
A naive implementation is provided below as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.h&lt;br /&gt;
#ifndef NOMRESOLV_H__&lt;br /&gt;
#define NOMRESOLV_H__&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;quot;curl/curl.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using std::string;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
This class resolves against a server to lookup addresses.&lt;br /&gt;
To not conflict with the bitcoin addresses, we refer here to people&#039;s handles.&lt;br /&gt;
A handle is of the form:&lt;br /&gt;
&lt;br /&gt;
   genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
Most characters are valid for the username + password (and handled accordingly), but the domain follows usual web standards. It is possible to affix a path if needed,&lt;br /&gt;
&lt;br /&gt;
   genjix@bar.com/path/to/&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
class NameResolutionService&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    NameResolutionService();&lt;br /&gt;
    ~NameResolutionService();&lt;br /&gt;
&lt;br /&gt;
    // Three main methods map to RPC actions.&lt;br /&gt;
    string FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
    // A POST block&lt;br /&gt;
    class PostVariables&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        PostVariables();&lt;br /&gt;
        ~PostVariables();&lt;br /&gt;
        // Add a new key, value pair&lt;br /&gt;
        bool Add(const string&amp;amp; strKey, const string&amp;amp; strVal);&lt;br /&gt;
        curl_httppost* operator()() const;&lt;br /&gt;
    private:&lt;br /&gt;
        // CURL stores POST blocks as linked lists.&lt;br /&gt;
        curl_httppost *pBegin, *pEnd;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Explodes user@domain =&amp;gt; user, domain&lt;br /&gt;
    static void ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain);&lt;br /&gt;
    // Perform the HTTP request. Returns true on success.&lt;br /&gt;
    bool Perform();&lt;br /&gt;
&lt;br /&gt;
    // CURL error message&lt;br /&gt;
    char pErrorBuffer[CURL_ERROR_SIZE];  &lt;br /&gt;
    // CURL response&lt;br /&gt;
    string strBuffer;&lt;br /&gt;
    // CURL handle&lt;br /&gt;
    CURL *curl;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.cpp&lt;br /&gt;
#include &amp;quot;resolv.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;boost/lexical_cast.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;access.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// callback used to write response from the server&lt;br /&gt;
static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)  &lt;br /&gt;
{  &lt;br /&gt;
  int nResult = 0;  &lt;br /&gt;
  if (pBuffer != NULL)  &lt;br /&gt;
  {  &lt;br /&gt;
    pBuffer-&amp;gt;append(pData, nSize * nNmemb);  &lt;br /&gt;
    // How much did we write?  &lt;br /&gt;
    nResult = nSize * nNmemb;  &lt;br /&gt;
  }  &lt;br /&gt;
  return nResult;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    // Initialise CURL with our various options.&lt;br /&gt;
    curl = curl_easy_init();&lt;br /&gt;
    // This goes first in case of any problems below. We get an error message.&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);  &lt;br /&gt;
    // fail when server sends &amp;gt;= 404&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_HEADER, 0);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_302);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);&lt;br /&gt;
    // server response goes in strBuffer&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;amp;strBuffer);  &lt;br /&gt;
    pErrorBuffer[0] = &#039;\0&#039;;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::~NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    curl_easy_cleanup(curl);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void NameResolutionService::ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain)&lt;br /&gt;
{&lt;br /&gt;
    // split address at @ furthrest to the right&lt;br /&gt;
    size_t nPosAtsym = strHandle.rfind(&#039;@&#039;);&lt;br /&gt;
    strNickname = strHandle.substr(0, nPosAtsym);&lt;br /&gt;
    strDomain = strHandle.substr(nPosAtsym + 1, strHandle.size());&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::Perform()&lt;br /&gt;
{&lt;br /&gt;
    // Called after everything has been setup. This actually does the request.&lt;br /&gt;
    CURLcode result = curl_easy_perform(curl);  &lt;br /&gt;
    return (result == CURLE_OK);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string NameResolutionService::FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy)&lt;br /&gt;
{&lt;br /&gt;
    // GET is defined for &#039;getting&#039; data, so we use GET for the low risk fetching of people&#039;s addresses&lt;br /&gt;
    if (!curl)&lt;br /&gt;
        // For some reason CURL didn&#039;t start...&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Expand the handle&lt;br /&gt;
    string strNickname, strDomain;&lt;br /&gt;
    ExplodeHandle(strHandle, strNickname, strDomain);&lt;br /&gt;
    // url encode the nickname for get request&lt;br /&gt;
    const char* pszEncodedNick = curl_easy_escape(curl, strNickname.c_str(), strNickname.size());&lt;br /&gt;
    if (!pszEncodedNick)&lt;br /&gt;
        return &amp;quot;Unable to encode nickname.&amp;quot;;&lt;br /&gt;
    // construct url for GET request&lt;br /&gt;
    string strRequestUrl = strDomain + &amp;quot;/bitcoin-alias/?handle=&amp;quot; + pszEncodedNick;&lt;br /&gt;
    // Pass URL to CURL&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());  &lt;br /&gt;
    if (!Perform())&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Server should respond with a JSON that has the address in.&lt;br /&gt;
    strAddy = strBuffer;&lt;br /&gt;
    return &amp;quot;&amp;quot;;  // no error&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::PostVariables::PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    // pBegin/pEnd *must* be null before calling curl_formadd&lt;br /&gt;
    pBegin = NULL;&lt;br /&gt;
    pEnd = NULL;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::PostVariables::~PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    curl_formfree(pBegin);&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::PostVariables::Add(const string&amp;amp; strKey, const string&amp;amp; strVal)&lt;br /&gt;
{&lt;br /&gt;
    // Copy strings to this block. Return true on success.&lt;br /&gt;
    return curl_formadd(&amp;amp;pBegin, &amp;amp;pEnd, CURLFORM_COPYNAME, strKey.c_str(), CURLFORM_COPYCONTENTS, strVal.c_str(), CURLFORM_END) == CURL_FORMADD_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
curl_httppost* NameResolutionService::PostVariables::operator()() const&lt;br /&gt;
{&lt;br /&gt;
    return pBegin;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// rpc.cpp&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
const Object CheckMaybeThrow(const string&amp;amp; strJsonIn)&lt;br /&gt;
{&lt;br /&gt;
    // Parse input JSON&lt;br /&gt;
    Value valRequest;&lt;br /&gt;
    if (!read_string(strJsonIn, valRequest) || valRequest.type() != obj_type)&lt;br /&gt;
        throw JSONRPCError(-32700, &amp;quot;Parse error&amp;quot;);&lt;br /&gt;
    const Object&amp;amp; request = valRequest.get_obj();&lt;br /&gt;
    // Now check for a key called &amp;quot;error&amp;quot;&lt;br /&gt;
    const Value&amp;amp; error  = find_value(request, &amp;quot;error&amp;quot;);&lt;br /&gt;
    // It&#039;s an error JSON! so propagate the error.&lt;br /&gt;
    if (error.type() != null_type)   &lt;br /&gt;
        throw JSONRPCError(-4, error.get_str());&lt;br /&gt;
    // Return JSON object&lt;br /&gt;
    return request;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const string CollectAddress(const string&amp;amp; strIn)&lt;br /&gt;
{&lt;br /&gt;
    // If the handle does not have an @ in it, then it&#039;s a normal base58 bitcoin address&lt;br /&gt;
    if (strIn.find(&#039;@&#039;) == (size_t)-1)&lt;br /&gt;
        return strIn;&lt;br /&gt;
    &lt;br /&gt;
    // Open the lookup service&lt;br /&gt;
    NameResolutionService ns;&lt;br /&gt;
    // We established that the input string is not a BTC address, so we use it as a handle now.&lt;br /&gt;
    string strHandle = strIn, strAddy;&lt;br /&gt;
    string strError = ns.FetchAddress(strHandle, strAddy);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
&lt;br /&gt;
    const Object&amp;amp; request(CheckMaybeThrow(strAddy));&lt;br /&gt;
    // Get the BTC address from the JSON&lt;br /&gt;
    const Value&amp;amp; address = find_value(request, &amp;quot;address&amp;quot;);&lt;br /&gt;
    if (address.type() != str_type)&lt;br /&gt;
        throw JSONRPCError(-32600, &amp;quot;Server responded with malformed reply.&amp;quot;);&lt;br /&gt;
    return address.get_str();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Named this way to prevent possible conflicts.&lt;br /&gt;
Value rpc_send(const Array&amp;amp; params, bool fHelp)&lt;br /&gt;
{&lt;br /&gt;
    if (fHelp || params.size() != 2)&lt;br /&gt;
        throw runtime_error(&lt;br /&gt;
            &amp;quot;send &amp;lt;name@domain or address&amp;gt; &amp;lt;amount&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;&amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Intelligent function which looks up address given handle, or returns address&lt;br /&gt;
    string strAddy = CollectAddress(params[0].get_str());&lt;br /&gt;
    int64 nAmount = AmountFromValue(params[1]);&lt;br /&gt;
    // Do the send&lt;br /&gt;
    CWalletTx wtx;&lt;br /&gt;
    string strError = SendMoneyToBitcoinAddress(strAddy, nAmount, wtx);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
    return wtx.GetHash().GetHex();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IP Transactions ===&lt;br /&gt;
&lt;br /&gt;
An IP transaction is an old transaction format in bitcoin that is disabled and possibly could be deprecated. It involves being given an IP address to make payment to. Upon connecting to the node and requesting their public key using &amp;quot;checkorder&amp;quot;, they will respond with a script in the form:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;public key&amp;gt; OP_CHECKSIG&lt;br /&gt;
&lt;br /&gt;
Similar to coinbase output transactions. IP transactions have the advantage of being able to contain additional metadata which can be useful in many transactions. Currently no authentication is done making the scheme insecure against man in the middle (MITM) attacks.&lt;br /&gt;
&lt;br /&gt;
This proposal seeks to enable DNS lookups for IP transactions.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;checkorder&amp;quot; message would contain a destination account, which could map to different isolated sets of keypairs/wallets running under the same host. The exact mapping from the checkorder reference info to the local system is implementation defined.&lt;br /&gt;
&lt;br /&gt;
By using DNS lookups, the MITM problem with IP transactions could be mitigated by storing a public key in a DNS TXT record. This public key would be used for all future &amp;quot;reply&amp;quot; messages originating from that host. First time use would require a confirmation for acceptance of that public key; like with SSH. Should the &amp;quot;reply&amp;quot; message not match the accepted public key, then the host will be given an error.&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|E]]&lt;br /&gt;
&lt;br /&gt;
=== Namecoin ID ===&lt;br /&gt;
&lt;br /&gt;
This proposal uses the Namecoin blockchain to associate an alias with a bitcoin address. Bitcoin queries a namecoin node. This retreives the structured data containing the bitcoin address(es) associated with this alias.&lt;br /&gt;
&lt;br /&gt;
Using a decentralised domainname system like Namecoin, means no external server or entity needs to be trusted unlike the other proposals listed here. This indicates a system with the advantage of having a high availability and ease of entry (no restrictions for users to create aliases).&lt;br /&gt;
&lt;br /&gt;
Two examples are presented below. The first shows a simpler format, while the second shows several Bitcoin addresses in a structured format.&lt;br /&gt;
&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;default&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;,&lt;br /&gt;
     &amp;quot;donation&amp;quot;: &amp;quot;N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More possibilities :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Allow to securely use &#039;&#039;&#039;unsecured channels&#039;&#039;&#039; by getting signed data/keys&lt;br /&gt;
* Allow to get a different address each time, or per user, per order, etc&lt;br /&gt;
* Specification is extensible&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;url&amp;quot; : &amp;quot;http://merchant.com/bitcoin/getnewaddres/{Your customer id}&amp;quot;,&lt;br /&gt;
     &amp;quot;signedWith&amp;quot; : &amp;quot;1J3EKMfboca3SESWGrQKESsG1MA9yK6vN4&amp;quot;,&lt;br /&gt;
     &amp;quot;useOnce&amp;quot;: true&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
See the specification of [http://dot-bit.org/Namespace:Identity Namecoin ID] for more informations.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27377</id>
		<title>BIP 0015</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27377"/>
		<updated>2012-06-01T14:02:51Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Namecoin ID */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 15&lt;br /&gt;
  Title: BIP Aliases&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Deferred&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 10-12-2011&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using vanilla bitcoin, to send funds to a destination, an address in the form 1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ is needed. The problem with using addresses is they are not easy to remember. An analogy can be thought if one were required to enter the IP address of their favourite websites if domain names did not exist.&lt;br /&gt;
&lt;br /&gt;
This document aims to layout through careful argument, a bitcoin alias system. This is a big modification to the protocol that is not easily changed in the future and has big ramifications. There is impetus in getting it correct the first time. Aliases have to be robust and secure.&lt;br /&gt;
&lt;br /&gt;
== Schemes ==&lt;br /&gt;
&lt;br /&gt;
Here are a few different proposals and the properties of each system.&lt;br /&gt;
&lt;br /&gt;
=== FirstBits ===&lt;br /&gt;
&lt;br /&gt;
FirstBits is a proposal for using the blockchain as an address book.&lt;br /&gt;
&lt;br /&gt;
When bitcoins are sent to an address, that address becomes recorded in the blockchain. It is therefore known that this address exists or did exist by simply seeing that there was a payment to that address. FirstBits is a method to have a memorable alias. One first converts the address to lower-case, then takes the first few unique characters. This is your FirstBits alias.&lt;br /&gt;
&lt;br /&gt;
As an example, brmlab hackerspace in Prague has an address for purchasing food or drink, or making donations:&lt;br /&gt;
&lt;br /&gt;
  1BRMLAB7nryYgFGrG8x9SYaokb8r2ZwAsX&lt;br /&gt;
&lt;br /&gt;
Their FirstBits alias becomes:&lt;br /&gt;
&lt;br /&gt;
  1brmlab&lt;br /&gt;
&lt;br /&gt;
It is enough information to be given the FirstBits alias &#039;&#039;1brmlab&#039;&#039;. When someone wishes to make a purchase, without FirstBits, they either have to type out their address laboriously by hand, scan their QR code (which requires a mobile handset that this author does not own) or find their address on the internet to copy and paste into the client to send bitcoins. FirstBits alleviates this impracticality by providing an easy method to make payments.&lt;br /&gt;
&lt;br /&gt;
Together with Vanitygen (vanity generator), it becomes possible to create memorable unique named addresses. Addresses that are meaningful, rather than an odd assemblage of letters and numbers but add context to the destination.&lt;br /&gt;
&lt;br /&gt;
However FirstBits has its own problems. One is that the possible aliases one is able to generate is limited by the available computing power available. It may not be feasible to generate a complete or precise alias that is wanted- only approximates may be possible. It is also computationally resource intensive which means a large expenditure of power for generating unique aliases in the future, and may not scale up to the level of individuals at home or participants with hand-held devices in an environment of ubiquitous computing.&lt;br /&gt;
&lt;br /&gt;
FirstBits scales extremely poorly as the network grows. Each indexer or lookup node needs to keep track of every bitcoin address ever in existence and provide a fast lookup from the aliases to those addresses. As the network grows linearly, the number of addresses should grow exponentially (assuming a networked effect of (n-1)*(n-2)/2) rapidly making this scheme unfeasible.&lt;br /&gt;
&lt;br /&gt;
Light clients of the partial merkle root types become dependent on a trusted third party for their alias lookups. The cost of storing every bitcoin address is too high considering their typical use-case on low-resource devices. This factor more than the others, means this scheme is sub-optimal and must be rejected.&lt;br /&gt;
&lt;br /&gt;
=== DNS TXT Records ===&lt;br /&gt;
&lt;br /&gt;
DNS allows TXT records to be created containing arbitrary data. In a bitcoin alias system, a custom format mutually agreed upon by a BIP standard would be used to store mappings to bitcoin addresses from domain names. How such a format would look is out of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
An issue is that it requires people who wish to create such mappings to be familiar with configuring DNS records, and be able to run the necessary toolsets to insert the correct data. Although not a huge concern, it is a usability issue.&lt;br /&gt;
&lt;br /&gt;
Security wise, DNS is unsafe and insecure by design. It is possible to spoof records by being on the same network as another host. A number of revisions to mitigate the issue under the guise of DNSSEC have been in the works since the 1990s and are still being rolled out.&lt;br /&gt;
&lt;br /&gt;
As of Dec 2011, DNSSEC is still not yet a defacto standard on the internet. Should a participant in the bitcoin network wish to use DNS TXT records, they would in addition to having to configure DNS, be able to setup DNSSEC. This may not be feasible, especially where some registrars provide access to DNS through a web interface only.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of DNS TXT records is that updating a record takes time. This encourages people to not use new addresses per transaction which has certain security issues.&lt;br /&gt;
&lt;br /&gt;
=== Server Service ===&lt;br /&gt;
&lt;br /&gt;
Aside from using DNS TXT records, another possibility is using the domain name system to lookup hosts and then contact a service running on a predefined port to get the bitcoin address.&lt;br /&gt;
&lt;br /&gt;
# User wishes to send to foo@bar.net&lt;br /&gt;
# Client uses DNS to find the IP address of bar.net: 123.123.123.123&lt;br /&gt;
# Client connects to port 123.123.123.123:4567 and requests the bitcoin address for the user &#039;&#039;foo&#039;&#039;&lt;br /&gt;
# Server responds with the address or error code and terminates the connection.&lt;br /&gt;
# Client sends the funds to the address&lt;br /&gt;
&lt;br /&gt;
The service would be responsible for providing the mechanisms for changing and storing the mappings on their service. A front-end web interface could be provided to users wishing to use the service and customise their accounts on the server.&lt;br /&gt;
&lt;br /&gt;
This approach has the positive aspect of providing the best flexibility for the implementer to store the records however they wish in a database or plaintext file, and then serve them up quickly using a small server side daemon typically written in C. This approach is highly scalable.&lt;br /&gt;
&lt;br /&gt;
However this approach also suffers the problem of being reliant on DNS and hence also being vulnerable to spoofing. Hence DNSSEC is also required. This approach is slightly better than the DNS TXT records though since it makes inserting new users and modifying aliases very easy which allows people to run these server services more cheaply.&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Web Service ===&lt;br /&gt;
&lt;br /&gt;
HTTPS provides an additional layer of security by encrypting the connection, providing much needed privacy for users. Together with using Certificate Authorities, it fixes the issue with using DNSSEC since an error would be thrown up were someone to try to spoof a domain name on the local network.&lt;br /&gt;
&lt;br /&gt;
When trying to send to:&lt;br /&gt;
&lt;br /&gt;
  genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
The request is broken into the handle (genjix) and domain (foo.org) at the last occurrence of the @. The client then constructs a request that will query for the address.&lt;br /&gt;
&lt;br /&gt;
  https://foo.org/bitcoin-alias/?handle=genjix&lt;br /&gt;
&lt;br /&gt;
bitcoin-alias has been chosen as the query suffix because it allows this system to co-exist easily within another web root without the fear of name clashes.&lt;br /&gt;
&lt;br /&gt;
The query will then return an address which is used to make the payment.&lt;br /&gt;
&lt;br /&gt;
  1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ&lt;br /&gt;
&lt;br /&gt;
The details of whether a unique address is returned per query, whether an address is fetched from a pre-existing pool of addresses, and so on is an implementation detail unique to every server. How alias to address mappings are setup is dependent on the site which could have a web-interface and be providing a free service to users or be a private customised service serving pre-existing addresses. This is left up to sysop policy, and deliberately not defined here.&lt;br /&gt;
&lt;br /&gt;
A web service is trivial to setup and the cost is low. There are many free out of the box providers on the net that allows anyone with the most basic knowledge of web technologies to create their own website. By providing users with a package, anybody can quickly set themselves up with a bitcoin alias. It could be something as simple as a PHP script that the user edits with their custom settings and uploads themselves to their website.&lt;br /&gt;
&lt;br /&gt;
It also scales reasonably- anybody wishing to run a naming service can attach a backend with a variety of database technologies then provide a web frontend for users to customise and create their own aliases.&lt;br /&gt;
&lt;br /&gt;
A naive implementation is provided below as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.h&lt;br /&gt;
#ifndef NOMRESOLV_H__&lt;br /&gt;
#define NOMRESOLV_H__&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;quot;curl/curl.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using std::string;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
This class resolves against a server to lookup addresses.&lt;br /&gt;
To not conflict with the bitcoin addresses, we refer here to people&#039;s handles.&lt;br /&gt;
A handle is of the form:&lt;br /&gt;
&lt;br /&gt;
   genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
Most characters are valid for the username + password (and handled accordingly), but the domain follows usual web standards. It is possible to affix a path if needed,&lt;br /&gt;
&lt;br /&gt;
   genjix@bar.com/path/to/&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
class NameResolutionService&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    NameResolutionService();&lt;br /&gt;
    ~NameResolutionService();&lt;br /&gt;
&lt;br /&gt;
    // Three main methods map to RPC actions.&lt;br /&gt;
    string FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
    // A POST block&lt;br /&gt;
    class PostVariables&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        PostVariables();&lt;br /&gt;
        ~PostVariables();&lt;br /&gt;
        // Add a new key, value pair&lt;br /&gt;
        bool Add(const string&amp;amp; strKey, const string&amp;amp; strVal);&lt;br /&gt;
        curl_httppost* operator()() const;&lt;br /&gt;
    private:&lt;br /&gt;
        // CURL stores POST blocks as linked lists.&lt;br /&gt;
        curl_httppost *pBegin, *pEnd;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Explodes user@domain =&amp;gt; user, domain&lt;br /&gt;
    static void ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain);&lt;br /&gt;
    // Perform the HTTP request. Returns true on success.&lt;br /&gt;
    bool Perform();&lt;br /&gt;
&lt;br /&gt;
    // CURL error message&lt;br /&gt;
    char pErrorBuffer[CURL_ERROR_SIZE];  &lt;br /&gt;
    // CURL response&lt;br /&gt;
    string strBuffer;&lt;br /&gt;
    // CURL handle&lt;br /&gt;
    CURL *curl;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.cpp&lt;br /&gt;
#include &amp;quot;resolv.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;boost/lexical_cast.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;access.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// callback used to write response from the server&lt;br /&gt;
static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)  &lt;br /&gt;
{  &lt;br /&gt;
  int nResult = 0;  &lt;br /&gt;
  if (pBuffer != NULL)  &lt;br /&gt;
  {  &lt;br /&gt;
    pBuffer-&amp;gt;append(pData, nSize * nNmemb);  &lt;br /&gt;
    // How much did we write?  &lt;br /&gt;
    nResult = nSize * nNmemb;  &lt;br /&gt;
  }  &lt;br /&gt;
  return nResult;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    // Initialise CURL with our various options.&lt;br /&gt;
    curl = curl_easy_init();&lt;br /&gt;
    // This goes first in case of any problems below. We get an error message.&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);  &lt;br /&gt;
    // fail when server sends &amp;gt;= 404&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_HEADER, 0);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_302);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);&lt;br /&gt;
    // server response goes in strBuffer&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;amp;strBuffer);  &lt;br /&gt;
    pErrorBuffer[0] = &#039;\0&#039;;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::~NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    curl_easy_cleanup(curl);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void NameResolutionService::ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain)&lt;br /&gt;
{&lt;br /&gt;
    // split address at @ furthrest to the right&lt;br /&gt;
    size_t nPosAtsym = strHandle.rfind(&#039;@&#039;);&lt;br /&gt;
    strNickname = strHandle.substr(0, nPosAtsym);&lt;br /&gt;
    strDomain = strHandle.substr(nPosAtsym + 1, strHandle.size());&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::Perform()&lt;br /&gt;
{&lt;br /&gt;
    // Called after everything has been setup. This actually does the request.&lt;br /&gt;
    CURLcode result = curl_easy_perform(curl);  &lt;br /&gt;
    return (result == CURLE_OK);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string NameResolutionService::FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy)&lt;br /&gt;
{&lt;br /&gt;
    // GET is defined for &#039;getting&#039; data, so we use GET for the low risk fetching of people&#039;s addresses&lt;br /&gt;
    if (!curl)&lt;br /&gt;
        // For some reason CURL didn&#039;t start...&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Expand the handle&lt;br /&gt;
    string strNickname, strDomain;&lt;br /&gt;
    ExplodeHandle(strHandle, strNickname, strDomain);&lt;br /&gt;
    // url encode the nickname for get request&lt;br /&gt;
    const char* pszEncodedNick = curl_easy_escape(curl, strNickname.c_str(), strNickname.size());&lt;br /&gt;
    if (!pszEncodedNick)&lt;br /&gt;
        return &amp;quot;Unable to encode nickname.&amp;quot;;&lt;br /&gt;
    // construct url for GET request&lt;br /&gt;
    string strRequestUrl = strDomain + &amp;quot;/bitcoin-alias/?handle=&amp;quot; + pszEncodedNick;&lt;br /&gt;
    // Pass URL to CURL&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());  &lt;br /&gt;
    if (!Perform())&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Server should respond with a JSON that has the address in.&lt;br /&gt;
    strAddy = strBuffer;&lt;br /&gt;
    return &amp;quot;&amp;quot;;  // no error&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::PostVariables::PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    // pBegin/pEnd *must* be null before calling curl_formadd&lt;br /&gt;
    pBegin = NULL;&lt;br /&gt;
    pEnd = NULL;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::PostVariables::~PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    curl_formfree(pBegin);&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::PostVariables::Add(const string&amp;amp; strKey, const string&amp;amp; strVal)&lt;br /&gt;
{&lt;br /&gt;
    // Copy strings to this block. Return true on success.&lt;br /&gt;
    return curl_formadd(&amp;amp;pBegin, &amp;amp;pEnd, CURLFORM_COPYNAME, strKey.c_str(), CURLFORM_COPYCONTENTS, strVal.c_str(), CURLFORM_END) == CURL_FORMADD_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
curl_httppost* NameResolutionService::PostVariables::operator()() const&lt;br /&gt;
{&lt;br /&gt;
    return pBegin;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// rpc.cpp&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
const Object CheckMaybeThrow(const string&amp;amp; strJsonIn)&lt;br /&gt;
{&lt;br /&gt;
    // Parse input JSON&lt;br /&gt;
    Value valRequest;&lt;br /&gt;
    if (!read_string(strJsonIn, valRequest) || valRequest.type() != obj_type)&lt;br /&gt;
        throw JSONRPCError(-32700, &amp;quot;Parse error&amp;quot;);&lt;br /&gt;
    const Object&amp;amp; request = valRequest.get_obj();&lt;br /&gt;
    // Now check for a key called &amp;quot;error&amp;quot;&lt;br /&gt;
    const Value&amp;amp; error  = find_value(request, &amp;quot;error&amp;quot;);&lt;br /&gt;
    // It&#039;s an error JSON! so propagate the error.&lt;br /&gt;
    if (error.type() != null_type)   &lt;br /&gt;
        throw JSONRPCError(-4, error.get_str());&lt;br /&gt;
    // Return JSON object&lt;br /&gt;
    return request;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const string CollectAddress(const string&amp;amp; strIn)&lt;br /&gt;
{&lt;br /&gt;
    // If the handle does not have an @ in it, then it&#039;s a normal base58 bitcoin address&lt;br /&gt;
    if (strIn.find(&#039;@&#039;) == (size_t)-1)&lt;br /&gt;
        return strIn;&lt;br /&gt;
    &lt;br /&gt;
    // Open the lookup service&lt;br /&gt;
    NameResolutionService ns;&lt;br /&gt;
    // We established that the input string is not a BTC address, so we use it as a handle now.&lt;br /&gt;
    string strHandle = strIn, strAddy;&lt;br /&gt;
    string strError = ns.FetchAddress(strHandle, strAddy);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
&lt;br /&gt;
    const Object&amp;amp; request(CheckMaybeThrow(strAddy));&lt;br /&gt;
    // Get the BTC address from the JSON&lt;br /&gt;
    const Value&amp;amp; address = find_value(request, &amp;quot;address&amp;quot;);&lt;br /&gt;
    if (address.type() != str_type)&lt;br /&gt;
        throw JSONRPCError(-32600, &amp;quot;Server responded with malformed reply.&amp;quot;);&lt;br /&gt;
    return address.get_str();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Named this way to prevent possible conflicts.&lt;br /&gt;
Value rpc_send(const Array&amp;amp; params, bool fHelp)&lt;br /&gt;
{&lt;br /&gt;
    if (fHelp || params.size() != 2)&lt;br /&gt;
        throw runtime_error(&lt;br /&gt;
            &amp;quot;send &amp;lt;name@domain or address&amp;gt; &amp;lt;amount&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;&amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Intelligent function which looks up address given handle, or returns address&lt;br /&gt;
    string strAddy = CollectAddress(params[0].get_str());&lt;br /&gt;
    int64 nAmount = AmountFromValue(params[1]);&lt;br /&gt;
    // Do the send&lt;br /&gt;
    CWalletTx wtx;&lt;br /&gt;
    string strError = SendMoneyToBitcoinAddress(strAddy, nAmount, wtx);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
    return wtx.GetHash().GetHex();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IP Transactions ===&lt;br /&gt;
&lt;br /&gt;
An IP transaction is an old transaction format in bitcoin that is disabled and possibly could be deprecated. It involves being given an IP address to make payment to. Upon connecting to the node and requesting their public key using &amp;quot;checkorder&amp;quot;, they will respond with a script in the form:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;public key&amp;gt; OP_CHECKSIG&lt;br /&gt;
&lt;br /&gt;
Similar to coinbase output transactions. IP transactions have the advantage of being able to contain additional metadata which can be useful in many transactions. Currently no authentication is done making the scheme insecure against man in the middle (MITM) attacks.&lt;br /&gt;
&lt;br /&gt;
This proposal seeks to enable DNS lookups for IP transactions.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;checkorder&amp;quot; message would contain a destination account, which could map to different isolated sets of keypairs/wallets running under the same host. The exact mapping from the checkorder reference info to the local system is implementation defined.&lt;br /&gt;
&lt;br /&gt;
By using DNS lookups, the MITM problem with IP transactions could be mitigated by storing a public key in a DNS TXT record. This public key would be used for all future &amp;quot;reply&amp;quot; messages originating from that host. First time use would require a confirmation for acceptance of that public key; like with SSH. Should the &amp;quot;reply&amp;quot; message not match the accepted public key, then the host will be given an error.&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|E]]&lt;br /&gt;
&lt;br /&gt;
=== Namecoin ID ===&lt;br /&gt;
&lt;br /&gt;
This proposal uses the Namecoin blockchain to associate an alias with a bitcoin address. Bitcoin queries a namecoin node. This retreives the structured data containing the bitcoin address(es) associated with this alias.&lt;br /&gt;
&lt;br /&gt;
Using a decentralised domainname system like Namecoin, means no external server or entity needs to be trusted unlike the other proposals listed here. This indicates a system with the advantage of having a high availability and ease of entry (no restrictions for users to create aliases).&lt;br /&gt;
&lt;br /&gt;
Two examples are presented below. The first shows a simpler format, while the second shows several Bitcoin addresses in a structured format.&lt;br /&gt;
&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;default&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;,&lt;br /&gt;
     &amp;quot;donation&amp;quot;: &amp;quot;N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More possibilities :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Allow to securely use &#039;&#039;&#039;unsecured channels&#039;&#039;&#039; by getting signed data/keys&lt;br /&gt;
* Allow to get a different address each time, or per user, per order, etc&lt;br /&gt;
* Specification is extensible&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;url&amp;quot; : &amp;quot;http://merchant.com/bitcoin/getnewaddres/{Your customer id}&amp;quot;,&lt;br /&gt;
     &amp;quot;signedWith&amp;quot; : &amp;quot;1J3EKMfboca3SESWGrQKESsG1MA9yK6vN4&amp;quot;,&lt;br /&gt;
     &amp;quot;useOnce&amp;quot;: true&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
See the specification of [http://dot-bit.org/Namespace:Identity Namecoin ID] for more informations.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27375</id>
		<title>BIP 0015</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27375"/>
		<updated>2012-06-01T11:48:20Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Namecoin ID */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 15&lt;br /&gt;
  Title: BIP Aliases&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Deferred&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 10-12-2011&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using vanilla bitcoin, to send funds to a destination, an address in the form 1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ is needed. The problem with using addresses is they are not easy to remember. An analogy can be thought if one were required to enter the IP address of their favourite websites if domain names did not exist.&lt;br /&gt;
&lt;br /&gt;
This document aims to layout through careful argument, a bitcoin alias system. This is a big modification to the protocol that is not easily changed in the future and has big ramifications. There is impetus in getting it correct the first time. Aliases have to be robust and secure.&lt;br /&gt;
&lt;br /&gt;
== Schemes ==&lt;br /&gt;
&lt;br /&gt;
Here are a few different proposals and the properties of each system.&lt;br /&gt;
&lt;br /&gt;
=== FirstBits ===&lt;br /&gt;
&lt;br /&gt;
FirstBits is a proposal for using the blockchain as an address book.&lt;br /&gt;
&lt;br /&gt;
When bitcoins are sent to an address, that address becomes recorded in the blockchain. It is therefore known that this address exists or did exist by simply seeing that there was a payment to that address. FirstBits is a method to have a memorable alias. One first converts the address to lower-case, then takes the first few unique characters. This is your FirstBits alias.&lt;br /&gt;
&lt;br /&gt;
As an example, brmlab hackerspace in Prague has an address for purchasing food or drink, or making donations:&lt;br /&gt;
&lt;br /&gt;
  1BRMLAB7nryYgFGrG8x9SYaokb8r2ZwAsX&lt;br /&gt;
&lt;br /&gt;
Their FirstBits alias becomes:&lt;br /&gt;
&lt;br /&gt;
  1brmlab&lt;br /&gt;
&lt;br /&gt;
It is enough information to be given the FirstBits alias &#039;&#039;1brmlab&#039;&#039;. When someone wishes to make a purchase, without FirstBits, they either have to type out their address laboriously by hand, scan their QR code (which requires a mobile handset that this author does not own) or find their address on the internet to copy and paste into the client to send bitcoins. FirstBits alleviates this impracticality by providing an easy method to make payments.&lt;br /&gt;
&lt;br /&gt;
Together with Vanitygen (vanity generator), it becomes possible to create memorable unique named addresses. Addresses that are meaningful, rather than an odd assemblage of letters and numbers but add context to the destination.&lt;br /&gt;
&lt;br /&gt;
However FirstBits has its own problems. One is that the possible aliases one is able to generate is limited by the available computing power available. It may not be feasible to generate a complete or precise alias that is wanted- only approximates may be possible. It is also computationally resource intensive which means a large expenditure of power for generating unique aliases in the future, and may not scale up to the level of individuals at home or participants with hand-held devices in an environment of ubiquitous computing.&lt;br /&gt;
&lt;br /&gt;
FirstBits scales extremely poorly as the network grows. Each indexer or lookup node needs to keep track of every bitcoin address ever in existence and provide a fast lookup from the aliases to those addresses. As the network grows linearly, the number of addresses should grow exponentially (assuming a networked effect of (n-1)*(n-2)/2) rapidly making this scheme unfeasible.&lt;br /&gt;
&lt;br /&gt;
Light clients of the partial merkle root types become dependent on a trusted third party for their alias lookups. The cost of storing every bitcoin address is too high considering their typical use-case on low-resource devices. This factor more than the others, means this scheme is sub-optimal and must be rejected.&lt;br /&gt;
&lt;br /&gt;
=== DNS TXT Records ===&lt;br /&gt;
&lt;br /&gt;
DNS allows TXT records to be created containing arbitrary data. In a bitcoin alias system, a custom format mutually agreed upon by a BIP standard would be used to store mappings to bitcoin addresses from domain names. How such a format would look is out of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
An issue is that it requires people who wish to create such mappings to be familiar with configuring DNS records, and be able to run the necessary toolsets to insert the correct data. Although not a huge concern, it is a usability issue.&lt;br /&gt;
&lt;br /&gt;
Security wise, DNS is unsafe and insecure by design. It is possible to spoof records by being on the same network as another host. A number of revisions to mitigate the issue under the guise of DNSSEC have been in the works since the 1990s and are still being rolled out.&lt;br /&gt;
&lt;br /&gt;
As of Dec 2011, DNSSEC is still not yet a defacto standard on the internet. Should a participant in the bitcoin network wish to use DNS TXT records, they would in addition to having to configure DNS, be able to setup DNSSEC. This may not be feasible, especially where some registrars provide access to DNS through a web interface only.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of DNS TXT records is that updating a record takes time. This encourages people to not use new addresses per transaction which has certain security issues.&lt;br /&gt;
&lt;br /&gt;
=== Server Service ===&lt;br /&gt;
&lt;br /&gt;
Aside from using DNS TXT records, another possibility is using the domain name system to lookup hosts and then contact a service running on a predefined port to get the bitcoin address.&lt;br /&gt;
&lt;br /&gt;
# User wishes to send to foo@bar.net&lt;br /&gt;
# Client uses DNS to find the IP address of bar.net: 123.123.123.123&lt;br /&gt;
# Client connects to port 123.123.123.123:4567 and requests the bitcoin address for the user &#039;&#039;foo&#039;&#039;&lt;br /&gt;
# Server responds with the address or error code and terminates the connection.&lt;br /&gt;
# Client sends the funds to the address&lt;br /&gt;
&lt;br /&gt;
The service would be responsible for providing the mechanisms for changing and storing the mappings on their service. A front-end web interface could be provided to users wishing to use the service and customise their accounts on the server.&lt;br /&gt;
&lt;br /&gt;
This approach has the positive aspect of providing the best flexibility for the implementer to store the records however they wish in a database or plaintext file, and then serve them up quickly using a small server side daemon typically written in C. This approach is highly scalable.&lt;br /&gt;
&lt;br /&gt;
However this approach also suffers the problem of being reliant on DNS and hence also being vulnerable to spoofing. Hence DNSSEC is also required. This approach is slightly better than the DNS TXT records though since it makes inserting new users and modifying aliases very easy which allows people to run these server services more cheaply.&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Web Service ===&lt;br /&gt;
&lt;br /&gt;
HTTPS provides an additional layer of security by encrypting the connection, providing much needed privacy for users. Together with using Certificate Authorities, it fixes the issue with using DNSSEC since an error would be thrown up were someone to try to spoof a domain name on the local network.&lt;br /&gt;
&lt;br /&gt;
When trying to send to:&lt;br /&gt;
&lt;br /&gt;
  genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
The request is broken into the handle (genjix) and domain (foo.org) at the last occurrence of the @. The client then constructs a request that will query for the address.&lt;br /&gt;
&lt;br /&gt;
  https://foo.org/bitcoin-alias/?handle=genjix&lt;br /&gt;
&lt;br /&gt;
bitcoin-alias has been chosen as the query suffix because it allows this system to co-exist easily within another web root without the fear of name clashes.&lt;br /&gt;
&lt;br /&gt;
The query will then return an address which is used to make the payment.&lt;br /&gt;
&lt;br /&gt;
  1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ&lt;br /&gt;
&lt;br /&gt;
The details of whether a unique address is returned per query, whether an address is fetched from a pre-existing pool of addresses, and so on is an implementation detail unique to every server. How alias to address mappings are setup is dependent on the site which could have a web-interface and be providing a free service to users or be a private customised service serving pre-existing addresses. This is left up to sysop policy, and deliberately not defined here.&lt;br /&gt;
&lt;br /&gt;
A web service is trivial to setup and the cost is low. There are many free out of the box providers on the net that allows anyone with the most basic knowledge of web technologies to create their own website. By providing users with a package, anybody can quickly set themselves up with a bitcoin alias. It could be something as simple as a PHP script that the user edits with their custom settings and uploads themselves to their website.&lt;br /&gt;
&lt;br /&gt;
It also scales reasonably- anybody wishing to run a naming service can attach a backend with a variety of database technologies then provide a web frontend for users to customise and create their own aliases.&lt;br /&gt;
&lt;br /&gt;
A naive implementation is provided below as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.h&lt;br /&gt;
#ifndef NOMRESOLV_H__&lt;br /&gt;
#define NOMRESOLV_H__&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;quot;curl/curl.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using std::string;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
This class resolves against a server to lookup addresses.&lt;br /&gt;
To not conflict with the bitcoin addresses, we refer here to people&#039;s handles.&lt;br /&gt;
A handle is of the form:&lt;br /&gt;
&lt;br /&gt;
   genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
Most characters are valid for the username + password (and handled accordingly), but the domain follows usual web standards. It is possible to affix a path if needed,&lt;br /&gt;
&lt;br /&gt;
   genjix@bar.com/path/to/&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
class NameResolutionService&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    NameResolutionService();&lt;br /&gt;
    ~NameResolutionService();&lt;br /&gt;
&lt;br /&gt;
    // Three main methods map to RPC actions.&lt;br /&gt;
    string FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
    // A POST block&lt;br /&gt;
    class PostVariables&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        PostVariables();&lt;br /&gt;
        ~PostVariables();&lt;br /&gt;
        // Add a new key, value pair&lt;br /&gt;
        bool Add(const string&amp;amp; strKey, const string&amp;amp; strVal);&lt;br /&gt;
        curl_httppost* operator()() const;&lt;br /&gt;
    private:&lt;br /&gt;
        // CURL stores POST blocks as linked lists.&lt;br /&gt;
        curl_httppost *pBegin, *pEnd;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Explodes user@domain =&amp;gt; user, domain&lt;br /&gt;
    static void ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain);&lt;br /&gt;
    // Perform the HTTP request. Returns true on success.&lt;br /&gt;
    bool Perform();&lt;br /&gt;
&lt;br /&gt;
    // CURL error message&lt;br /&gt;
    char pErrorBuffer[CURL_ERROR_SIZE];  &lt;br /&gt;
    // CURL response&lt;br /&gt;
    string strBuffer;&lt;br /&gt;
    // CURL handle&lt;br /&gt;
    CURL *curl;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.cpp&lt;br /&gt;
#include &amp;quot;resolv.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;boost/lexical_cast.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;access.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// callback used to write response from the server&lt;br /&gt;
static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)  &lt;br /&gt;
{  &lt;br /&gt;
  int nResult = 0;  &lt;br /&gt;
  if (pBuffer != NULL)  &lt;br /&gt;
  {  &lt;br /&gt;
    pBuffer-&amp;gt;append(pData, nSize * nNmemb);  &lt;br /&gt;
    // How much did we write?  &lt;br /&gt;
    nResult = nSize * nNmemb;  &lt;br /&gt;
  }  &lt;br /&gt;
  return nResult;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    // Initialise CURL with our various options.&lt;br /&gt;
    curl = curl_easy_init();&lt;br /&gt;
    // This goes first in case of any problems below. We get an error message.&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);  &lt;br /&gt;
    // fail when server sends &amp;gt;= 404&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_HEADER, 0);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_302);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);&lt;br /&gt;
    // server response goes in strBuffer&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;amp;strBuffer);  &lt;br /&gt;
    pErrorBuffer[0] = &#039;\0&#039;;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::~NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    curl_easy_cleanup(curl);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void NameResolutionService::ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain)&lt;br /&gt;
{&lt;br /&gt;
    // split address at @ furthrest to the right&lt;br /&gt;
    size_t nPosAtsym = strHandle.rfind(&#039;@&#039;);&lt;br /&gt;
    strNickname = strHandle.substr(0, nPosAtsym);&lt;br /&gt;
    strDomain = strHandle.substr(nPosAtsym + 1, strHandle.size());&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::Perform()&lt;br /&gt;
{&lt;br /&gt;
    // Called after everything has been setup. This actually does the request.&lt;br /&gt;
    CURLcode result = curl_easy_perform(curl);  &lt;br /&gt;
    return (result == CURLE_OK);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string NameResolutionService::FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy)&lt;br /&gt;
{&lt;br /&gt;
    // GET is defined for &#039;getting&#039; data, so we use GET for the low risk fetching of people&#039;s addresses&lt;br /&gt;
    if (!curl)&lt;br /&gt;
        // For some reason CURL didn&#039;t start...&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Expand the handle&lt;br /&gt;
    string strNickname, strDomain;&lt;br /&gt;
    ExplodeHandle(strHandle, strNickname, strDomain);&lt;br /&gt;
    // url encode the nickname for get request&lt;br /&gt;
    const char* pszEncodedNick = curl_easy_escape(curl, strNickname.c_str(), strNickname.size());&lt;br /&gt;
    if (!pszEncodedNick)&lt;br /&gt;
        return &amp;quot;Unable to encode nickname.&amp;quot;;&lt;br /&gt;
    // construct url for GET request&lt;br /&gt;
    string strRequestUrl = strDomain + &amp;quot;/bitcoin-alias/?handle=&amp;quot; + pszEncodedNick;&lt;br /&gt;
    // Pass URL to CURL&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());  &lt;br /&gt;
    if (!Perform())&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Server should respond with a JSON that has the address in.&lt;br /&gt;
    strAddy = strBuffer;&lt;br /&gt;
    return &amp;quot;&amp;quot;;  // no error&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::PostVariables::PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    // pBegin/pEnd *must* be null before calling curl_formadd&lt;br /&gt;
    pBegin = NULL;&lt;br /&gt;
    pEnd = NULL;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::PostVariables::~PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    curl_formfree(pBegin);&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::PostVariables::Add(const string&amp;amp; strKey, const string&amp;amp; strVal)&lt;br /&gt;
{&lt;br /&gt;
    // Copy strings to this block. Return true on success.&lt;br /&gt;
    return curl_formadd(&amp;amp;pBegin, &amp;amp;pEnd, CURLFORM_COPYNAME, strKey.c_str(), CURLFORM_COPYCONTENTS, strVal.c_str(), CURLFORM_END) == CURL_FORMADD_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
curl_httppost* NameResolutionService::PostVariables::operator()() const&lt;br /&gt;
{&lt;br /&gt;
    return pBegin;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// rpc.cpp&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
const Object CheckMaybeThrow(const string&amp;amp; strJsonIn)&lt;br /&gt;
{&lt;br /&gt;
    // Parse input JSON&lt;br /&gt;
    Value valRequest;&lt;br /&gt;
    if (!read_string(strJsonIn, valRequest) || valRequest.type() != obj_type)&lt;br /&gt;
        throw JSONRPCError(-32700, &amp;quot;Parse error&amp;quot;);&lt;br /&gt;
    const Object&amp;amp; request = valRequest.get_obj();&lt;br /&gt;
    // Now check for a key called &amp;quot;error&amp;quot;&lt;br /&gt;
    const Value&amp;amp; error  = find_value(request, &amp;quot;error&amp;quot;);&lt;br /&gt;
    // It&#039;s an error JSON! so propagate the error.&lt;br /&gt;
    if (error.type() != null_type)   &lt;br /&gt;
        throw JSONRPCError(-4, error.get_str());&lt;br /&gt;
    // Return JSON object&lt;br /&gt;
    return request;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const string CollectAddress(const string&amp;amp; strIn)&lt;br /&gt;
{&lt;br /&gt;
    // If the handle does not have an @ in it, then it&#039;s a normal base58 bitcoin address&lt;br /&gt;
    if (strIn.find(&#039;@&#039;) == (size_t)-1)&lt;br /&gt;
        return strIn;&lt;br /&gt;
    &lt;br /&gt;
    // Open the lookup service&lt;br /&gt;
    NameResolutionService ns;&lt;br /&gt;
    // We established that the input string is not a BTC address, so we use it as a handle now.&lt;br /&gt;
    string strHandle = strIn, strAddy;&lt;br /&gt;
    string strError = ns.FetchAddress(strHandle, strAddy);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
&lt;br /&gt;
    const Object&amp;amp; request(CheckMaybeThrow(strAddy));&lt;br /&gt;
    // Get the BTC address from the JSON&lt;br /&gt;
    const Value&amp;amp; address = find_value(request, &amp;quot;address&amp;quot;);&lt;br /&gt;
    if (address.type() != str_type)&lt;br /&gt;
        throw JSONRPCError(-32600, &amp;quot;Server responded with malformed reply.&amp;quot;);&lt;br /&gt;
    return address.get_str();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Named this way to prevent possible conflicts.&lt;br /&gt;
Value rpc_send(const Array&amp;amp; params, bool fHelp)&lt;br /&gt;
{&lt;br /&gt;
    if (fHelp || params.size() != 2)&lt;br /&gt;
        throw runtime_error(&lt;br /&gt;
            &amp;quot;send &amp;lt;name@domain or address&amp;gt; &amp;lt;amount&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;&amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Intelligent function which looks up address given handle, or returns address&lt;br /&gt;
    string strAddy = CollectAddress(params[0].get_str());&lt;br /&gt;
    int64 nAmount = AmountFromValue(params[1]);&lt;br /&gt;
    // Do the send&lt;br /&gt;
    CWalletTx wtx;&lt;br /&gt;
    string strError = SendMoneyToBitcoinAddress(strAddy, nAmount, wtx);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
    return wtx.GetHash().GetHex();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IP Transactions ===&lt;br /&gt;
&lt;br /&gt;
An IP transaction is an old transaction format in bitcoin that is disabled and possibly could be deprecated. It involves being given an IP address to make payment to. Upon connecting to the node and requesting their public key using &amp;quot;checkorder&amp;quot;, they will respond with a script in the form:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;public key&amp;gt; OP_CHECKSIG&lt;br /&gt;
&lt;br /&gt;
Similar to coinbase output transactions. IP transactions have the advantage of being able to contain additional metadata which can be useful in many transactions. Currently no authentication is done making the scheme insecure against man in the middle (MITM) attacks.&lt;br /&gt;
&lt;br /&gt;
This proposal seeks to enable DNS lookups for IP transactions.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;checkorder&amp;quot; message would contain a destination account, which could map to different isolated sets of keypairs/wallets running under the same host. The exact mapping from the checkorder reference info to the local system is implementation defined.&lt;br /&gt;
&lt;br /&gt;
By using DNS lookups, the MITM problem with IP transactions could be mitigated by storing a public key in a DNS TXT record. This public key would be used for all future &amp;quot;reply&amp;quot; messages originating from that host. First time use would require a confirmation for acceptance of that public key; like with SSH. Should the &amp;quot;reply&amp;quot; message not match the accepted public key, then the host will be given an error.&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|E]]&lt;br /&gt;
&lt;br /&gt;
=== Namecoin ID ===&lt;br /&gt;
&lt;br /&gt;
This proposal uses the namecoin blockchain to associate an alias with a bitcoin address. Bitcoin queries a namecoin node. This retreives the data (i.e a bitcoin address) associated with this alias.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages :&#039;&#039;&#039;&lt;br /&gt;
* Secure : no external server/entity to trust&lt;br /&gt;
* High Availability : even available offline&lt;br /&gt;
* Easy to implement : works with json and rpc&lt;br /&gt;
* Economy : anybody can create a service for aliases/identity&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples :&#039;&#039;&#039;&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;default&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;,&lt;br /&gt;
     &amp;quot;donation&amp;quot;: &amp;quot;N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More possibilities :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Allow to securely use &#039;&#039;&#039;unsecured channels&#039;&#039;&#039; by getting signed data/keys&lt;br /&gt;
* Allow to get a different address each time, or per user, per order, etc&lt;br /&gt;
* Specification is extensible&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;url&amp;quot; : &amp;quot;http://merchant.com/bitcoin/getnewaddres/{Your customer id}&amp;quot;,&lt;br /&gt;
     &amp;quot;signedWith&amp;quot; : &amp;quot;1J3EKMfboca3SESWGrQKESsG1MA9yK6vN4&amp;quot;,&lt;br /&gt;
     &amp;quot;useOnce&amp;quot;: true&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
See the specification of [http://dot-bit.org/Namespace:Identity Namecoin ID] for more informations.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27374</id>
		<title>BIP 0015</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27374"/>
		<updated>2012-06-01T11:42:41Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Namecoin ID */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 15&lt;br /&gt;
  Title: BIP Aliases&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Deferred&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 10-12-2011&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using vanilla bitcoin, to send funds to a destination, an address in the form 1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ is needed. The problem with using addresses is they are not easy to remember. An analogy can be thought if one were required to enter the IP address of their favourite websites if domain names did not exist.&lt;br /&gt;
&lt;br /&gt;
This document aims to layout through careful argument, a bitcoin alias system. This is a big modification to the protocol that is not easily changed in the future and has big ramifications. There is impetus in getting it correct the first time. Aliases have to be robust and secure.&lt;br /&gt;
&lt;br /&gt;
== Schemes ==&lt;br /&gt;
&lt;br /&gt;
Here are a few different proposals and the properties of each system.&lt;br /&gt;
&lt;br /&gt;
=== FirstBits ===&lt;br /&gt;
&lt;br /&gt;
FirstBits is a proposal for using the blockchain as an address book.&lt;br /&gt;
&lt;br /&gt;
When bitcoins are sent to an address, that address becomes recorded in the blockchain. It is therefore known that this address exists or did exist by simply seeing that there was a payment to that address. FirstBits is a method to have a memorable alias. One first converts the address to lower-case, then takes the first few unique characters. This is your FirstBits alias.&lt;br /&gt;
&lt;br /&gt;
As an example, brmlab hackerspace in Prague has an address for purchasing food or drink, or making donations:&lt;br /&gt;
&lt;br /&gt;
  1BRMLAB7nryYgFGrG8x9SYaokb8r2ZwAsX&lt;br /&gt;
&lt;br /&gt;
Their FirstBits alias becomes:&lt;br /&gt;
&lt;br /&gt;
  1brmlab&lt;br /&gt;
&lt;br /&gt;
It is enough information to be given the FirstBits alias &#039;&#039;1brmlab&#039;&#039;. When someone wishes to make a purchase, without FirstBits, they either have to type out their address laboriously by hand, scan their QR code (which requires a mobile handset that this author does not own) or find their address on the internet to copy and paste into the client to send bitcoins. FirstBits alleviates this impracticality by providing an easy method to make payments.&lt;br /&gt;
&lt;br /&gt;
Together with Vanitygen (vanity generator), it becomes possible to create memorable unique named addresses. Addresses that are meaningful, rather than an odd assemblage of letters and numbers but add context to the destination.&lt;br /&gt;
&lt;br /&gt;
However FirstBits has its own problems. One is that the possible aliases one is able to generate is limited by the available computing power available. It may not be feasible to generate a complete or precise alias that is wanted- only approximates may be possible. It is also computationally resource intensive which means a large expenditure of power for generating unique aliases in the future, and may not scale up to the level of individuals at home or participants with hand-held devices in an environment of ubiquitous computing.&lt;br /&gt;
&lt;br /&gt;
FirstBits scales extremely poorly as the network grows. Each indexer or lookup node needs to keep track of every bitcoin address ever in existence and provide a fast lookup from the aliases to those addresses. As the network grows linearly, the number of addresses should grow exponentially (assuming a networked effect of (n-1)*(n-2)/2) rapidly making this scheme unfeasible.&lt;br /&gt;
&lt;br /&gt;
Light clients of the partial merkle root types become dependent on a trusted third party for their alias lookups. The cost of storing every bitcoin address is too high considering their typical use-case on low-resource devices. This factor more than the others, means this scheme is sub-optimal and must be rejected.&lt;br /&gt;
&lt;br /&gt;
=== DNS TXT Records ===&lt;br /&gt;
&lt;br /&gt;
DNS allows TXT records to be created containing arbitrary data. In a bitcoin alias system, a custom format mutually agreed upon by a BIP standard would be used to store mappings to bitcoin addresses from domain names. How such a format would look is out of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
An issue is that it requires people who wish to create such mappings to be familiar with configuring DNS records, and be able to run the necessary toolsets to insert the correct data. Although not a huge concern, it is a usability issue.&lt;br /&gt;
&lt;br /&gt;
Security wise, DNS is unsafe and insecure by design. It is possible to spoof records by being on the same network as another host. A number of revisions to mitigate the issue under the guise of DNSSEC have been in the works since the 1990s and are still being rolled out.&lt;br /&gt;
&lt;br /&gt;
As of Dec 2011, DNSSEC is still not yet a defacto standard on the internet. Should a participant in the bitcoin network wish to use DNS TXT records, they would in addition to having to configure DNS, be able to setup DNSSEC. This may not be feasible, especially where some registrars provide access to DNS through a web interface only.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of DNS TXT records is that updating a record takes time. This encourages people to not use new addresses per transaction which has certain security issues.&lt;br /&gt;
&lt;br /&gt;
=== Server Service ===&lt;br /&gt;
&lt;br /&gt;
Aside from using DNS TXT records, another possibility is using the domain name system to lookup hosts and then contact a service running on a predefined port to get the bitcoin address.&lt;br /&gt;
&lt;br /&gt;
# User wishes to send to foo@bar.net&lt;br /&gt;
# Client uses DNS to find the IP address of bar.net: 123.123.123.123&lt;br /&gt;
# Client connects to port 123.123.123.123:4567 and requests the bitcoin address for the user &#039;&#039;foo&#039;&#039;&lt;br /&gt;
# Server responds with the address or error code and terminates the connection.&lt;br /&gt;
# Client sends the funds to the address&lt;br /&gt;
&lt;br /&gt;
The service would be responsible for providing the mechanisms for changing and storing the mappings on their service. A front-end web interface could be provided to users wishing to use the service and customise their accounts on the server.&lt;br /&gt;
&lt;br /&gt;
This approach has the positive aspect of providing the best flexibility for the implementer to store the records however they wish in a database or plaintext file, and then serve them up quickly using a small server side daemon typically written in C. This approach is highly scalable.&lt;br /&gt;
&lt;br /&gt;
However this approach also suffers the problem of being reliant on DNS and hence also being vulnerable to spoofing. Hence DNSSEC is also required. This approach is slightly better than the DNS TXT records though since it makes inserting new users and modifying aliases very easy which allows people to run these server services more cheaply.&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Web Service ===&lt;br /&gt;
&lt;br /&gt;
HTTPS provides an additional layer of security by encrypting the connection, providing much needed privacy for users. Together with using Certificate Authorities, it fixes the issue with using DNSSEC since an error would be thrown up were someone to try to spoof a domain name on the local network.&lt;br /&gt;
&lt;br /&gt;
When trying to send to:&lt;br /&gt;
&lt;br /&gt;
  genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
The request is broken into the handle (genjix) and domain (foo.org) at the last occurrence of the @. The client then constructs a request that will query for the address.&lt;br /&gt;
&lt;br /&gt;
  https://foo.org/bitcoin-alias/?handle=genjix&lt;br /&gt;
&lt;br /&gt;
bitcoin-alias has been chosen as the query suffix because it allows this system to co-exist easily within another web root without the fear of name clashes.&lt;br /&gt;
&lt;br /&gt;
The query will then return an address which is used to make the payment.&lt;br /&gt;
&lt;br /&gt;
  1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ&lt;br /&gt;
&lt;br /&gt;
The details of whether a unique address is returned per query, whether an address is fetched from a pre-existing pool of addresses, and so on is an implementation detail unique to every server. How alias to address mappings are setup is dependent on the site which could have a web-interface and be providing a free service to users or be a private customised service serving pre-existing addresses. This is left up to sysop policy, and deliberately not defined here.&lt;br /&gt;
&lt;br /&gt;
A web service is trivial to setup and the cost is low. There are many free out of the box providers on the net that allows anyone with the most basic knowledge of web technologies to create their own website. By providing users with a package, anybody can quickly set themselves up with a bitcoin alias. It could be something as simple as a PHP script that the user edits with their custom settings and uploads themselves to their website.&lt;br /&gt;
&lt;br /&gt;
It also scales reasonably- anybody wishing to run a naming service can attach a backend with a variety of database technologies then provide a web frontend for users to customise and create their own aliases.&lt;br /&gt;
&lt;br /&gt;
A naive implementation is provided below as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.h&lt;br /&gt;
#ifndef NOMRESOLV_H__&lt;br /&gt;
#define NOMRESOLV_H__&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;quot;curl/curl.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using std::string;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
This class resolves against a server to lookup addresses.&lt;br /&gt;
To not conflict with the bitcoin addresses, we refer here to people&#039;s handles.&lt;br /&gt;
A handle is of the form:&lt;br /&gt;
&lt;br /&gt;
   genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
Most characters are valid for the username + password (and handled accordingly), but the domain follows usual web standards. It is possible to affix a path if needed,&lt;br /&gt;
&lt;br /&gt;
   genjix@bar.com/path/to/&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
class NameResolutionService&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    NameResolutionService();&lt;br /&gt;
    ~NameResolutionService();&lt;br /&gt;
&lt;br /&gt;
    // Three main methods map to RPC actions.&lt;br /&gt;
    string FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
    // A POST block&lt;br /&gt;
    class PostVariables&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        PostVariables();&lt;br /&gt;
        ~PostVariables();&lt;br /&gt;
        // Add a new key, value pair&lt;br /&gt;
        bool Add(const string&amp;amp; strKey, const string&amp;amp; strVal);&lt;br /&gt;
        curl_httppost* operator()() const;&lt;br /&gt;
    private:&lt;br /&gt;
        // CURL stores POST blocks as linked lists.&lt;br /&gt;
        curl_httppost *pBegin, *pEnd;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Explodes user@domain =&amp;gt; user, domain&lt;br /&gt;
    static void ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain);&lt;br /&gt;
    // Perform the HTTP request. Returns true on success.&lt;br /&gt;
    bool Perform();&lt;br /&gt;
&lt;br /&gt;
    // CURL error message&lt;br /&gt;
    char pErrorBuffer[CURL_ERROR_SIZE];  &lt;br /&gt;
    // CURL response&lt;br /&gt;
    string strBuffer;&lt;br /&gt;
    // CURL handle&lt;br /&gt;
    CURL *curl;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.cpp&lt;br /&gt;
#include &amp;quot;resolv.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;boost/lexical_cast.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;access.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// callback used to write response from the server&lt;br /&gt;
static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)  &lt;br /&gt;
{  &lt;br /&gt;
  int nResult = 0;  &lt;br /&gt;
  if (pBuffer != NULL)  &lt;br /&gt;
  {  &lt;br /&gt;
    pBuffer-&amp;gt;append(pData, nSize * nNmemb);  &lt;br /&gt;
    // How much did we write?  &lt;br /&gt;
    nResult = nSize * nNmemb;  &lt;br /&gt;
  }  &lt;br /&gt;
  return nResult;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    // Initialise CURL with our various options.&lt;br /&gt;
    curl = curl_easy_init();&lt;br /&gt;
    // This goes first in case of any problems below. We get an error message.&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);  &lt;br /&gt;
    // fail when server sends &amp;gt;= 404&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_HEADER, 0);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_302);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);&lt;br /&gt;
    // server response goes in strBuffer&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;amp;strBuffer);  &lt;br /&gt;
    pErrorBuffer[0] = &#039;\0&#039;;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::~NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    curl_easy_cleanup(curl);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void NameResolutionService::ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain)&lt;br /&gt;
{&lt;br /&gt;
    // split address at @ furthrest to the right&lt;br /&gt;
    size_t nPosAtsym = strHandle.rfind(&#039;@&#039;);&lt;br /&gt;
    strNickname = strHandle.substr(0, nPosAtsym);&lt;br /&gt;
    strDomain = strHandle.substr(nPosAtsym + 1, strHandle.size());&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::Perform()&lt;br /&gt;
{&lt;br /&gt;
    // Called after everything has been setup. This actually does the request.&lt;br /&gt;
    CURLcode result = curl_easy_perform(curl);  &lt;br /&gt;
    return (result == CURLE_OK);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string NameResolutionService::FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy)&lt;br /&gt;
{&lt;br /&gt;
    // GET is defined for &#039;getting&#039; data, so we use GET for the low risk fetching of people&#039;s addresses&lt;br /&gt;
    if (!curl)&lt;br /&gt;
        // For some reason CURL didn&#039;t start...&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Expand the handle&lt;br /&gt;
    string strNickname, strDomain;&lt;br /&gt;
    ExplodeHandle(strHandle, strNickname, strDomain);&lt;br /&gt;
    // url encode the nickname for get request&lt;br /&gt;
    const char* pszEncodedNick = curl_easy_escape(curl, strNickname.c_str(), strNickname.size());&lt;br /&gt;
    if (!pszEncodedNick)&lt;br /&gt;
        return &amp;quot;Unable to encode nickname.&amp;quot;;&lt;br /&gt;
    // construct url for GET request&lt;br /&gt;
    string strRequestUrl = strDomain + &amp;quot;/bitcoin-alias/?handle=&amp;quot; + pszEncodedNick;&lt;br /&gt;
    // Pass URL to CURL&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());  &lt;br /&gt;
    if (!Perform())&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Server should respond with a JSON that has the address in.&lt;br /&gt;
    strAddy = strBuffer;&lt;br /&gt;
    return &amp;quot;&amp;quot;;  // no error&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::PostVariables::PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    // pBegin/pEnd *must* be null before calling curl_formadd&lt;br /&gt;
    pBegin = NULL;&lt;br /&gt;
    pEnd = NULL;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::PostVariables::~PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    curl_formfree(pBegin);&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::PostVariables::Add(const string&amp;amp; strKey, const string&amp;amp; strVal)&lt;br /&gt;
{&lt;br /&gt;
    // Copy strings to this block. Return true on success.&lt;br /&gt;
    return curl_formadd(&amp;amp;pBegin, &amp;amp;pEnd, CURLFORM_COPYNAME, strKey.c_str(), CURLFORM_COPYCONTENTS, strVal.c_str(), CURLFORM_END) == CURL_FORMADD_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
curl_httppost* NameResolutionService::PostVariables::operator()() const&lt;br /&gt;
{&lt;br /&gt;
    return pBegin;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// rpc.cpp&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
const Object CheckMaybeThrow(const string&amp;amp; strJsonIn)&lt;br /&gt;
{&lt;br /&gt;
    // Parse input JSON&lt;br /&gt;
    Value valRequest;&lt;br /&gt;
    if (!read_string(strJsonIn, valRequest) || valRequest.type() != obj_type)&lt;br /&gt;
        throw JSONRPCError(-32700, &amp;quot;Parse error&amp;quot;);&lt;br /&gt;
    const Object&amp;amp; request = valRequest.get_obj();&lt;br /&gt;
    // Now check for a key called &amp;quot;error&amp;quot;&lt;br /&gt;
    const Value&amp;amp; error  = find_value(request, &amp;quot;error&amp;quot;);&lt;br /&gt;
    // It&#039;s an error JSON! so propagate the error.&lt;br /&gt;
    if (error.type() != null_type)   &lt;br /&gt;
        throw JSONRPCError(-4, error.get_str());&lt;br /&gt;
    // Return JSON object&lt;br /&gt;
    return request;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const string CollectAddress(const string&amp;amp; strIn)&lt;br /&gt;
{&lt;br /&gt;
    // If the handle does not have an @ in it, then it&#039;s a normal base58 bitcoin address&lt;br /&gt;
    if (strIn.find(&#039;@&#039;) == (size_t)-1)&lt;br /&gt;
        return strIn;&lt;br /&gt;
    &lt;br /&gt;
    // Open the lookup service&lt;br /&gt;
    NameResolutionService ns;&lt;br /&gt;
    // We established that the input string is not a BTC address, so we use it as a handle now.&lt;br /&gt;
    string strHandle = strIn, strAddy;&lt;br /&gt;
    string strError = ns.FetchAddress(strHandle, strAddy);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
&lt;br /&gt;
    const Object&amp;amp; request(CheckMaybeThrow(strAddy));&lt;br /&gt;
    // Get the BTC address from the JSON&lt;br /&gt;
    const Value&amp;amp; address = find_value(request, &amp;quot;address&amp;quot;);&lt;br /&gt;
    if (address.type() != str_type)&lt;br /&gt;
        throw JSONRPCError(-32600, &amp;quot;Server responded with malformed reply.&amp;quot;);&lt;br /&gt;
    return address.get_str();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Named this way to prevent possible conflicts.&lt;br /&gt;
Value rpc_send(const Array&amp;amp; params, bool fHelp)&lt;br /&gt;
{&lt;br /&gt;
    if (fHelp || params.size() != 2)&lt;br /&gt;
        throw runtime_error(&lt;br /&gt;
            &amp;quot;send &amp;lt;name@domain or address&amp;gt; &amp;lt;amount&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;&amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Intelligent function which looks up address given handle, or returns address&lt;br /&gt;
    string strAddy = CollectAddress(params[0].get_str());&lt;br /&gt;
    int64 nAmount = AmountFromValue(params[1]);&lt;br /&gt;
    // Do the send&lt;br /&gt;
    CWalletTx wtx;&lt;br /&gt;
    string strError = SendMoneyToBitcoinAddress(strAddy, nAmount, wtx);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
    return wtx.GetHash().GetHex();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IP Transactions ===&lt;br /&gt;
&lt;br /&gt;
An IP transaction is an old transaction format in bitcoin that is disabled and possibly could be deprecated. It involves being given an IP address to make payment to. Upon connecting to the node and requesting their public key using &amp;quot;checkorder&amp;quot;, they will respond with a script in the form:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;public key&amp;gt; OP_CHECKSIG&lt;br /&gt;
&lt;br /&gt;
Similar to coinbase output transactions. IP transactions have the advantage of being able to contain additional metadata which can be useful in many transactions. Currently no authentication is done making the scheme insecure against man in the middle (MITM) attacks.&lt;br /&gt;
&lt;br /&gt;
This proposal seeks to enable DNS lookups for IP transactions.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;checkorder&amp;quot; message would contain a destination account, which could map to different isolated sets of keypairs/wallets running under the same host. The exact mapping from the checkorder reference info to the local system is implementation defined.&lt;br /&gt;
&lt;br /&gt;
By using DNS lookups, the MITM problem with IP transactions could be mitigated by storing a public key in a DNS TXT record. This public key would be used for all future &amp;quot;reply&amp;quot; messages originating from that host. First time use would require a confirmation for acceptance of that public key; like with SSH. Should the &amp;quot;reply&amp;quot; message not match the accepted public key, then the host will be given an error.&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|E]]&lt;br /&gt;
&lt;br /&gt;
=== Namecoin ID ===&lt;br /&gt;
&lt;br /&gt;
This proposal uses the namecoin blockchain to associate an alias (id) with a bitcoin address.&lt;br /&gt;
&lt;br /&gt;
A user send some bitcoins to an alias (say &amp;quot;khal&amp;quot;), so he puts &amp;quot;khal&amp;quot; in the &amp;quot;To&amp;quot; field of Bitcoin.&lt;br /&gt;
&lt;br /&gt;
Bitcoin then queries a namecoin node with an rpc request. This retreives data (a bitcoin address for example) associated with this alias.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages :&#039;&#039;&#039;&lt;br /&gt;
* Secure : no external server/entity to trust&lt;br /&gt;
* High Availability : even available offline&lt;br /&gt;
* Easy to implement : works with json and rpc&lt;br /&gt;
* Economy : anybody can create a service for aliases/identity&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples :&#039;&#039;&#039;&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;default&amp;quot; : &amp;quot;N15mJsVMHNtVDedDnD8vu82M5hCfn3nJWq&amp;quot;,&lt;br /&gt;
     &amp;quot;donation&amp;quot;: &amp;quot;N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More possibilities :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Allow to securely use &#039;&#039;&#039;unsecured channels&#039;&#039;&#039; by getting signed data/keys&lt;br /&gt;
* Allow to get a different address each time, or per user, per order, etc&lt;br /&gt;
* Specification is extensible&lt;br /&gt;
 $ namecoind name_show id/khal&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;bitcoin&amp;quot; :&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;url&amp;quot; : &amp;quot;http://merchant.com/bitcoin/getnewaddres/{Your customer id}&amp;quot;,&lt;br /&gt;
     &amp;quot;signedWith&amp;quot; : &amp;quot;1J3EKMfboca3SESWGrQKESsG1MA9yK6vN4&amp;quot;,&lt;br /&gt;
     &amp;quot;useOnce&amp;quot;: true&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
See the specification of [http://dot-bit.org/Namespace:Identity Namecoin ID] for more informations.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27349</id>
		<title>BIP 0015</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0015&amp;diff=27349"/>
		<updated>2012-05-30T16:44:40Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Removed protection from &amp;quot;BIP 0015&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 15&lt;br /&gt;
  Title: BIP Aliases&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Deferred&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 10-12-2011&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using vanilla bitcoin, to send funds to a destination, an address in the form 1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ is needed. The problem with using addresses is they are not easy to remember. An analogy can be thought if one were required to enter the IP address of their favourite websites if domain names did not exist.&lt;br /&gt;
&lt;br /&gt;
This document aims to layout through careful argument, a bitcoin alias system. This is a big modification to the protocol that is not easily changed in the future and has big ramifications. There is impetus in getting it correct the first time. Aliases have to be robust and secure.&lt;br /&gt;
&lt;br /&gt;
== Schemes ==&lt;br /&gt;
&lt;br /&gt;
Here are a few different proposals and the properties of each system.&lt;br /&gt;
&lt;br /&gt;
=== FirstBits ===&lt;br /&gt;
&lt;br /&gt;
FirstBits is a proposal for using the blockchain as an address book.&lt;br /&gt;
&lt;br /&gt;
When bitcoins are sent to an address, that address becomes recorded in the blockchain. It is therefore known that this address exists or did exist by simply seeing that there was a payment to that address. FirstBits is a method to have a memorable alias. One first converts the address to lower-case, then takes the first few unique characters. This is your FirstBits alias.&lt;br /&gt;
&lt;br /&gt;
As an example, brmlab hackerspace in Prague has an address for purchasing food or drink, or making donations:&lt;br /&gt;
&lt;br /&gt;
  1BRMLAB7nryYgFGrG8x9SYaokb8r2ZwAsX&lt;br /&gt;
&lt;br /&gt;
Their FirstBits alias becomes:&lt;br /&gt;
&lt;br /&gt;
  1brmlab&lt;br /&gt;
&lt;br /&gt;
It is enough information to be given the FirstBits alias &#039;&#039;1brmlab&#039;&#039;. When someone wishes to make a purchase, without FirstBits, they either have to type out their address laboriously by hand, scan their QR code (which requires a mobile handset that this author does not own) or find their address on the internet to copy and paste into the client to send bitcoins. FirstBits alleviates this impracticality by providing an easy method to make payments.&lt;br /&gt;
&lt;br /&gt;
Together with Vanitygen (vanity generator), it becomes possible to create memorable unique named addresses. Addresses that are meaningful, rather than an odd assemblage of letters and numbers but add context to the destination.&lt;br /&gt;
&lt;br /&gt;
However FirstBits has its own problems. One is that the possible aliases one is able to generate is limited by the available computing power available. It may not be feasible to generate a complete or precise alias that is wanted- only approximates may be possible. It is also computationally resource intensive which means a large expenditure of power for generating unique aliases in the future, and may not scale up to the level of individuals at home or participants with hand-held devices in an environment of ubiquitous computing.&lt;br /&gt;
&lt;br /&gt;
FirstBits scales extremely poorly as the network grows. Each indexer or lookup node needs to keep track of every bitcoin address ever in existence and provide a fast lookup from the aliases to those addresses. As the network grows linearly, the number of addresses should grow exponentially (assuming a networked effect of (n-1)*(n-2)/2) rapidly making this scheme unfeasible.&lt;br /&gt;
&lt;br /&gt;
Light clients of the partial merkle root types become dependent on a trusted third party for their alias lookups. The cost of storing every bitcoin address is too high considering their typical use-case on low-resource devices. This factor more than the others, means this scheme is sub-optimal and must be rejected.&lt;br /&gt;
&lt;br /&gt;
=== DNS TXT Records ===&lt;br /&gt;
&lt;br /&gt;
DNS allows TXT records to be created containing arbitrary data. In a bitcoin alias system, a custom format mutually agreed upon by a BIP standard would be used to store mappings to bitcoin addresses from domain names. How such a format would look is out of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
An issue is that it requires people who wish to create such mappings to be familiar with configuring DNS records, and be able to run the necessary toolsets to insert the correct data. Although not a huge concern, it is a usability issue.&lt;br /&gt;
&lt;br /&gt;
Security wise, DNS is unsafe and insecure by design. It is possible to spoof records by being on the same network as another host. A number of revisions to mitigate the issue under the guise of DNSSEC have been in the works since the 1990s and are still being rolled out.&lt;br /&gt;
&lt;br /&gt;
As of Dec 2011, DNSSEC is still not yet a defacto standard on the internet. Should a participant in the bitcoin network wish to use DNS TXT records, they would in addition to having to configure DNS, be able to setup DNSSEC. This may not be feasible, especially where some registrars provide access to DNS through a web interface only.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of DNS TXT records is that updating a record takes time. This encourages people to not use new addresses per transaction which has certain security issues.&lt;br /&gt;
&lt;br /&gt;
=== Server Service ===&lt;br /&gt;
&lt;br /&gt;
Aside from using DNS TXT records, another possibility is using the domain name system to lookup hosts and then contact a service running on a predefined port to get the bitcoin address.&lt;br /&gt;
&lt;br /&gt;
# User wishes to send to foo@bar.net&lt;br /&gt;
# Client uses DNS to find the IP address of bar.net: 123.123.123.123&lt;br /&gt;
# Client connects to port 123.123.123.123:4567 and requests the bitcoin address for the user &#039;&#039;foo&#039;&#039;&lt;br /&gt;
# Server responds with the address or error code and terminates the connection.&lt;br /&gt;
# Client sends the funds to the address&lt;br /&gt;
&lt;br /&gt;
The service would be responsible for providing the mechanisms for changing and storing the mappings on their service. A front-end web interface could be provided to users wishing to use the service and customise their accounts on the server.&lt;br /&gt;
&lt;br /&gt;
This approach has the positive aspect of providing the best flexibility for the implementer to store the records however they wish in a database or plaintext file, and then serve them up quickly using a small server side daemon typically written in C. This approach is highly scalable.&lt;br /&gt;
&lt;br /&gt;
However this approach also suffers the problem of being reliant on DNS and hence also being vulnerable to spoofing. Hence DNSSEC is also required. This approach is slightly better than the DNS TXT records though since it makes inserting new users and modifying aliases very easy which allows people to run these server services more cheaply.&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Web Service ===&lt;br /&gt;
&lt;br /&gt;
HTTPS provides an additional layer of security by encrypting the connection, providing much needed privacy for users. Together with using Certificate Authorities, it fixes the issue with using DNSSEC since an error would be thrown up were someone to try to spoof a domain name on the local network.&lt;br /&gt;
&lt;br /&gt;
When trying to send to:&lt;br /&gt;
&lt;br /&gt;
  genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
The request is broken into the handle (genjix) and domain (foo.org) at the last occurrence of the @. The client then constructs a request that will query for the address.&lt;br /&gt;
&lt;br /&gt;
  https://foo.org/bitcoin-alias/?handle=genjix&lt;br /&gt;
&lt;br /&gt;
bitcoin-alias has been chosen as the query suffix because it allows this system to co-exist easily within another web root without the fear of name clashes.&lt;br /&gt;
&lt;br /&gt;
The query will then return an address which is used to make the payment.&lt;br /&gt;
&lt;br /&gt;
  1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ&lt;br /&gt;
&lt;br /&gt;
The details of whether a unique address is returned per query, whether an address is fetched from a pre-existing pool of addresses, and so on is an implementation detail unique to every server. How alias to address mappings are setup is dependent on the site which could have a web-interface and be providing a free service to users or be a private customised service serving pre-existing addresses. This is left up to sysop policy, and deliberately not defined here.&lt;br /&gt;
&lt;br /&gt;
A web service is trivial to setup and the cost is low. There are many free out of the box providers on the net that allows anyone with the most basic knowledge of web technologies to create their own website. By providing users with a package, anybody can quickly set themselves up with a bitcoin alias. It could be something as simple as a PHP script that the user edits with their custom settings and uploads themselves to their website.&lt;br /&gt;
&lt;br /&gt;
It also scales reasonably- anybody wishing to run a naming service can attach a backend with a variety of database technologies then provide a web frontend for users to customise and create their own aliases.&lt;br /&gt;
&lt;br /&gt;
A naive implementation is provided below as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.h&lt;br /&gt;
#ifndef NOMRESOLV_H__&lt;br /&gt;
#define NOMRESOLV_H__&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;quot;curl/curl.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using std::string;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
This class resolves against a server to lookup addresses.&lt;br /&gt;
To not conflict with the bitcoin addresses, we refer here to people&#039;s handles.&lt;br /&gt;
A handle is of the form:&lt;br /&gt;
&lt;br /&gt;
   genjix@foo.org&lt;br /&gt;
&lt;br /&gt;
Most characters are valid for the username + password (and handled accordingly), but the domain follows usual web standards. It is possible to affix a path if needed,&lt;br /&gt;
&lt;br /&gt;
   genjix@bar.com/path/to/&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
class NameResolutionService&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    NameResolutionService();&lt;br /&gt;
    ~NameResolutionService();&lt;br /&gt;
&lt;br /&gt;
    // Three main methods map to RPC actions.&lt;br /&gt;
    string FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
    // A POST block&lt;br /&gt;
    class PostVariables&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        PostVariables();&lt;br /&gt;
        ~PostVariables();&lt;br /&gt;
        // Add a new key, value pair&lt;br /&gt;
        bool Add(const string&amp;amp; strKey, const string&amp;amp; strVal);&lt;br /&gt;
        curl_httppost* operator()() const;&lt;br /&gt;
    private:&lt;br /&gt;
        // CURL stores POST blocks as linked lists.&lt;br /&gt;
        curl_httppost *pBegin, *pEnd;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Explodes user@domain =&amp;gt; user, domain&lt;br /&gt;
    static void ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain);&lt;br /&gt;
    // Perform the HTTP request. Returns true on success.&lt;br /&gt;
    bool Perform();&lt;br /&gt;
&lt;br /&gt;
    // CURL error message&lt;br /&gt;
    char pErrorBuffer[CURL_ERROR_SIZE];  &lt;br /&gt;
    // CURL response&lt;br /&gt;
    string strBuffer;&lt;br /&gt;
    // CURL handle&lt;br /&gt;
    CURL *curl;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// resolv.cpp&lt;br /&gt;
#include &amp;quot;resolv.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;boost/lexical_cast.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;access.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// callback used to write response from the server&lt;br /&gt;
static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)  &lt;br /&gt;
{  &lt;br /&gt;
  int nResult = 0;  &lt;br /&gt;
  if (pBuffer != NULL)  &lt;br /&gt;
  {  &lt;br /&gt;
    pBuffer-&amp;gt;append(pData, nSize * nNmemb);  &lt;br /&gt;
    // How much did we write?  &lt;br /&gt;
    nResult = nSize * nNmemb;  &lt;br /&gt;
  }  &lt;br /&gt;
  return nResult;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    // Initialise CURL with our various options.&lt;br /&gt;
    curl = curl_easy_init();&lt;br /&gt;
    // This goes first in case of any problems below. We get an error message.&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);  &lt;br /&gt;
    // fail when server sends &amp;gt;= 404&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_HEADER, 0);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_302);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);  &lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);&lt;br /&gt;
    // server response goes in strBuffer&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;amp;strBuffer);  &lt;br /&gt;
    pErrorBuffer[0] = &#039;\0&#039;;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::~NameResolutionService()&lt;br /&gt;
{&lt;br /&gt;
    curl_easy_cleanup(curl);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void NameResolutionService::ExplodeHandle(const string&amp;amp; strHandle, string&amp;amp; strNickname, string&amp;amp; strDomain)&lt;br /&gt;
{&lt;br /&gt;
    // split address at @ furthrest to the right&lt;br /&gt;
    size_t nPosAtsym = strHandle.rfind(&#039;@&#039;);&lt;br /&gt;
    strNickname = strHandle.substr(0, nPosAtsym);&lt;br /&gt;
    strDomain = strHandle.substr(nPosAtsym + 1, strHandle.size());&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::Perform()&lt;br /&gt;
{&lt;br /&gt;
    // Called after everything has been setup. This actually does the request.&lt;br /&gt;
    CURLcode result = curl_easy_perform(curl);  &lt;br /&gt;
    return (result == CURLE_OK);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string NameResolutionService::FetchAddress(const string&amp;amp; strHandle, string&amp;amp; strAddy)&lt;br /&gt;
{&lt;br /&gt;
    // GET is defined for &#039;getting&#039; data, so we use GET for the low risk fetching of people&#039;s addresses&lt;br /&gt;
    if (!curl)&lt;br /&gt;
        // For some reason CURL didn&#039;t start...&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Expand the handle&lt;br /&gt;
    string strNickname, strDomain;&lt;br /&gt;
    ExplodeHandle(strHandle, strNickname, strDomain);&lt;br /&gt;
    // url encode the nickname for get request&lt;br /&gt;
    const char* pszEncodedNick = curl_easy_escape(curl, strNickname.c_str(), strNickname.size());&lt;br /&gt;
    if (!pszEncodedNick)&lt;br /&gt;
        return &amp;quot;Unable to encode nickname.&amp;quot;;&lt;br /&gt;
    // construct url for GET request&lt;br /&gt;
    string strRequestUrl = strDomain + &amp;quot;/bitcoin-alias/?handle=&amp;quot; + pszEncodedNick;&lt;br /&gt;
    // Pass URL to CURL&lt;br /&gt;
    curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());  &lt;br /&gt;
    if (!Perform())&lt;br /&gt;
        return pErrorBuffer;&lt;br /&gt;
    // Server should respond with a JSON that has the address in.&lt;br /&gt;
    strAddy = strBuffer;&lt;br /&gt;
    return &amp;quot;&amp;quot;;  // no error&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NameResolutionService::PostVariables::PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    // pBegin/pEnd *must* be null before calling curl_formadd&lt;br /&gt;
    pBegin = NULL;&lt;br /&gt;
    pEnd = NULL;&lt;br /&gt;
}&lt;br /&gt;
NameResolutionService::PostVariables::~PostVariables()&lt;br /&gt;
{&lt;br /&gt;
    curl_formfree(pBegin);&lt;br /&gt;
}&lt;br /&gt;
bool NameResolutionService::PostVariables::Add(const string&amp;amp; strKey, const string&amp;amp; strVal)&lt;br /&gt;
{&lt;br /&gt;
    // Copy strings to this block. Return true on success.&lt;br /&gt;
    return curl_formadd(&amp;amp;pBegin, &amp;amp;pEnd, CURLFORM_COPYNAME, strKey.c_str(), CURLFORM_COPYCONTENTS, strVal.c_str(), CURLFORM_END) == CURL_FORMADD_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
curl_httppost* NameResolutionService::PostVariables::operator()() const&lt;br /&gt;
{&lt;br /&gt;
    return pBegin;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// rpc.cpp&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
const Object CheckMaybeThrow(const string&amp;amp; strJsonIn)&lt;br /&gt;
{&lt;br /&gt;
    // Parse input JSON&lt;br /&gt;
    Value valRequest;&lt;br /&gt;
    if (!read_string(strJsonIn, valRequest) || valRequest.type() != obj_type)&lt;br /&gt;
        throw JSONRPCError(-32700, &amp;quot;Parse error&amp;quot;);&lt;br /&gt;
    const Object&amp;amp; request = valRequest.get_obj();&lt;br /&gt;
    // Now check for a key called &amp;quot;error&amp;quot;&lt;br /&gt;
    const Value&amp;amp; error  = find_value(request, &amp;quot;error&amp;quot;);&lt;br /&gt;
    // It&#039;s an error JSON! so propagate the error.&lt;br /&gt;
    if (error.type() != null_type)   &lt;br /&gt;
        throw JSONRPCError(-4, error.get_str());&lt;br /&gt;
    // Return JSON object&lt;br /&gt;
    return request;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const string CollectAddress(const string&amp;amp; strIn)&lt;br /&gt;
{&lt;br /&gt;
    // If the handle does not have an @ in it, then it&#039;s a normal base58 bitcoin address&lt;br /&gt;
    if (strIn.find(&#039;@&#039;) == (size_t)-1)&lt;br /&gt;
        return strIn;&lt;br /&gt;
    &lt;br /&gt;
    // Open the lookup service&lt;br /&gt;
    NameResolutionService ns;&lt;br /&gt;
    // We established that the input string is not a BTC address, so we use it as a handle now.&lt;br /&gt;
    string strHandle = strIn, strAddy;&lt;br /&gt;
    string strError = ns.FetchAddress(strHandle, strAddy);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
&lt;br /&gt;
    const Object&amp;amp; request(CheckMaybeThrow(strAddy));&lt;br /&gt;
    // Get the BTC address from the JSON&lt;br /&gt;
    const Value&amp;amp; address = find_value(request, &amp;quot;address&amp;quot;);&lt;br /&gt;
    if (address.type() != str_type)&lt;br /&gt;
        throw JSONRPCError(-32600, &amp;quot;Server responded with malformed reply.&amp;quot;);&lt;br /&gt;
    return address.get_str();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Named this way to prevent possible conflicts.&lt;br /&gt;
Value rpc_send(const Array&amp;amp; params, bool fHelp)&lt;br /&gt;
{&lt;br /&gt;
    if (fHelp || params.size() != 2)&lt;br /&gt;
        throw runtime_error(&lt;br /&gt;
            &amp;quot;send &amp;lt;name@domain or address&amp;gt; &amp;lt;amount&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;&amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Intelligent function which looks up address given handle, or returns address&lt;br /&gt;
    string strAddy = CollectAddress(params[0].get_str());&lt;br /&gt;
    int64 nAmount = AmountFromValue(params[1]);&lt;br /&gt;
    // Do the send&lt;br /&gt;
    CWalletTx wtx;&lt;br /&gt;
    string strError = SendMoneyToBitcoinAddress(strAddy, nAmount, wtx);&lt;br /&gt;
    if (!strError.empty())&lt;br /&gt;
        throw JSONRPCError(-4, strError);&lt;br /&gt;
    return wtx.GetHash().GetHex();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== IP Transactions ===&lt;br /&gt;
&lt;br /&gt;
An IP transaction is an old transaction format in bitcoin that is disabled and possibly could be deprecated. It involves being given an IP address to make payment to. Upon connecting to the node and requesting their public key using &amp;quot;checkorder&amp;quot;, they will respond with a script in the form:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;public key&amp;gt; OP_CHECKSIG&lt;br /&gt;
&lt;br /&gt;
Similar to coinbase output transactions. IP transactions have the advantage of being able to contain additional metadata which can be useful in many transactions. Currently no authentication is done making the scheme insecure against man in the middle (MITM) attacks.&lt;br /&gt;
&lt;br /&gt;
This proposal seeks to enable DNS lookups for IP transactions.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;checkorder&amp;quot; message would contain a destination account, which could map to different isolated sets of keypairs/wallets running under the same host. The exact mapping from the checkorder reference info to the local system is implementation defined.&lt;br /&gt;
&lt;br /&gt;
By using DNS lookups, the MITM problem with IP transactions could be mitigated by storing a public key in a DNS TXT record. This public key would be used for all future &amp;quot;reply&amp;quot; messages originating from that host. First time use would require a confirmation for acceptance of that public key; like with SSH. Should the &amp;quot;reply&amp;quot; message not match the accepted public key, then the host will be given an error.&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|E]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=26752</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=26752"/>
		<updated>2012-05-15T22:10:41Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Replaced&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0022|22]]&lt;br /&gt;
| getmemorypool&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0032|32]]&lt;br /&gt;
| Hierarchical Deterministic Wallets&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Draft&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0033|33]]&lt;br /&gt;
| Stratized Nodes&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Draft&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26715</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26715"/>
		<updated>2012-05-15T22:02:01Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Backwards Compatibility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
Nodes receive &amp;quot;inv&amp;quot; messages as normal from service nodes, issuing &amp;quot;getdata&amp;quot; to download the block or transaction data. From this they check for newly sent (in the input points) or received (in the output points) payments in the transaction data.&lt;br /&gt;
&lt;br /&gt;
Note that blocks must at minimum have their merkle root validated and transactions must be checked for uniqueness by stratized nodes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
The concern here is that stratized nodes are at the mercy of blockchain services. This proposal deals with that issue by designing this protocol in such a way that the implementation can resolve the common history between multiple services.&lt;br /&gt;
&lt;br /&gt;
A stratized node will typically connect to 8 blockchain services. It will only accept a output, spend or inventory vector that has been sent by a common subset of all those services (6 in our example). This spreads the risk between all services, and does not make a node vulnerable to any one rogue blockchain service.&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
The other strategy for thin clients termed &#039;&#039;headers-only&#039;&#039; or &#039;&#039;Simplified. Payment. Verification.&#039;&#039; have the same privacy issues as this proposal. SPV resolves this problem by sending out fake requests for transaction data which obfuscates the client data. By sending out a sufficient number of fake requests, privacy can be kept to a sufficient level.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
NODE_SERVICE does not respond to &amp;quot;getdata&amp;quot; requests by itself (unless used in conjunction with NODE_NETWORK) to prevent starvation attacks. This allows a single trusted NODE_SERVICE architecture (possibly acting as a front-end to multiple backends) to service very many nodes while externalising the costs to the Bitcoin network.&lt;br /&gt;
&lt;br /&gt;
NODE_STRATIZED tries its best to maintain the facade and help upkeep the Bitcoin network (see relaying), but cannot support &amp;quot;getblocks&amp;quot; as it does not have the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
== Backwards Compatibility ==&lt;br /&gt;
&lt;br /&gt;
This proposal is an addon to the current Bitcoin network, and is completely backwards compatible.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26713</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26713"/>
		<updated>2012-05-15T21:59:50Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Rationale */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
Nodes receive &amp;quot;inv&amp;quot; messages as normal from service nodes, issuing &amp;quot;getdata&amp;quot; to download the block or transaction data. From this they check for newly sent (in the input points) or received (in the output points) payments in the transaction data.&lt;br /&gt;
&lt;br /&gt;
Note that blocks must at minimum have their merkle root validated and transactions must be checked for uniqueness by stratized nodes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
The concern here is that stratized nodes are at the mercy of blockchain services. This proposal deals with that issue by designing this protocol in such a way that the implementation can resolve the common history between multiple services.&lt;br /&gt;
&lt;br /&gt;
A stratized node will typically connect to 8 blockchain services. It will only accept a output, spend or inventory vector that has been sent by a common subset of all those services (6 in our example). This spreads the risk between all services, and does not make a node vulnerable to any one rogue blockchain service.&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
The other strategy for thin clients termed &#039;&#039;headers-only&#039;&#039; or &#039;&#039;Simplified. Payment. Verification.&#039;&#039; have the same privacy issues as this proposal. SPV resolves this problem by sending out fake requests for transaction data which obfuscates the client data. By sending out a sufficient number of fake requests, privacy can be kept to a sufficient level.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
NODE_SERVICE does not respond to &amp;quot;getdata&amp;quot; requests by itself (unless used in conjunction with NODE_NETWORK) to prevent starvation attacks. This allows a single trusted NODE_SERVICE architecture (possibly acting as a front-end to multiple backends) to service very many nodes while externalising the costs to the Bitcoin network.&lt;br /&gt;
&lt;br /&gt;
NODE_STRATIZED tries its best to maintain the facade and help upkeep the Bitcoin network (see relaying), but cannot support &amp;quot;getblocks&amp;quot; as it does not have the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
== Backwards Compatibility ==&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26698</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26698"/>
		<updated>2012-05-15T21:50:08Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Privacy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
Nodes receive &amp;quot;inv&amp;quot; messages as normal from service nodes, issuing &amp;quot;getdata&amp;quot; to download the block or transaction data. From this they check for newly sent (in the input points) or received (in the output points) payments in the transaction data.&lt;br /&gt;
&lt;br /&gt;
Note that blocks must at minimum have their merkle root validated and transactions must be checked for uniqueness by stratized nodes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
The concern here is that stratized nodes are at the mercy of blockchain services. This proposal deals with that issue by designing this protocol in such a way that the implementation can resolve the common history between multiple services.&lt;br /&gt;
&lt;br /&gt;
A stratized node will typically connect to 8 blockchain services. It will only accept a output, spend or inventory vector that has been sent by a common subset of all those services (6 in our example). This spreads the risk between all services, and does not make a node vulnerable to any one rogue blockchain service.&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
The other strategy for thin clients termed &#039;&#039;headers-only&#039;&#039; or &#039;&#039;Simplified. Payment. Verification.&#039;&#039; have the same privacy issues as this proposal. SPV resolves this problem by sending out fake requests for transaction data which obfuscates the client data. By sending out a sufficient number of fake requests, privacy can be kept to a sufficient level.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
== Backwards Compatibility ==&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26697</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26697"/>
		<updated>2012-05-15T21:49:21Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Privacy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
Nodes receive &amp;quot;inv&amp;quot; messages as normal from service nodes, issuing &amp;quot;getdata&amp;quot; to download the block or transaction data. From this they check for newly sent (in the input points) or received (in the output points) payments in the transaction data.&lt;br /&gt;
&lt;br /&gt;
Note that blocks must at minimum have their merkle root validated and transactions must be checked for uniqueness by stratized nodes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
The concern here is that stratized nodes are at the mercy of blockchain services. This proposal deals with that issue by designing this protocol in such a way that the implementation can resolve the common history between multiple services.&lt;br /&gt;
&lt;br /&gt;
A stratized node will typically connect to 8 blockchain services. It will only accept a output, spend or inventory vector that has been sent by a common subset of all those services (6 in our example). This spreads the risk between all services, and does not make a node vulnerable to any one rogue blockchain service.&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
The other strategy for thin clients termed &#039;&#039;headers-only&#039;&#039; or &#039;&#039;Simplified. Payment. Verification.&#039;&#039; have the same privacy issues as this proposal. SPV resolves this problem by sending out fake requests for transaction data which obfuscates the client data. By sending out a sufficient number of fake requests, privacy can be kept to a sufficient level.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26695</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26695"/>
		<updated>2012-05-15T21:45:19Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Security */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
Nodes receive &amp;quot;inv&amp;quot; messages as normal from service nodes, issuing &amp;quot;getdata&amp;quot; to download the block or transaction data. From this they check for newly sent (in the input points) or received (in the output points) payments in the transaction data.&lt;br /&gt;
&lt;br /&gt;
Note that blocks must at minimum have their merkle root validated and transactions must be checked for uniqueness by stratized nodes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
The concern here is that stratized nodes are at the mercy of blockchain services. This proposal deals with that issue by designing this protocol in such a way that the implementation can resolve the common history between multiple services.&lt;br /&gt;
&lt;br /&gt;
A stratized node will typically connect to 8 blockchain services. It will only accept a output, spend or inventory vector that has been sent by a common subset of all those services (6 in our example). This spreads the risk between all services, and does not make a node vulnerable to any one rogue blockchain service.&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
SPV&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26692</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26692"/>
		<updated>2012-05-15T21:40:57Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
Nodes receive &amp;quot;inv&amp;quot; messages as normal from service nodes, issuing &amp;quot;getdata&amp;quot; to download the block or transaction data. From this they check for newly sent (in the input points) or received (in the output points) payments in the transaction data.&lt;br /&gt;
&lt;br /&gt;
Note that blocks must at minimum have their merkle root validated and transactions must be checked for uniqueness by stratized nodes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
SPV&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26691</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26691"/>
		<updated>2012-05-15T21:37:15Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These four messages allow a node to discover the history of a Bitcoin address without needing direct access to the blockchain.&lt;br /&gt;
&lt;br /&gt;
A typical use case might look like:&lt;br /&gt;
# Send &amp;quot;getoutputs&amp;quot; for a decoded Bitcoin address.&lt;br /&gt;
# Receive &amp;quot;outputs&amp;quot;, and loop through each contained output point:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that point.&lt;br /&gt;
## Send &amp;quot;getspend&amp;quot; for each output point.&lt;br /&gt;
# Receive &amp;quot;spend&amp;quot;:&lt;br /&gt;
## Send &amp;quot;getdata&amp;quot; to download the transaction for that input point.&lt;br /&gt;
&lt;br /&gt;
This sequence allows the gradual but fast build up of history for an address.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
SPV&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26690</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26690"/>
		<updated>2012-05-15T21:31:47Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct decoded_address&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    decoded_address dest;&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint, inpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26689</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26689"/>
		<updated>2012-05-15T21:30:06Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined which are represented below in C-like pseudocode.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    uint64_t number_points;&lt;br /&gt;
    point_t inpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26688</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26688"/>
		<updated>2012-05-15T21:29:36Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
During the initial handshake between Bitcoin nodes, a version packet is sent. version packets have a bitfield called services. Nodes can fill this field to tell the network how they behave and which services they support. NODE_NETWORK (1) means a node can be asked for full blocks for example.&lt;br /&gt;
&lt;br /&gt;
We propose two more values of NODE_SERVICE (2) and NODE_STRATIZED (4).&lt;br /&gt;
&lt;br /&gt;
=== NODE_SERVICE ===&lt;br /&gt;
&lt;br /&gt;
* A blockchain service which supports the additional messages &amp;quot;getoutputs&amp;quot; and &amp;quot;getspends&amp;quot;.&lt;br /&gt;
* Does not respond to &amp;quot;getdata&amp;quot; messages by itself (unless NODE_NETWORK is specified)&lt;br /&gt;
* If NODE_NETWORK is specified, then &amp;quot;getdata&amp;quot; for transactions will retrieve them not only from the memory pool but also check the blockchain if necessary.&lt;br /&gt;
&lt;br /&gt;
=== NODE_STRATIZED ===&lt;br /&gt;
&lt;br /&gt;
* A node which uses the stratized strategy specified in this document.&lt;br /&gt;
* NODE_STRATIZED will relay inventories for accepted transactions.&lt;br /&gt;
* Does not support &amp;quot;getblocks&amp;quot; as stratized nodes do not contain the entire blockchain.&lt;br /&gt;
&lt;br /&gt;
Apart from the differences noted above, the nodes are otherwise unchanged in their behaviour from NODE_NETWORK.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
Four new messages are defined.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getoutputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_outputs&lt;br /&gt;
{&lt;br /&gt;
    uint8_t payment_type;&lt;br /&gt;
    uint8_t address_hash[16];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;outputs&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct point_t&lt;br /&gt;
{&lt;br /&gt;
    uint8_t hash[32];&lt;br /&gt;
    uint32_t index;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct outputs&lt;br /&gt;
{&lt;br /&gt;
    uint64_t number_outputs;  // variable uint&lt;br /&gt;
    point_t outpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;getspend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct get_spend&lt;br /&gt;
{&lt;br /&gt;
    point_t outpoint;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;spend&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct spend&lt;br /&gt;
{&lt;br /&gt;
    uint64_t number_points;&lt;br /&gt;
    point_t inpoints[];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26682</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26682"/>
		<updated>2012-05-15T13:41:48Z</updated>

		<summary type="html">&lt;p&gt;Genjix: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept termed &#039;&#039;blockchain service&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Jan Moller created BCCAPI in 2011. BCCAPI allowed a user&#039;s client to delegate blockchain interaction to a remote server. This server would store and manage the blockchain while the user client would run queries against that server.&lt;br /&gt;
&lt;br /&gt;
ThomasV later created Electrum server. BCCAPI&#039;s server backend was proprietary, and Electrum required a full Free Software stack. Electrum&#039;s server was an adhoc temporary replacement. As it grew and became used, issues started to appear in its design.&lt;br /&gt;
&lt;br /&gt;
Marek Palatinus (slush) drafted a new standard called Stratum to replace Electrum&#039;s server. Stratum has multiple transports and is usable as a blockchain server by merchants, miners and user-clients. Electrum moved to using a Stratum implementation first relying on ABE/bitcoind and more recently libbitcoin.&lt;br /&gt;
&lt;br /&gt;
Stratum is unmaintained by Marek Palatinus, suffers from easy resource starvation and denial of service attacks, and is insecure. The proposal specified here is intended to replace the Stratum&#039;s role as a blockchain for user-clients. The proposal here is solely concerned with removing the onus of blockchain validation and lookups from user-clients to specialised services in a secure manner. Any secondary benefits or uses are purely incidental.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26677</id>
		<title>BIP 0033</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0033&amp;diff=26677"/>
		<updated>2012-05-15T12:57:27Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Created page with &amp;quot;{{bip}}  &amp;lt;pre&amp;gt;   BIP: 31   Title: Stratized Nodes   Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;   Status: Draft   Type: Standards Track   Created: 15-05-2012 &amp;lt;/pre&amp;gt;  == Abstract ==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 31&lt;br /&gt;
  Title: Stratized Nodes&lt;br /&gt;
  Author: Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 15-05-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
As the Bitcoin network scales, roles are fast becoming specialised. In the beginning, a single Bitcoin user would perform the synonymous roles of miner, merchant and end-user. With the growth however of this system, these functions are being abstracted away to specialised services as a natural part of Bitcoin&#039;s growth.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&#039;s blockchain becomes more unwieldy for end users over time, negatively affecting the usability of Bitcoin clients. As it grows, it becomes ever more impractical to deal with on portable devices or low end machines. Several proposals have been put forward to deal with this such as lightweight (headers-only) clients and skipping validation for blocks before the last checkpoint. However these measures are at best stop-gap workarounds to stave off a growing problem.&lt;br /&gt;
&lt;br /&gt;
This document will examine a proposal which will be termed &#039;&#039;stratized nodes&#039;&#039;, a modification off an earlier concept of a &#039;&#039;blockchain service&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25561</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25561"/>
		<updated>2012-04-21T02:49:27Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Rejected&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0022|22]]&lt;br /&gt;
| getmemorypool&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| N/A&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25560</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25560"/>
		<updated>2012-04-21T02:49:06Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Undo revision 25543 by Genjix (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Rejected&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0022|22]]&lt;br /&gt;
| getmemorypool&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| N/A&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25543</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25543"/>
		<updated>2012-04-20T00:19:29Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Undo revision 25541 by Genjix (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Rejected&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| N/A&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0022&amp;diff=25542</id>
		<title>BIP 0022</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0022&amp;diff=25542"/>
		<updated>2012-04-20T00:19:14Z</updated>

		<summary type="html">&lt;p&gt;Genjix: Removed protection from &amp;quot;BIP 0022&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 22&lt;br /&gt;
  Title: getmemorypool&lt;br /&gt;
  Author: Luke Dashjr &amp;lt;luke+bip22@dashjr.org&amp;gt;&lt;br /&gt;
  Status: Accepted&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 28-02-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
This BIP describes a new JSON-RPC method for &amp;quot;smart&amp;quot; Bitcoin miners and proxies.&lt;br /&gt;
Instead of sending a simple block header for hashing, the entire block structure is sent, and left to the miner to (optionally) customize and assemble.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
===JSON-RPC Method: getmemorypool===&lt;br /&gt;
&lt;br /&gt;
A new JSON-RPC method is defined, called &amp;quot;getmemorypool&amp;quot;.&lt;br /&gt;
It takes no arguments.&lt;br /&gt;
If arguments are provided, it may wrap the &amp;quot;submitblock&amp;quot; JSON-RPC method (described later), cast to a Boolean return value (true = share accepted).&lt;br /&gt;
&lt;br /&gt;
getmemorypool MUST return a JSON Object containing at least the following keys, all of which relate to the block header:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Required !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| bits || {{Yes}} || String || the compressed difficulty in hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| curtime || {{Yes}} || Number || the current time as seen by the server (recommended for block time)&lt;br /&gt;
|-&lt;br /&gt;
| height || {{Yes|Should}} || Number || the height of the block we are looking for&lt;br /&gt;
|-&lt;br /&gt;
| previousblockhash || {{Yes}} || String || the hash of the previous block, in big-endian converted to hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| transactions || {{Yes|Should}} || Array of Strings || Bitcoin transactions encoded in hexadecimal (byte-for-byte), not including coinbase&lt;br /&gt;
|-&lt;br /&gt;
| version || {{Yes}} || Number || always 1 (at least for bitcoin)&lt;br /&gt;
|-&lt;br /&gt;
| coinbasetxn || {{Patch|or ↓}} || String || hexadecimal byte-for-byte coinbase transaction&lt;br /&gt;
|-&lt;br /&gt;
| coinbasevalue || {{Patch|or ↑}} || Number || total funds available for the coinbase&lt;br /&gt;
|-&lt;br /&gt;
| coinbaseaux || {{No}} || Object || data that SHOULD or MUST (depending on mutable flags) be included in the coinbase&#039;s scriptSig content. Only the values (hexadecimal byte-for-byte) in this Object should be included, not the keys.&lt;br /&gt;
|-&lt;br /&gt;
| expires || {{No}} || Number || how many seconds (beginning from when the server sent the response) this work is valid for, at most&lt;br /&gt;
|-&lt;br /&gt;
| fulltarget || {{No}} || String || the number which full results should be less than, in big-endian hexadecimal (see [[#Mutations|&amp;quot;share/*&amp;quot; mutations]])&lt;br /&gt;
|-&lt;br /&gt;
| longpoll || {{No}} || String || URI for [[#Long Polling|long polling]]&lt;br /&gt;
|-&lt;br /&gt;
| maxtime || {{No}} || Number || the maximum time allowed&lt;br /&gt;
|-&lt;br /&gt;
| maxtimeoff || {{No}} || Number || the maximum time allowed (as a moving offset from &amp;quot;curtime&amp;quot; - every second, the actual maxtime is incremented by 1; for example, &amp;quot;maxtimeoff&amp;quot;:0 means &amp;quot;time&amp;quot; may be incremented by 1 every second)&lt;br /&gt;
|-&lt;br /&gt;
| mintime || {{No}} || Number || the minimum time allowed&lt;br /&gt;
|-&lt;br /&gt;
| mintimeoff || {{No}} || Number || the minimum time allowed (as a moving offset from &amp;quot;curtime&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| mutable || {{No}} || Array of Strings || different manipulations that the server explicitly allows to be made (see [[#Mutations|Mutations]])&lt;br /&gt;
|-&lt;br /&gt;
| noncerange || {{No}} || String || two 32-bit integers, concatenated in big-endian hexadecimal, which represent the valid ranges of nonces the miner may scan&lt;br /&gt;
|-&lt;br /&gt;
| submitold || {{No}} || Boolean || only relevant for [[#Long Polling|long poll]] responses; indicates if work received prior to this response remains potentially valid (default) and should have its shares submitted; if false, the miner may wish to discard its share queue&lt;br /&gt;
|-&lt;br /&gt;
| target || {{No}} || String || the number which valid results must be less than, in big-endian hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| txrequired || {{No}} || Number || this many of the first transactions provided must be present in the final block, even if the &amp;quot;transactions/remove&amp;quot; mutation is allowed&lt;br /&gt;
|-&lt;br /&gt;
| workid || {{No}} || String or Number || if provided, this value must be returned with results (see [[#JSON-RPC Method: submitblock|&amp;quot;submitblock&amp;quot;]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Mutations====&lt;br /&gt;
&lt;br /&gt;
Any of these may be listed in the &amp;quot;mutable&amp;quot; key to signify modifications the miner is allowed to make:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Significance&lt;br /&gt;
|-&lt;br /&gt;
| coinbase/append&lt;br /&gt;
| append the provided coinbase scriptSig&lt;br /&gt;
|-&lt;br /&gt;
| coinbase&lt;br /&gt;
| provide their own coinbase; if one is provided, it may be replaced or modified (implied if &amp;quot;coinbasetxn&amp;quot; omitted)&lt;br /&gt;
|-&lt;br /&gt;
| generation&lt;br /&gt;
| add or remove outputs from the coinbase/generation transaction (implied if &amp;quot;coinbasetxn&amp;quot; omitted)&lt;br /&gt;
|-&lt;br /&gt;
| share/coinbase&lt;br /&gt;
| if the block hash is less than &amp;quot;target&amp;quot;, but not less than &amp;quot;fulltarget&amp;quot;, only return the block header and coinbase transaction, but only if the other transactions are unmodified from those proposed in the getmemorypool job&lt;br /&gt;
|-&lt;br /&gt;
| share/merkle&lt;br /&gt;
| if the block hash is less than &amp;quot;target&amp;quot;, but not less than &amp;quot;fulltarget&amp;quot;, only return the block header, coinbase transaction, and merkle tree connecting that transaction to the root (in the form of repeated right-side SHA256 hashes) in &amp;quot;submitblock&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| share/truncate&lt;br /&gt;
| if the block hash is less than &amp;quot;target&amp;quot;, but not less than &amp;quot;fulltarget&amp;quot;, only return the block header in &amp;quot;submitblock&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| time/increment&lt;br /&gt;
| change the time header to a value after &amp;quot;time&amp;quot; (implied if &amp;quot;maxtime&amp;quot; or &amp;quot;maxtimeoff&amp;quot; are provided)&lt;br /&gt;
|-&lt;br /&gt;
| time/decrement&lt;br /&gt;
| change the time header to a value before &amp;quot;time&amp;quot; (implied if &amp;quot;mintime&amp;quot; is provided)&lt;br /&gt;
|-&lt;br /&gt;
| time&lt;br /&gt;
| modify the time header of the block&lt;br /&gt;
|-&lt;br /&gt;
| transactions/add&lt;br /&gt;
| add other valid transactions to the block&lt;br /&gt;
|-&lt;br /&gt;
| transactions/remove&lt;br /&gt;
| remove transactions provided by the server&lt;br /&gt;
|-&lt;br /&gt;
| transactions&lt;br /&gt;
| add or remove transactions (both of the above; implied if &amp;quot;transactions&amp;quot; omitted from result)&lt;br /&gt;
|-&lt;br /&gt;
| prevblock&lt;br /&gt;
| use the work with other previous-blocks; this implicitly allows removing transactions that are no longer valid, unless they are part of the &amp;quot;txrequired&amp;quot; count; it also implies adjusting &amp;quot;height&amp;quot; as necessary&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that miners are NOT required to implement any of these mutations.&lt;br /&gt;
&lt;br /&gt;
==== Long Polling ====&lt;br /&gt;
If the server supports long polling, it SHOULD include the &amp;quot;longpoll&amp;quot; key with a relative or absolute URI.&lt;br /&gt;
The absolute URI MAY specify a different port than the original connection.&lt;br /&gt;
Miners MAY start a request to this long polling URI with a standard JSON-RPC request (POST with data) and same basic authorization.&lt;br /&gt;
This request SHOULD NOT be processed nor answered by the server until it wishes to replace the current block data.&lt;br /&gt;
Clients SHOULD make this request with a very long request timeout and MUST accept the server sending response headers with &amp;quot;chunked&amp;quot; Transfer-Encoding delaying the completion of the final JSON response.&lt;br /&gt;
&lt;br /&gt;
Upon receiving a completed response:&lt;br /&gt;
* Only if &amp;quot;submitold&amp;quot; is provided and false, the client MAY discard the results of past operations and MUST begin working on the new work immediately.&lt;br /&gt;
* The client SHOULD begin working on the new work received as soon as possible, if not immediately.&lt;br /&gt;
* The client SHOULD make a new request to the same long polling URI.&lt;br /&gt;
&lt;br /&gt;
If a client receives an incomplete or invalid response, it SHOULD retry the request with an exponential backoff.&lt;br /&gt;
Clients MAY implement this backoff with limitations (such as maximum backoff time) or any algorithm as deemed suitable.&lt;br /&gt;
It is however forbidden to simply retry immediately with no delay after more than one failure.&lt;br /&gt;
In the case of a &amp;quot;Forbidden&amp;quot; response (for example, HTTP 403), a client SHOULD NOT attempt to retry without user intervention.&lt;br /&gt;
&lt;br /&gt;
===JSON-RPC Method: submitblock===&lt;br /&gt;
A new JSON-RPC method is defined, called &amp;quot;submitblock&amp;quot;.&lt;br /&gt;
It takes one to two arguments.&lt;br /&gt;
The first argument is the block data; this may be truncated or merkle-ified depending on the &amp;quot;share/truncate&amp;quot; or &amp;quot;share/merkle&amp;quot; mutations, respectively.&lt;br /&gt;
The second argument, if provided, is an Object.&lt;br /&gt;
The only defined key of this Object is the &amp;quot;workid&amp;quot; provided by the server:&lt;br /&gt;
if a &amp;quot;workid&amp;quot; was specified, it must be submitted with the share/block.&lt;br /&gt;
&lt;br /&gt;
This method MUST return either null (when a share is accepted), a String describing briefly the reason the share was rejected, or an Object of these with a key for each merged-mining chain the share was submitted to.&lt;br /&gt;
&lt;br /&gt;
Possible reasons a share may be rejected include, but are not limited to:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reason !! Description&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-flag || the server detected a feature-signifying flag that it does not allow&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-length || the coinbase was too long (bitcoin limit is 100 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-prefix || the server only allows appending to the coinbase, but it was modified beyond that&lt;br /&gt;
|-&lt;br /&gt;
| bad-diffbits || &amp;quot;bits&amp;quot; were changed&lt;br /&gt;
|-&lt;br /&gt;
| bad-prevblk || the previous-block is not the one the server intends to build on&lt;br /&gt;
|-&lt;br /&gt;
| bad-txnmrklroot || the block header&#039;s merkle root did not match the transaction merkle tree&lt;br /&gt;
|-&lt;br /&gt;
| bad-txns || the server didn&#039;t like something about the transactions in the block&lt;br /&gt;
|-&lt;br /&gt;
| bad-version || the version was wrong&lt;br /&gt;
|-&lt;br /&gt;
| duplicate || the server already processed this block data&lt;br /&gt;
|-&lt;br /&gt;
| high-hash || the block header did not hash to a value lower than the specified target&lt;br /&gt;
|-&lt;br /&gt;
| rejected || a generic rejection without details&lt;br /&gt;
|-&lt;br /&gt;
| stale-prevblk || the previous-block is no longer the one the server intends to build on&lt;br /&gt;
|-&lt;br /&gt;
| stale-work || the work this block was based on is no longer accepted&lt;br /&gt;
|-&lt;br /&gt;
| time-invalid || the time was not acceptable&lt;br /&gt;
|-&lt;br /&gt;
| time-too-new || the time was too far in the future&lt;br /&gt;
|-&lt;br /&gt;
| time-too-old || the time was too far in the past&lt;br /&gt;
|-&lt;br /&gt;
| unknown-user || the user submitting the block was not recognized&lt;br /&gt;
|-&lt;br /&gt;
| unknown-work || the template or workid could not be identified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Known Bugs ===&lt;br /&gt;
This BIP should not be promoted from Draft status until these are addressed:&lt;br /&gt;
* Noncerange might not be possible to support for all workers, so a way to signal support is needed&lt;br /&gt;
* Longpolling currently assumes URI-based requests, which is not implied by JSON-RPC.&lt;br /&gt;
* &#039;&#039;(feel free to add issues here)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
There is reasonable concerns about mining currently being too centralized on pools, and the amount of control these pools hold.&lt;br /&gt;
By exposing the details of the block proposals to the miners, they are enabled to audit and possibly modify the block before hashing it.&lt;br /&gt;
&lt;br /&gt;
There is also a very minor load reduction on the pool server, since it does not need to calculate SHA256 for the block&#039;s merkle tree.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
&lt;br /&gt;
* [https://gitorious.org/bitcoin/eloipool Eloipool]&lt;br /&gt;
* [http://luke.dashjr.org/programs/bitcoin/w/bitcoind/luke-jr.git/blobdiff/722d9387be4b267b689d7b7d78daeb7157bd12d8..gmp_bip:/src/bitcoinrpc.cpp bitcoind]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25541</id>
		<title>Bitcoin Improvement Proposals</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_Improvement_Proposals&amp;diff=25541"/>
		<updated>2012-04-20T00:17:02Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Amir Taaki &amp;lt;genjix@riseup.net&amp;gt;. After copy-editing and acceptance, it will be published here.&lt;br /&gt;
&lt;br /&gt;
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.&lt;br /&gt;
&lt;br /&gt;
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; text-align: center; font-size: smaller; table-layout: fixed;&amp;quot;&lt;br /&gt;
!Number&lt;br /&gt;
!Title&lt;br /&gt;
!Owner&lt;br /&gt;
!Status&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0001|1]]&lt;br /&gt;
| BIP Purpose and Guidelines&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0010|10]]&lt;br /&gt;
| Multi-Sig Transaction Distribution&lt;br /&gt;
| Alan Reiner&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0011|11]]&lt;br /&gt;
| M-of-N Standard Transactions&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0012|12]]&lt;br /&gt;
| OP_EVAL&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0013|13]]&lt;br /&gt;
| Address Format for pay-to-script-hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0014|14]]&lt;br /&gt;
| Protocol Version and User Agent&lt;br /&gt;
| Amir Taaki, Patrick Strateman&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0015|15]]&lt;br /&gt;
| Aliases&lt;br /&gt;
| Amir Taaki&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0016|16]]&lt;br /&gt;
| Pay To Script Hash&lt;br /&gt;
| Gavin Andresen&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0017|17]]&lt;br /&gt;
| OP_CHECKHASHVERIFY (CHV)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Withdrawn&lt;br /&gt;
|-&lt;br /&gt;
| [[BIP 0019|19]]&lt;br /&gt;
| M-of-N Standard Transactions (Low SigOp)&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Draft&lt;br /&gt;
|- style=&amp;quot;background-color: #ffcfcf&amp;quot;&lt;br /&gt;
| [[BIP 0020|20]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Rejected&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0021|21]]&lt;br /&gt;
| URI Scheme&lt;br /&gt;
| Nils Schneider, Matt Corallo&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0022|22]]&lt;br /&gt;
| getmemorypool&lt;br /&gt;
| Luke Dashjr&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0030|30]]&lt;br /&gt;
| Duplicate transactions&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
| Accepted&lt;br /&gt;
|- style=&amp;quot;background-color: #cfffcf&amp;quot;&lt;br /&gt;
| [[BIP 0031|31]]&lt;br /&gt;
| Pong message&lt;br /&gt;
| Mike Hearn&lt;br /&gt;
| Accepted&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| N/A&lt;br /&gt;
| Pieter Wuille&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Hardfork Wishlist]]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|Z]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0022&amp;diff=25540</id>
		<title>BIP 0022</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0022&amp;diff=25540"/>
		<updated>2012-04-20T00:16:18Z</updated>

		<summary type="html">&lt;p&gt;Genjix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{bip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 22&lt;br /&gt;
  Title: getmemorypool&lt;br /&gt;
  Author: Luke Dashjr &amp;lt;luke+bip22@dashjr.org&amp;gt;&lt;br /&gt;
  Status: Accepted&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 28-02-2012&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
This BIP describes a new JSON-RPC method for &amp;quot;smart&amp;quot; Bitcoin miners and proxies.&lt;br /&gt;
Instead of sending a simple block header for hashing, the entire block structure is sent, and left to the miner to (optionally) customize and assemble.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
===JSON-RPC Method: getmemorypool===&lt;br /&gt;
&lt;br /&gt;
A new JSON-RPC method is defined, called &amp;quot;getmemorypool&amp;quot;.&lt;br /&gt;
It takes no arguments.&lt;br /&gt;
If arguments are provided, it may wrap the &amp;quot;submitblock&amp;quot; JSON-RPC method (described later), cast to a Boolean return value (true = share accepted).&lt;br /&gt;
&lt;br /&gt;
getmemorypool MUST return a JSON Object containing at least the following keys, all of which relate to the block header:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Required !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| bits || {{Yes}} || String || the compressed difficulty in hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| curtime || {{Yes}} || Number || the current time as seen by the server (recommended for block time)&lt;br /&gt;
|-&lt;br /&gt;
| height || {{Yes|Should}} || Number || the height of the block we are looking for&lt;br /&gt;
|-&lt;br /&gt;
| previousblockhash || {{Yes}} || String || the hash of the previous block, in big-endian converted to hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| transactions || {{Yes|Should}} || Array of Strings || Bitcoin transactions encoded in hexadecimal (byte-for-byte), not including coinbase&lt;br /&gt;
|-&lt;br /&gt;
| version || {{Yes}} || Number || always 1 (at least for bitcoin)&lt;br /&gt;
|-&lt;br /&gt;
| coinbasetxn || {{Patch|or ↓}} || String || hexadecimal byte-for-byte coinbase transaction&lt;br /&gt;
|-&lt;br /&gt;
| coinbasevalue || {{Patch|or ↑}} || Number || total funds available for the coinbase&lt;br /&gt;
|-&lt;br /&gt;
| coinbaseaux || {{No}} || Object || data that SHOULD or MUST (depending on mutable flags) be included in the coinbase&#039;s scriptSig content. Only the values (hexadecimal byte-for-byte) in this Object should be included, not the keys.&lt;br /&gt;
|-&lt;br /&gt;
| expires || {{No}} || Number || how many seconds (beginning from when the server sent the response) this work is valid for, at most&lt;br /&gt;
|-&lt;br /&gt;
| fulltarget || {{No}} || String || the number which full results should be less than, in big-endian hexadecimal (see [[#Mutations|&amp;quot;share/*&amp;quot; mutations]])&lt;br /&gt;
|-&lt;br /&gt;
| longpoll || {{No}} || String || URI for [[#Long Polling|long polling]]&lt;br /&gt;
|-&lt;br /&gt;
| maxtime || {{No}} || Number || the maximum time allowed&lt;br /&gt;
|-&lt;br /&gt;
| maxtimeoff || {{No}} || Number || the maximum time allowed (as a moving offset from &amp;quot;curtime&amp;quot; - every second, the actual maxtime is incremented by 1; for example, &amp;quot;maxtimeoff&amp;quot;:0 means &amp;quot;time&amp;quot; may be incremented by 1 every second)&lt;br /&gt;
|-&lt;br /&gt;
| mintime || {{No}} || Number || the minimum time allowed&lt;br /&gt;
|-&lt;br /&gt;
| mintimeoff || {{No}} || Number || the minimum time allowed (as a moving offset from &amp;quot;curtime&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| mutable || {{No}} || Array of Strings || different manipulations that the server explicitly allows to be made (see [[#Mutations|Mutations]])&lt;br /&gt;
|-&lt;br /&gt;
| noncerange || {{No}} || String || two 32-bit integers, concatenated in big-endian hexadecimal, which represent the valid ranges of nonces the miner may scan&lt;br /&gt;
|-&lt;br /&gt;
| submitold || {{No}} || Boolean || only relevant for [[#Long Polling|long poll]] responses; indicates if work received prior to this response remains potentially valid (default) and should have its shares submitted; if false, the miner may wish to discard its share queue&lt;br /&gt;
|-&lt;br /&gt;
| target || {{No}} || String || the number which valid results must be less than, in big-endian hexadecimal&lt;br /&gt;
|-&lt;br /&gt;
| txrequired || {{No}} || Number || this many of the first transactions provided must be present in the final block, even if the &amp;quot;transactions/remove&amp;quot; mutation is allowed&lt;br /&gt;
|-&lt;br /&gt;
| workid || {{No}} || String or Number || if provided, this value must be returned with results (see [[#JSON-RPC Method: submitblock|&amp;quot;submitblock&amp;quot;]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Mutations====&lt;br /&gt;
&lt;br /&gt;
Any of these may be listed in the &amp;quot;mutable&amp;quot; key to signify modifications the miner is allowed to make:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Significance&lt;br /&gt;
|-&lt;br /&gt;
| coinbase/append&lt;br /&gt;
| append the provided coinbase scriptSig&lt;br /&gt;
|-&lt;br /&gt;
| coinbase&lt;br /&gt;
| provide their own coinbase; if one is provided, it may be replaced or modified (implied if &amp;quot;coinbasetxn&amp;quot; omitted)&lt;br /&gt;
|-&lt;br /&gt;
| generation&lt;br /&gt;
| add or remove outputs from the coinbase/generation transaction (implied if &amp;quot;coinbasetxn&amp;quot; omitted)&lt;br /&gt;
|-&lt;br /&gt;
| share/coinbase&lt;br /&gt;
| if the block hash is less than &amp;quot;target&amp;quot;, but not less than &amp;quot;fulltarget&amp;quot;, only return the block header and coinbase transaction, but only if the other transactions are unmodified from those proposed in the getmemorypool job&lt;br /&gt;
|-&lt;br /&gt;
| share/merkle&lt;br /&gt;
| if the block hash is less than &amp;quot;target&amp;quot;, but not less than &amp;quot;fulltarget&amp;quot;, only return the block header, coinbase transaction, and merkle tree connecting that transaction to the root (in the form of repeated right-side SHA256 hashes) in &amp;quot;submitblock&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| share/truncate&lt;br /&gt;
| if the block hash is less than &amp;quot;target&amp;quot;, but not less than &amp;quot;fulltarget&amp;quot;, only return the block header in &amp;quot;submitblock&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| time/increment&lt;br /&gt;
| change the time header to a value after &amp;quot;time&amp;quot; (implied if &amp;quot;maxtime&amp;quot; or &amp;quot;maxtimeoff&amp;quot; are provided)&lt;br /&gt;
|-&lt;br /&gt;
| time/decrement&lt;br /&gt;
| change the time header to a value before &amp;quot;time&amp;quot; (implied if &amp;quot;mintime&amp;quot; is provided)&lt;br /&gt;
|-&lt;br /&gt;
| time&lt;br /&gt;
| modify the time header of the block&lt;br /&gt;
|-&lt;br /&gt;
| transactions/add&lt;br /&gt;
| add other valid transactions to the block&lt;br /&gt;
|-&lt;br /&gt;
| transactions/remove&lt;br /&gt;
| remove transactions provided by the server&lt;br /&gt;
|-&lt;br /&gt;
| transactions&lt;br /&gt;
| add or remove transactions (both of the above; implied if &amp;quot;transactions&amp;quot; omitted from result)&lt;br /&gt;
|-&lt;br /&gt;
| prevblock&lt;br /&gt;
| use the work with other previous-blocks; this implicitly allows removing transactions that are no longer valid, unless they are part of the &amp;quot;txrequired&amp;quot; count; it also implies adjusting &amp;quot;height&amp;quot; as necessary&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that miners are NOT required to implement any of these mutations.&lt;br /&gt;
&lt;br /&gt;
==== Long Polling ====&lt;br /&gt;
If the server supports long polling, it SHOULD include the &amp;quot;longpoll&amp;quot; key with a relative or absolute URI.&lt;br /&gt;
The absolute URI MAY specify a different port than the original connection.&lt;br /&gt;
Miners MAY start a request to this long polling URI with a standard JSON-RPC request (POST with data) and same basic authorization.&lt;br /&gt;
This request SHOULD NOT be processed nor answered by the server until it wishes to replace the current block data.&lt;br /&gt;
Clients SHOULD make this request with a very long request timeout and MUST accept the server sending response headers with &amp;quot;chunked&amp;quot; Transfer-Encoding delaying the completion of the final JSON response.&lt;br /&gt;
&lt;br /&gt;
Upon receiving a completed response:&lt;br /&gt;
* Only if &amp;quot;submitold&amp;quot; is provided and false, the client MAY discard the results of past operations and MUST begin working on the new work immediately.&lt;br /&gt;
* The client SHOULD begin working on the new work received as soon as possible, if not immediately.&lt;br /&gt;
* The client SHOULD make a new request to the same long polling URI.&lt;br /&gt;
&lt;br /&gt;
If a client receives an incomplete or invalid response, it SHOULD retry the request with an exponential backoff.&lt;br /&gt;
Clients MAY implement this backoff with limitations (such as maximum backoff time) or any algorithm as deemed suitable.&lt;br /&gt;
It is however forbidden to simply retry immediately with no delay after more than one failure.&lt;br /&gt;
In the case of a &amp;quot;Forbidden&amp;quot; response (for example, HTTP 403), a client SHOULD NOT attempt to retry without user intervention.&lt;br /&gt;
&lt;br /&gt;
===JSON-RPC Method: submitblock===&lt;br /&gt;
A new JSON-RPC method is defined, called &amp;quot;submitblock&amp;quot;.&lt;br /&gt;
It takes one to two arguments.&lt;br /&gt;
The first argument is the block data; this may be truncated or merkle-ified depending on the &amp;quot;share/truncate&amp;quot; or &amp;quot;share/merkle&amp;quot; mutations, respectively.&lt;br /&gt;
The second argument, if provided, is an Object.&lt;br /&gt;
The only defined key of this Object is the &amp;quot;workid&amp;quot; provided by the server:&lt;br /&gt;
if a &amp;quot;workid&amp;quot; was specified, it must be submitted with the share/block.&lt;br /&gt;
&lt;br /&gt;
This method MUST return either null (when a share is accepted), a String describing briefly the reason the share was rejected, or an Object of these with a key for each merged-mining chain the share was submitted to.&lt;br /&gt;
&lt;br /&gt;
Possible reasons a share may be rejected include, but are not limited to:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Reason !! Description&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-flag || the server detected a feature-signifying flag that it does not allow&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-length || the coinbase was too long (bitcoin limit is 100 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bad-cb-prefix || the server only allows appending to the coinbase, but it was modified beyond that&lt;br /&gt;
|-&lt;br /&gt;
| bad-diffbits || &amp;quot;bits&amp;quot; were changed&lt;br /&gt;
|-&lt;br /&gt;
| bad-prevblk || the previous-block is not the one the server intends to build on&lt;br /&gt;
|-&lt;br /&gt;
| bad-txnmrklroot || the block header&#039;s merkle root did not match the transaction merkle tree&lt;br /&gt;
|-&lt;br /&gt;
| bad-txns || the server didn&#039;t like something about the transactions in the block&lt;br /&gt;
|-&lt;br /&gt;
| bad-version || the version was wrong&lt;br /&gt;
|-&lt;br /&gt;
| duplicate || the server already processed this block data&lt;br /&gt;
|-&lt;br /&gt;
| high-hash || the block header did not hash to a value lower than the specified target&lt;br /&gt;
|-&lt;br /&gt;
| rejected || a generic rejection without details&lt;br /&gt;
|-&lt;br /&gt;
| stale-prevblk || the previous-block is no longer the one the server intends to build on&lt;br /&gt;
|-&lt;br /&gt;
| stale-work || the work this block was based on is no longer accepted&lt;br /&gt;
|-&lt;br /&gt;
| time-invalid || the time was not acceptable&lt;br /&gt;
|-&lt;br /&gt;
| time-too-new || the time was too far in the future&lt;br /&gt;
|-&lt;br /&gt;
| time-too-old || the time was too far in the past&lt;br /&gt;
|-&lt;br /&gt;
| unknown-user || the user submitting the block was not recognized&lt;br /&gt;
|-&lt;br /&gt;
| unknown-work || the template or workid could not be identified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Known Bugs ===&lt;br /&gt;
This BIP should not be promoted from Draft status until these are addressed:&lt;br /&gt;
* Noncerange might not be possible to support for all workers, so a way to signal support is needed&lt;br /&gt;
* Longpolling currently assumes URI-based requests, which is not implied by JSON-RPC.&lt;br /&gt;
* &#039;&#039;(feel free to add issues here)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
There is reasonable concerns about mining currently being too centralized on pools, and the amount of control these pools hold.&lt;br /&gt;
By exposing the details of the block proposals to the miners, they are enabled to audit and possibly modify the block before hashing it.&lt;br /&gt;
&lt;br /&gt;
There is also a very minor load reduction on the pool server, since it does not need to calculate SHA256 for the block&#039;s merkle tree.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
&lt;br /&gt;
* [https://gitorious.org/bitcoin/eloipool Eloipool]&lt;br /&gt;
* [http://luke.dashjr.org/programs/bitcoin/w/bitcoind/luke-jr.git/blobdiff/722d9387be4b267b689d7b7d78daeb7157bd12d8..gmp_bip:/src/bitcoinrpc.cpp bitcoind]&lt;br /&gt;
&lt;br /&gt;
[[Category:BIP|D]]&lt;/div&gt;</summary>
		<author><name>Genjix</name></author>
	</entry>
</feed>