<div dir="ltr"><div>Hi all. I&#39;ve been working on a new publication platform based on Bitcoin called key.run: <a href="http://key.run">http://key.run</a></div><div><br></div><div>The high level overview is that key.run stores BitTorrent info hashes (magnet links) in the blockchain by sending transactions to a &quot;namespace&quot; Bitcoin address. Using SPV, I reconstitute the key.run db from the blockchain. This is meant to be an open source and distributed system so anyone can run the key.run server (and change namespace keys). More info here: <a href="https://git.playgrub.com/toby/keyrun">https://git.playgrub.com/toby/keyrun</a></div><div><br></div><div>Now to my issue...</div><div><br></div><div>One of the main use cases I wanted to support was people using their *existing* Bitcoin wallet to encode the key.run transactions on the blockchain. Practically speaking this meant building the transactions with the proper OP_RETURN value server-side then passing them to the end user&#39;s wallet via BIP-70. I have this working with Bitcoin Core (there are issues with other wallets I&#39;ve tested with BIP-70).</div><div><br></div><div>The problem I&#39;m having is that Bitcoin Core will not allow BIP-70 PaymentDetails to contain outputs with zero value. As stated in <a href="https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki">https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki</a>:</div><div><br></div><div>&quot;if there are more than one; Outputs with zero amounts shall be ignored&quot;</div><div><br></div><div>Bitcoin Core doesn&#39;t seem to ignore the output though, it rejects the transaction and doesn&#39;t allow the user to submit it. The key.run transactions currently work by giving the OP_RETURN outputs a non-zero &gt; dust value. This value is presumably lost forever.</div><div><br></div><div>I think ideally OP_RETURN outputs with zero value WOULD be allowed since they are valid transactions. Allowing OP_RETURN outputs to be constructed with BIP-70 Payments is also the only way I can think of to extend the functionality of existing wallets.</div><div><br></div><div>I would love to get feedback on if there is an alternative way to do what I propose or ideally if BIP-70 could be tweaked to allow OP_RETURN outputs with zero value.</div><div><br></div><div>I&#39;d also love feedback on key.run but this probably isn&#39;t the best venue for that. I&#39;ve setup #keyrun on Freenode if anyone is interested in discussing the project.</div><div><br></div><div>Regards,</div><div>Toby</div><div><br></div><div>--</div><div><a href="http://twitter.com/toby">http://twitter.com/toby</a></div></div>