Bitcoin Forum
June 29, 2024, 11:25:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Is the OP_RETURN for contracts and smart properties? on: July 25, 2014, 11:11:18 PM
Standard OP_RETURN output is for attaching arbitrary data (e.g. a hash of some document). How do you use it - it's your problem. But you are encouraged to add this data as OP_RETURN output instead of, say, a 1 satoshi fake address output. This way the index of unspent outputs will not be cluttered with provably unspent outputs (my opinion: that does not matter, UTXO will grow huge anyway; we need other ways to optimize it).

For smart contracts there is an entire scripting language built-in. And there are some wiki pages on how you can build cool contracts with it: https://en.bitcoin.it/wiki/Contracts



Thanks for your help!

I have gone through a few times on the wiki page that you have pointed out before I posted here, it is very interesting material, but there is not much there that would help implement the actual solution. At least I couldn't find it in the wiki article.

The transaction_tests.cpp test_IsStandard test gives me some idea how to create an OP_RETURN  output, I guess this is how to create the transaction
// 40-byte TX_NULL_DATA (standard)
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8");

To experiment with OP_RETURN output do I need to create a new app based on the bitcoin source  by putting my own code to create the transaction or is it possible to create an OP_RETURN output using the bitcoind app?



Proof of existence is a pretty slick new service that automates OP_RETURN transactions for you.

http://www.proofofexistence.com/about
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!