Pages:
Author

Topic: Webpage to paste raw tx for broadcast? - page 3. (Read 9999 times)

sr. member
Activity: 262
Merit: 250
November 02, 2011, 04:49:01 AM
#18
Is a mess! Will tidy up at sort out hosting it over next few days.

It's a fine start.

If you know anything about Maven then I would consider creating a pom.xml if I were you. You can then include bitcoinj in a clean fashion. http://code.google.com/p/bitcoinj/wiki/UsingMaven

The benefit with that is then you could then host the code on Heroku (for free), they now accept java programs as long as there's a pom.xml and a proc file.





sr. member
Activity: 438
Merit: 291
November 02, 2011, 03:32:00 AM
#17
Have written basics. And it works.

Source is at:
http://bitcoinstatus.rowit.co.uk/transactionupload/Main.java
http://bitcoinstatus.rowit.co.uk/transactionupload/SendTransactionServer.java

Screenshot at:
http://bitcoinstatus.rowit.co.uk/transactionupload/Capture.PNG

Transaction at:
http://blockexplorer.com/t/6UV8aA8m21

Is a mess! Will tidy up at sort out hosting it over next few days.

Have returned 0.5 BTC. You can pay the 0.5 back yourself when I have it hosted.


sr. member
Activity: 438
Merit: 291
November 02, 2011, 02:06:07 AM
#16
Damn! now I have to do it.

Your string was perfect. I can load into the bitcoinj transaction object 1st time. It contains the following transaction:

  9072559e9e2772cd6ac88683531a512cba6c2fee82b2476ed5e84c24abe5f526
     from 12HFYcL3Gj8EPhgeXk5689z8Wcc7x7FsNx
       to 13Tn1QkAcqnQvGA7kBiCBH7NbijNcr6GMs 1.00 BTC
       to 12HFYcL3Gj8EPhgeXk5689z8Wcc7x7FsNx 0.49 BTC

So that was the only tricky bit done.

I just now need to write the easy but dull jetty wrapper for it.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
November 01, 2011, 07:54:33 PM
#15
Is quite simple to do in bitcoinj. Do you have a format in mind? If so send me an sample will see what I can do. Please DOUBLE check it is signed correctly! Make it a transaction that sends to my address below and I will have more motivation!
I was thinking that if www.bitaddress.org could also create/sign transactions (not trival as need to link all the inputs), then if you had this web site you could then create transaction totally offline.

I just created a tx, transferring 1.0 BTC to the address in your signature.  I plugged this tx and the previous one into my ECDSA unit-test (which works on other Blockchain tx-pairs) and it passed.  So I'm fairly confident that this is signed correctly.  Here's the raw hex:

Code:
0100000001f658dbc28e703d86ee17c9a2d3b167a8508b082fa0745f55be5144a4369873aa010000008c49304602210041e1186ca9a41fdfe1569d5d807ca7ff6c5ffd19d2ad1be42f7f2a20cdc8f1cc0221003366b5d64fe81e53910e156914091d12646bc0d1d662b7a65ead3ebe4ab8f6c40141048d103d81ac9691cf13f3fc94e44968ef67b27f58b27372c13108552d24a6ee04785838f34624b294afee83749b64478bb8480c20b242c376e77eea2b3dc48b4bffffffff0200e1f505000000001976a9141b00a2f6899335366f04b277e19d777559c35bc888ac40aeeb02000000001976a9140e0aec36fe2545fb31a41164fb6954adcd96b34288ac00000000

And a pretty version of it:
Code:
0x0000:  01000000 01f658db c28e703d 86ee17c9 a2d3b167 a8508b08 2fa0745f 55be5144 
0x0020:  a4369873 aa010000 008c4930 46022100 41e1186c a9a41fdf e1569d5d 807ca7ff
0x0040:  6c5ffd19 d2ad1be4 2f7f2a20 cdc8f1cc 02210033 66b5d64f e81e5391 0e156914
0x0060:  091d1264 6bc0d1d6 62b7a65e ad3ebe4a b8f6c401 41048d10 3d81ac96 91cf13f3
0x0080:  fc94e449 68ef67b2 7f58b273 72c13108 552d24a6 ee047858 38f34624 b294afee
0x00a0:  83749b64 478bb848 0c20b242 c376e77e ea2b3dc4 8b4bffff ffff0200 e1f50500
0x00c0:  00000019 76a9141b 00a2f689 9335366f 04b277e1 9d777559 c35bc888 ac40aeeb
0x00e0:  02000000 001976a9 140e0aec 36fe2545 fb31a411 64fb6954 adcd96b3 4288ac00
0x0100:  000000

@btc_novice:  I'll happily toss you a BTC too, to test your solution, if you get something running.
full member
Activity: 154
Merit: 102
Bitcoin!
November 01, 2011, 07:02:15 PM
#14
Is quite simple to do in bitcoinj. Do you have a format in mind? If so send me an sample will see what I can do. Please DOUBLE check it is signed correctly! Make it a transaction that sends to my address below and I will have more motivation!

I was thinking that if www.bitaddress.org could also create/sign transactions (not trival as need to link all the inputs), then if you had this web site you could then create transaction totally offline.

It might not be a good idea to construct the transactions online, because that means you're giving your private key to a 3rd party (and sending it over the wire).

It looks like the site that used the patch to accept transactions entered on a webpage no longer exists:
https://bitcointalksearch.org/topic/m.384518

Yes, it looks like the domain is not online anymore.  In any case, I'm working on getting a page up that will do this.
legendary
Activity: 1204
Merit: 1015
November 01, 2011, 06:56:51 PM
#13
It looks like the site that used the patch to accept transactions entered on a webpage no longer exists:
https://bitcointalksearch.org/topic/m.384518
sr. member
Activity: 438
Merit: 291
November 01, 2011, 06:19:53 PM
#12
Is quite simple to do in bitcoinj. Do you have a format in mind? If so send me an sample will see what I can do. Please DOUBLE check it is signed correctly! Make it a transaction that sends to my address below and I will have more motivation!

I was thinking that if www.bitaddress.org could also create/sign transactions (not trival as need to link all the inputs), then if you had this web site you could then create transaction totally offline.



full member
Activity: 154
Merit: 102
Bitcoin!
November 01, 2011, 05:58:28 PM
#11
Don't let me discourage you from diving into BTC -- it can be a fun, amazingly-educational experience.  But I know for sure that three months ago there was a tx-broadcast webpage already in existence.  Unfortunately, I lost all my bookmarks and am trying to locate it again...
If you find the page, that's great!  I think I'm still going to go ahead with this for the learning experience.

On the other hand, it may not be too difficult to setup such a webpage if you use the patch linked to from terrytibs:  run an instance of the patched bitcoind, then make a webpage with a simple text-input box.  The POST (?) command will simply convert the input text to binary, and pass it to your patched bitcoind for broadcast.  You probably don't even need to know anything about BTC to do it!  Just make sure there's someway to identify that there was an error... I imagine 90% of people trying to post txs in this way will have done something incorrectly the first few tries.
Sounds like we're thinking alike. Smiley  I'm going to give this a try.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
November 01, 2011, 05:47:22 PM
#10

I've seen that discussion before, and that was actually going to be my last resort if I couldn't find this webpage...

I hadn't seen that patch.  I'll have to take a look at that.

I think I'll still have a go at setting this up as a webpage, since that would be a lot more convenient for people than patching the client.

Don't let me discourage you from diving into BTC -- it can be a fun, amazingly-educational experience.  But I know for sure that three months ago there was a tx-broadcast webpage already in existence.  Unfortunately, I lost all my bookmarks and am trying to locate it again...

On the other hand, it may not be too difficult to setup such a webpage if you use the patch linked to from terrytibs:  run an instance of the patched bitcoind, then make a webpage with a simple text-input box.  The POST (?) command will simply convert the input text to binary, and pass it to your patched bitcoind for broadcast.  You probably don't even need to know anything about BTC to do it!  Just make sure there's someway to identify that there was an error... I imagine 90% of people trying to post txs in this way will have done something incorrectly the first few tries.
full member
Activity: 154
Merit: 102
Bitcoin!
November 01, 2011, 05:39:48 PM
#9
I hadn't seen that patch.  I'll have to take a look at that.

I think I'll still have a go at setting this up as a webpage, since that would be a lot more convenient for people than patching the client.
hero member
Activity: 560
Merit: 501
November 01, 2011, 05:37:11 PM
#8
full member
Activity: 154
Merit: 102
Bitcoin!
November 01, 2011, 05:32:55 PM
#7
Nice diagrams.  This will give me something to chew on as a familiarize myself with the protocol.

I'm thinking that the easiest way to set this up as a web service would be to patch the client source code to allow injecting pre-constructed transactions, and then use the client to handle communicating with peers and broadcasting the tx.  I think it's either that or writing my own script to handle peer discovery and communication.  I'll have to start messing around with this on testnet.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
November 01, 2011, 05:15:28 PM
#6
There's a couple different ways to communicate a transaction with ASCII characters as I was proposing here, but the binary structure is constant.  See the first image I posted on this page:

https://bitcointalksearch.org/topic/on-the-wire-byte-map-opchecksig-diagram-knowledge-donation-29416

That shows exactly how a Tx is serialized in binary, and has an example of every kind of "standard" TxIn and TxOut.  This is exactly how the data is stored in your .bitcoin/blk0001.dat file, and exactly how it would be communicated to a tx-forwarder.  The only question is if it's a webpage for pasting ASCII, how do you represent that binary data in ASCII?  I think the best option is simply representing it in hex:  two hexbytes per binary byte.  Here's an example transaction, and what I would expect to be able to copy into the webpage:

Code:
01000000020f7b7fb86d4cf646058e41d3b007183fdf79736ed19b2a7468abc5bd04b16e91000000008c493046022100b2ee39d2fcc2e5544a57c30f7b4e49cfb82222666d034fb90e22348e17e28e0f022100db91c3199cc7b41d4d7afce0ccb4ceb424b9476d51c06142583daf53ce0a9b66014104c32215a9093011bd3c41283ace3d002c666077b24a605b3cfc8f71019a0f43df66f389f3d9a62188a494b869dc7e5f9dffc98a76d3088a21e9b738ec9eba98cbffffffff97004125528f7b5ed33465caaae021c0b815f3e6a3707641d5a0bca43fc14949010000008a473044022033d02c2e896f1a1252488d534cfb08abf3e7ea90aba7ba6f57abf189cef1d837022005668d755013b0e59a2af5145f10efe62ea716d333268b0b5a3efbd82d1439be014104c32215a9093011bd3c41283ace3d002c666077b24a605b3cfc8f71019a0f43df66f389f3d9a62188a494b869dc7e5f9dffc98a76d3088a21e9b738ec9eba98cbffffffff0100c2eb0b000000001976a91402bf4b2889c6ada8190c252e70bde1a1909f961788ac00000000

If you want to try following the binary bytemap, here's a pretty-printed version of the same data (each row is 32 bytes):
Code:
0x0000:     01000000 020f7b7f b86d4cf6 46058e41  d3b00718 3fdf7973 6ed19b2a 7468abc5 
0x0020:     bd04b16e 91000000 008c4930 46022100  b2ee39d2 fcc2e554 4a57c30f 7b4e49cf
0x0040:     b8222266 6d034fb9 0e22348e 17e28e0f  022100db 91c3199c c7b41d4d 7afce0cc
0x0060:     b4ceb424 b9476d51 c0614258 3daf53ce  0a9b6601 4104c322 15a90930 11bd3c41
0x0080:     283ace3d 002c6660 77b24a60 5b3cfc8f  71019a0f 43df66f3 89f3d9a6 2188a494
0x00a0:     b869dc7e 5f9dffc9 8a76d308 8a21e9b7  38ec9eba 98cbffff ffff9700 4125528f
0x00c0:     7b5ed334 65caaae0 21c0b815 f3e6a370  7641d5a0 bca43fc1 49490100 00008a47
0x00e0:     30440220 33d02c2e 896f1a12 52488d53  4cfb08ab f3e7ea90 aba7ba6f 57abf189
0x0100:     cef1d837 02200566 8d755013 b0e59a2a  f5145f10 efe62ea7 16d33326 8b0b5a3e
0x0120:     fbd82d14 39be0141 04c32215 a9093011  bd3c4128 3ace3d00 2c666077 b24a605b
0x0140:     3cfc8f71 019a0f43 df66f389 f3d9a621  88a494b8 69dc7e5f 9dffc98a 76d3088a
0x0160:     21e9b738 ec9eba98 cbffffff ff0100c2  eb0b0000 00001976 a91402bf 4b2889c6
0x0180:     ada8190c 252e70bd e1a1909f 961788ac  00000000
full member
Activity: 154
Merit: 102
Bitcoin!
November 01, 2011, 05:06:29 PM
#5
Okay that makes sense.  So you would basically use this to be able to send/spend bitcoins that have have in offline storage (paper wallet, etc).

This sounds like an interesting project I might like to take on to get my feet wet.  Can you give me an example of an offline transaction you would construct and what the resultant data packet would be that would need to be sent?  I will have to do some reading about the bitcoin protocol, but if you give me an example, that will get me jump started.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
November 01, 2011, 04:37:01 PM
#4
I can construct transactions offline, signing them with a private key only kept on an offline computer.  But then that packet must be transferred to an online computer and broadcast.  Right now, the Satoshi client has no tx-forwarding capability.  So I have 3  options:

(1) Write a program that can connect to the BTC network with peer discovery, networking protocol, etc (HARD)
(2) Modify the client source code to allow tx-forwarding (HARD -- I could spend a week just figuring out how to compile it)
(3) Copy-and-paste the serialized tx into a webpage where someone has already done this work for the rest of us (takes 10 seconds)

Personally, I prefer option 3.
full member
Activity: 154
Merit: 102
Bitcoin!
November 01, 2011, 04:31:22 PM
#3
What would be the reason to have something like this?  What is the use case?
hero member
Activity: 558
Merit: 500
November 01, 2011, 04:27:41 PM
#2
bump... can somebody do it?
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
October 29, 2011, 02:07:47 PM
#1
A couple months ago I ran across apage someone made with a giant text-input box, where you could copy a serialized Tx into it and it would be broadcast onto the network.  Does anyone know if this still exists, and if so, what is the link to it?    Extra-credit:  does it work with the testnet, too?
Pages:
Jump to: