luv2drnkbr (OP)
|
|
February 07, 2014, 07:14:14 AM |
|
I'm looking for somebody to teach me how to manually create and sign an OP_RETURN tx in Windows.
I don't care how you do it-- it can be working with me, you can just send me a step-by-step guide, or it can be a video you make -- whatever method you choose is fine as long as afterwards I can, on my own, create a tx with an OP_RETURN output that the Eligius pool would mine.
I have no idea how simple or complicated a task teaching me to do this is, so I'm asking for bids before I commit to some price.
My experience level is that I consider myself pretty computer savvy, but not a programmer. I've written some simple scripts in autohotkey, I can read most programming languages and understand what the code is doing, I know the JSON format and have registered some domains with namecoind via the Windows cmd.exe. I'm reasonably tech-savvy, but I'm not a programmer, and I use Windows. I do NOT know ECC, and I don't know how to use point multiplication to get a public key from a private key-- I've been using Casascius' Bitcoin Address Utility for that type of thing.
So that's what you'd be working with. Please post here or PM if you think this is something you could help me with and let me know what you'd charge.
Thanks guys!!
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
February 22, 2014, 05:14:16 PM Last edit: July 27, 2014, 06:05:18 AM by dexX7 |
|
Okay, I'll try. I created f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b a few minutes ago and will use this as example. Start up your Bitcoin-Qt/bitcoind v0.9 client and go Help - Debug. Enter: "getrawtransaction f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b". You will then see the transaction as hex*: 01000000015d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8000000006b483045022100fd8c5227976363b79c6c2c72592e98148090ca26d89707f60dfaa19d5c59519f02207a34c47f2a55b9513d152520dd035fb9842d689c0c3350f4c0145e827e61604d01210391b373843e77f5ac1f05db4afb5151190e67cfee5a48f7925d71da7c5e919422ffffffff0100000000000000004e6a4c4b6f64617920697320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616e64207374617920666c756666792100000000 This is the raw transaction with descriptions: 01000000 < Version 01 < Number of inputs 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8 < Input transaction id 00000000 < Vout 00 < scriptSig length* ffffffff < Sequence number 01 < Number of outputs 0000000000000000 < Value 4e < Push 78 byte (it's 78 hex encoded) 6a < OP_RETURN 4c < Push 76 byte (it's 76 hex encoded) 4974277320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616c6c20616e64207374617920666c7566667921 < Payload with length of 76 byte 00000000 < Lock time
*I removed the actual scriptSig for this example. You may notice that some data is flipped, for example the input transaction hash (compare: c8bb07dc4d2277ad506f16068f7cebc4cb481715332bd3d615ee3f46ab5f475d vs. 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8). To create an OP_RETURN transaction yourself, you may use this template: 0100000001AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB00000000ffffffff0100000000000000004e6a4cCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000 Replace AA...A with the input transaction hash flipped, BB with vout, CC...C with your payload/message. Go back to your debug console and type "decoderawtransaction XXX", whereby XXX is your modified transaction hex. If everything is fine, this should return some information about your transaction. You may adjust the payload length by changing the 4e and 4c. Use a calculator to convert the numbers. http://brainwallet.org/#converter has a hex to text and vice versa converter. When you are finished, type: "signrawtransaction XXX", whereby XXX is your transaction hex. It should show a longer hex followed by "complete". Copy that longer hash and type "sendrawtransaction YYY", whereby YYY is the signed transaction hex. Last note: make sure you use only an input with 0.0001-ish BTC. It will all be considered as miner fee unless you add more outputs. Hope that helps. Edit: max length is now 40 byte, so you must adjust the length.
|
|
|
|
networthsigns
|
|
February 22, 2014, 09:23:11 PM |
|
From my point of view, this is a nice illustration, the op might honor dexX7 well with some coins.
|
|
|
|
yakuza699
|
|
February 22, 2014, 10:09:54 PM |
|
So you basically want to double-spend(send same inputs twice)?
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
February 22, 2014, 10:15:47 PM |
|
So you basically want to double-spend(send same inputs twice)?
Hm? No. OP should use a fresh, unused input.
|
|
|
|
mtomcdev
|
|
July 24, 2014, 11:21:38 PM |
|
Okay, I'll try. I created f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b a few minutes ago and will use this as example. Start up your Bitcoin-Qt/bitcoind v0.9 client and go Help - Debug. Enter: "getrawtransaction f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b". You will then see the transaction as hex*: 01000000015d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8000000006b483045022100fd8c5227976363b79c6c2c72592e98148090ca26d89707f60dfaa19d5c59519f02207a34c47f2a55b9513d152520dd035fb9842d689c0c3350f4c0145e827e61604d01210391b373843e77f5ac1f05db4afb5151190e67cfee5a48f7925d71da7c5e919422ffffffff0100000000000000004e6a4c4b6f64617920697320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616e64207374617920666c756666792100000000 This is the raw transaction with descriptions: 01000000 < Version 01 < Number of inputs 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8 < Input transaction id 00000000 < Vout 00 < scriptSig length* ffffffff < Sequence number 01 < Number of outputs 0000000000000000 < Value 4e < Push 78 byte (it's 78 hex encoded) 6a < OP_RETURN 4c < Push 76 byte (it's 76 hex encoded) 4974277320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616c6c20616e64207374617920666c7566667921 < Payload with length of 76 byte 00000000 < Lock time
*I removed the actual scriptSig for this example. You may notice that some data is flipped, for example the input transaction hash (compare: c8bb07dc4d2277ad506f16068f7cebc4cb481715332bd3d615ee3f46ab5f475d vs. 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8). To create an OP_RETURN transaction yourself, you may use this template: 0100000001AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB00000000ffffffff0100000000000000004e6a4cCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000 Replace AA...A with the input transaction hash flipped, BB with vout, CC...C with your payload/message. Go back to your debug console and type "decoderawtransaction XXX", whereby XXX is your modified transaction hex. If everything is fine, this should return some information about your transaction. You may adjust the payload length by changing the 4e and 4c. Use a calculator to convert the numbers. http://brainwallet.org/#converter has a hex to text and vice versa converter. When you are finished, type: "signrawtransaction XXX", whereby XXX is your transaction hash. It should show a longer hash followed by "complete". Copy that longer hash and type "sendrawtransaction YYY", whereby YYY is the signed transaction hex. Last note: make sure you use only an input with 0.0001-ish BTC. It will all be considered as miner fee unless you add more outputs. Hope that helps. Edit: max length is now 40 byte, so you must adjust the length. I am just looking this info, how to create an OP_RETURN transaction. Thanks dexX7 for posting this, it is very useful tutorial.
|
|
|
|
mtbitcoin
Legendary
Offline
Activity: 876
Merit: 1000
Etherscan.io
|
|
October 05, 2014, 07:51:12 AM |
|
Thank you dexX7
|
|
|
|
b!z
Legendary
Offline
Activity: 1582
Merit: 1010
|
|
October 05, 2014, 09:05:57 PM |
|
dexX7 you da real MVP
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
October 06, 2014, 05:08:27 PM |
|
FWIW: you probably know the max. length to push was reduced to 40 byte on most pools. A few days ago gidgreen published a small PHP tool to construct OP_RETURN transactions: https://github.com/coinspark/php-OP_RETURNThat being said, abusing the blockchain as message storage is not very popular.
|
|
|
|
FabioCarpi
|
|
January 07, 2015, 08:53:35 PM |
|
very interesting topic for me but i typing getrawtransaction f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b 1 in my bitcoin-qt 0.10 and he says "No information available about transaction (code -5)"
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
January 08, 2015, 01:25:58 AM |
|
very interesting topic for me but i typing getrawtransaction f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b 1 in my bitcoin-qt 0.10 and he says "No information available about transaction (code -5)"
Are you on testnet or mainnet? This is a mainnet transaction.
|
|
|
|
|
shamoons
|
|
March 12, 2015, 08:44:17 PM |
|
Okay, I'll try. I created f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b a few minutes ago and will use this as example. Start up your Bitcoin-Qt/bitcoind v0.9 client and go Help - Debug. Enter: "getrawtransaction f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b". You will then see the transaction as hex*: 01000000015d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8000000006b483045022100fd8c5227976363b79c6c2c72592e98148090ca26d89707f60dfaa19d5c59519f02207a34c47f2a55b9513d152520dd035fb9842d689c0c3350f4c0145e827e61604d01210391b373843e77f5ac1f05db4afb5151190e67cfee5a48f7925d71da7c5e919422ffffffff0100000000000000004e6a4c4b6f64617920697320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616e64207374617920666c756666792100000000 This is the raw transaction with descriptions: 01000000 < Version 01 < Number of inputs 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8 < Input transaction id 00000000 < Vout 00 < scriptSig length* ffffffff < Sequence number 01 < Number of outputs 0000000000000000 < Value 4e < Push 78 byte (it's 78 hex encoded) 6a < OP_RETURN 4c < Push 76 byte (it's 76 hex encoded) 4974277320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616c6c20616e64207374617920666c7566667921 < Payload with length of 76 byte 00000000 < Lock time
*I removed the actual scriptSig for this example. You may notice that some data is flipped, for example the input transaction hash (compare: c8bb07dc4d2277ad506f16068f7cebc4cb481715332bd3d615ee3f46ab5f475d vs. 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8). To create an OP_RETURN transaction yourself, you may use this template: 0100000001AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB00000000ffffffff0100000000000000004e6a4cCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000 Replace AA...A with the input transaction hash flipped, BB with vout, CC...C with your payload/message. Go back to your debug console and type "decoderawtransaction XXX", whereby XXX is your modified transaction hex. If everything is fine, this should return some information about your transaction. You may adjust the payload length by changing the 4e and 4c. Use a calculator to convert the numbers. http://brainwallet.org/#converter has a hex to text and vice versa converter. When you are finished, type: "signrawtransaction XXX", whereby XXX is your transaction hex. It should show a longer hex followed by "complete". Copy that longer hash and type "sendrawtransaction YYY", whereby YYY is the signed transaction hex. Last note: make sure you use only an input with 0.0001-ish BTC. It will all be considered as miner fee unless you add more outputs. Hope that helps. Edit: max length is now 40 byte, so you must adjust the length. Is it possible to have multiple vout's using this schema? If so, is it possible to have multiple OP_RETURNs in one transaction?
|
|
|
|
FabioCarpi
|
|
March 12, 2015, 08:54:25 PM |
|
just duplicate the part:
01 < Number of inputs 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8 < Input transaction id 00000000 < Vout 00 < scriptSig length* ffffffff < Sequence number
why more op_return?
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
March 13, 2015, 11:48:57 AM |
|
Is it possible to have multiple vout's using this schema? If so, is it possible to have multiple OP_RETURNs in one transaction?
Hi shamoons, currently only one OP_RETURN output with a size of maximal 40 byte is considered as "accepted standard". Rather recently the default size of Bitcoin Core was raised to 80 byte, although I have no data whether this is adopted on a broader scale at this moment. The size is not a strict rule, and you'll find some OP_RETURN transactions with more than 200 byte on testnet, but on mainnet such transactions usually won't be relayed.
|
|
|
|
luv2drnkbr (OP)
|
|
June 29, 2015, 11:50:18 PM |
|
From my point of view, this is a nice illustration, the op might honor dexX7 well with some coins.
I just now today found out about this thread! I stopped checking it after a few weeks, because well, a few weeks with no replies I figured it was dead. I have since gotten somebody else to teach me; however, that was a solid write-up and I'm happy to throw some coin to dexX7... except I can't find an address for him! dexX7, thank you for that great write-up! Do you have an address I can tip?
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
October 07, 2015, 02:47:44 PM |
|
Hey luv2drnkbr, thanks for the follow up! I kinda feel bad for "getting paid" for this kind of information, because I believe it serves the greater good, but you may use 1BzW1ETp2qZsi6ogAufmGsadnQzJcmVXet. Thanks a lot! And please let me know, if any step is unclear or needs to be refined. As a related note: The RPC "createrawtransaction" of Bitcoin Core 0.12 will be extended, and directly supports to create OP_RETURN transactions as follows: bitcoin-cli "createrawtransaction" '[{"txid":"hash","vout":n}, ...] '{"data": "0123..."}'
|
|
|
|
coinableS
Legendary
Offline
Activity: 1442
Merit: 1186
|
|
November 25, 2015, 03:15:57 AM |
|
Hey luv2drnkbr, thanks for the follow up! I kinda feel bad for "getting paid" for this kind of information, because I believe it serves the greater good, but you may use 1BzW1ETp2qZsi6ogAufmGsadnQzJcmVXet. Thanks a lot! And please let me know, if any step is unclear or needs to be refined. As a related note: The RPC "createrawtransaction" of Bitcoin Core 0.12 will be extended, and directly supports to create OP_RETURN transactions as follows: bitcoin-cli "createrawtransaction" '[{"txid":"hash","vout":n}, ...] '{"data": "0123..."}'
Could you do an example for what would be entered for "data" and "0123...."? It looks like the same format for a receiving address as a raw transaction. createrawtransaction '[{"txid":"","vout":}]' '{"receive_address":0.0008}'
So instead of entering a receiving address and an amount one would enter '{"data":40_bytes}' ?
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
December 10, 2015, 03:26:12 PM |
|
So instead of entering a receiving address and an amount one would enter '{"data":40_bytes}' ?
Yes, basically it comes down to this. Here is an example: 1. First, I list unspent outputs of the address I'm going to use. bitcoin-cli listunspent 0 999999 '["1BxtgEa8UcrMzVZaW32zVyJh4Sg4KGFzxA"]'
[ { "txid": "7425deeaebc2b13ff6c6d3cac78332693c86f46433403f65aef028bc88050583", "vout": 4, "address": "1BxtgEa8UcrMzVZaW32zVyJh4Sg4KGFzxA", "account": "Sender15", "scriptPubKey": "76a914784345e76ea29fd7bfe31f6f34622e154d0bb8fc88ac", "amount": 0.00110691, "confirmations": 558, "spendable": true } ]
2. Then I create the raw transaction. Note that I manually add a change output with a value of 0.00100691, so I pay a fee of exactly 0.0001 BTC. The payload for this transaction is the hex-encoded message "dexX7 @ bitcointalk.org". bitcoin-cli createrawtransaction '[{"txid":"7425deeaebc2b13ff6c6d3cac78332693c86f46433403f65aef028bc88050583","vout":4}]' '{"data":"6465785837204020626974636f696e74616c6b2e6f7267","1BxtgEa8UcrMzVZaW32zVyJh4Sg4KGFzxA":0.00100691}'
010000000183050588bc28f0ae653f403364f4863c693283c7cad3c6f63fb1c2ebeade25740400000000ffffffff020000000000000000196a176465785837204020626974636f696e74616c6b2e6f726753890100000000001976a914784345e76ea29fd7bfe31f6f34622e154d0bb8fc88ac00000000
3. Then I sign the raw transaction. bitcoin-cli signrawtransaction 010000000183050588bc28f0ae653f403364f4863c693283c7cad3c6f63fb1c2ebeade25740400000000ffffffff020000000000000000196a176465785837204020626974636f696e74616c6b2e6f726753890100000000001976a914784345e76ea29fd7bfe31f6f34622e154d0bb8fc88ac00000000
{ "hex": "010000000183050588bc28f0ae653f403364f4863c693283c7cad3c6f63fb1c2ebeade2574040000006a47304402206eaf4d9c526a59bc391329dd62b6231035920ed23ba758a4d9b02d7738c0a77b0220404f00253e7d0202e64a7a8288dc83276218b91454d45ab618408f27b7135ba7012103c86e3c49a99dd688c6c6ad05d725b6a04ef19836b13d3e90ef282fc4f2f9ee71ffffffff020000000000000000196a176465785837204020626974636f696e74616c6b2e6f726753890100000000001976a914784345e76ea29fd7bfe31f6f34622e154d0bb8fc88ac00000000", "complete": true }
4. And finally I broadcast the signed raw transaction. bitcoin-cli sendrawtransaction 010000000183050588bc28f0ae653f403364f4863c693283c7cad3c6f63fb1c2ebeade2574040000006a47304402206eaf4d9c526a59bc391329dd62b6231035920ed23ba758a4d9b02d7738c0a77b0220404f00253e7d0202e64a7a8288dc83276218b91454d45ab618408f27b7135ba7012103c86e3c49a99dd688c6c6ad05d725b6a04ef19836b13d3e90ef282fc4f2f9ee71ffffffff020000000000000000196a176465785837204020626974636f696e74616c6b2e6f726753890100000000001976a914784345e76ea29fd7bfe31f6f34622e154d0bb8fc88ac00000000
b394e47f8141f725f25854d57e91fb67d91782dbe581b2f449990ba25a116d2d
5. Here is the result: https://live.blockcypher.com/btc/tx/b394e47f8141f725f25854d57e91fb67d91782dbe581b2f449990ba25a116d2d/
|
|
|
|
Mitchell
Staff
Legendary
Offline
Activity: 4074
Merit: 2258
Verified awesomeness ✔
|
|
December 10, 2015, 08:51:04 PM |
|
Is there anyway I can recreate this in the console of Electrum? It has a createrawtx function, but I can't find anything about it online.
|
| | | . Duelbits | | | ▄████▄▄ ▄█████████▄ ▄█████████████▄ ▄██████████████████▄ ▄████▄▄▄█████████▄▄▄███▄ ▄████▐▀▄▄▀▌██▄█▄██▐▀▄▄▀▌███ ██████▀▀▀▀████▀███▀▀▀▀█████ ▐████████████■▄▄▄■██████████▀ ▐██████████████████████████▀ ██████████████████████████▀ ▀███████████████████████▀ ▀███████████████████▀ ▀███████████████▀ | | | | | . ▄ ▄▄▀▀▀▀▄▄ ▄▀▀▄ █ █ ▀▄ █ ▄█▄ ▀▄ █ ▄▀ ▀▄ ▀█▀ ▄▀ ▀█▄▄▄▀▀ ▀ ▄▀ ▄▀ ▄▀
Live Games | | ▄▄▀▀▀▀▀▀▀▄▄ ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄ ▄▀ █ ▄ █ ▄ █ ▀▄ █ █ ▀ ▀ █ █ ▄▄▄ █ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █ █ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ █▄█ █ ▀▀█ ▀▀█ ▀▀█ █ █▄█
Slots | | . ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▄ █ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ █ ▄▄ █ █ █ █ █ █ ▄▀▀▄▀▀▄ █ █ █ ▀▄ ▄▀ █ █
Blackjack | | | | █▀▀▀▀▀█▄▄▄ ▀████▄▄ ██████▄ ▄▄▄▄▄▄▄▄█▀ ▀▀█ ████████▄ █ █████████▄ █ ██████████▄ ▄██ █████████▀▀▀█▄▄████ ▀▀███▀▀ ████ █ ███ █ █▀ ▄█████▄▄▄ ▄▄▀▀ ███████▀▀▀ | | | | | | | | | | [ Đ ][ Ł ] AVAILABLE NOW | |
Advertisements are not endorsed by me.
|
|
|
|