Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: No_2 on June 30, 2014, 05:06:41 PM



Title: Sending messages to the blockchain with a bitcoin transaction.
Post by: No_2 on June 30, 2014, 05:06:41 PM
I thought that one could optionally send a short message (40 bytes) to be written to the blockchain with a valid transaction.

If it's possible how do I do this?



Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: EcuaMobi on June 30, 2014, 05:08:49 PM
It is possible, but as far as I know UI clients normally don't write or read that message.

You can read more about it here:
http://www.proofofexistence.com/about


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: No_2 on June 30, 2014, 05:18:17 PM
Does anyone know if there is a way to write the message from the Bitcoin-QT command line interface then?


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: DannyHamilton on June 30, 2014, 07:34:11 PM
Does anyone know if there is a way to write the message from the Bitcoin-QT command line interface then?

It's not supported by the Bitcoin-Qt command line interface.

You need to build a raw transaction using the OP_RETURN op code in an output with the message that you want.

Then you can use signrawtransaction and send rawtransaction to send the transaction and hope that a miner will confirm it for you.


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: jbrnt on June 30, 2014, 07:56:30 PM
I am sure you can write a short message in a transaction using blockchain.info wallet. You may not want to use their online wallet, that's how I do it.

Edit: DannyHamilton has informed me that the message attached with the transaction written by blockchain.info wallet is NOT broadcasted to the blockchain and no other client can read the message. Thanks DH!


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: cp1 on June 30, 2014, 07:58:05 PM
You can also encode a message as the address, but that won't associate the message with a "real" transaction.


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: DannyHamilton on June 30, 2014, 08:14:28 PM
I am sure you can write a short message in a transaction using blockchain.info wallet. You may not want to use their online wallet, that's how I do it.

Blockchain.info does not put messages in the transactions.

They just store messages in their own database and make them available on their website.  They are not broadcast with the transaction, they are not stored in the blockchain, and they are not visible to any other wallets.


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: No_2 on June 30, 2014, 08:43:25 PM
It's not supported by the Bitcoin-Qt command line interface.

You need to build a raw transaction using the OP_RETURN op code in an output with the message that you want.

Then you can use signrawtransaction and send rawtransaction to send the transaction and hope that a miner will confirm it for you.

Thanks for this; can you point me somewhere where I can read up on how to do this?


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: DannyHamilton on June 30, 2014, 08:46:20 PM
It's not supported by the Bitcoin-Qt command line interface.

You need to build a raw transaction using the OP_RETURN op code in an output with the message that you want.

Then you can use signrawtransaction and send rawtransaction to send the transaction and hope that a miner will confirm it for you.

Thanks for this; can you point me somewhere where I can read up on how to do this?

Transaction structure:
https://en.bitcoin.it/wiki/Transactions

Script Op codes:
https://en.bitcoin.it/wiki/Script


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: No_2 on July 08, 2014, 06:05:24 PM
Transaction structure:
https://en.bitcoin.it/wiki/Transactions

Script Op codes:
https://en.bitcoin.it/wiki/Script

Thanks for this. Is there any application or scripting framework you could point me at to do this so I don't have to write my own software to broadcast a transaction with a message in it.


Title: Re: Sending messages to the blockchain with a bitcoin transaction.
Post by: micaman on July 08, 2014, 06:33:01 PM
Although i'm not aware of any script that would allow you to do that, i find this article very interesting and detailed:
http://www.righto.com/2014/02/ascii-bernanke-wikileaks-photographs.html

This site reads existing messages on the blockchain:
http://bitcoinstrings.com/

Hope it helps, good luck.