Author

Topic: How to convey transaction to network (Read 1963 times)

member
Activity: 108
Merit: 10
May 15, 2015, 08:40:49 AM
#20
OOPs, bad news.  Blockchain.info blocks transactions with an OP_Return as 'non standard transactions' - https://blockchain.info/rejected .  Is there a better API to push transactions into?
Standard node doesn't relay non-standard tx. So it never reaches mining pool. So you need to push into directly to pull, as TheButterZone sad before eligius pool allows it.
When will 80byte OP_Return become standard?
Here https://github.com/bitcoin/bitcoin/blob/f0043c2d6d2ceddd631a76b424dd8c163f3dad66/src/main.cpp#L885 bitcoin-core prohibits to accept to memory(and eventually to relay) non-standart txs unless it explicitly setted in params. I dont know are txs with OP_Return non-standart now, but if so they will not be relayed by bitcoin-core standart wallet.
hero member
Activity: 672
Merit: 507
LOTEO
May 06, 2015, 05:05:20 PM
#19
It should work with any language that can do HTTP POST including very low level programming languages. I think .NET is ops preferred language.

Yep.  Exactly.  But could somebody post an example of an HTTP POST in .Net that sends a transaction into a node (the network) - (which node?) (a permanent known node?). 

Please post some code which does this if you can.

Sorry, I don't know anything about .NET, but almost every language I've worked with has some sort of system("systemcommandhere") call.  Why not just use .NET's version of system() and then the classic curl binary:

$ curl -X POST --data "foo=bar&baz=quux" URL

HTTP post with command line is probably the easiest method. He could use a wrapper for a HTTP client request or execute a system call. I don't think Windows comes with a copy of curl but there are windows ports of curl.

He can use something like this:

Code:
ProcessStartInfo transaction = new ProcessStartInfo ("curl.exe .....", "parameters");
Process.Start (transaction);
legendary
Activity: 1512
Merit: 1009
May 06, 2015, 02:17:35 PM
#18
Easiest way? You've answered yourself, yes, Blockchain can do that https://blockchain.info/pushtx

You can also just use Electrum... or Armory if you have it. You can also push it here https://btc.blockr.io/tx/push. Also here https://brainwallet.org/#tx
legendary
Activity: 1456
Merit: 1078
I may write code in exchange for bitcoins.
May 06, 2015, 01:54:32 PM
#17
It should work with any language that can do HTTP POST including very low level programming languages. I think .NET is ops preferred language.

Yep.  Exactly.  But could somebody post an example of an HTTP POST in .Net that sends a transaction into a node (the network) - (which node?) (a permanent known node?). 

Please post some code which does this if you can.

Sorry, I don't know anything about .NET, but almost every language I've worked with has some sort of system("systemcommandhere") call.  Why not just use .NET's version of system() and then the classic curl binary:

$ curl -X POST --data "foo=bar&baz=quux" URL
hero member
Activity: 874
Merit: 1000
May 06, 2015, 10:46:14 AM
#16
OOPs, bad news.  Blockchain.info blocks transactions with an OP_Return as 'non standard transactions' - https://blockchain.info/rejected .  Is there a better API to push transactions into?
Standard node doesn't relay non-standard tx. So it never reaches mining pool. So you need to push into directly to pull, as TheButterZone sad before eligius pool allows it.
When will 80byte OP_Return become standard?
member
Activity: 108
Merit: 10
May 06, 2015, 10:19:14 AM
#15
OOPs, bad news.  Blockchain.info blocks transactions with an OP_Return as 'non standard transactions' - https://blockchain.info/rejected .  Is there a better API to push transactions into?
Standard node doesn't relay non-standard tx. So it never reaches mining pool. So you need to push into directly to pull, as TheButterZone sad before eligius pool allows it.
hero member
Activity: 874
Merit: 1000
May 06, 2015, 05:49:13 AM
#14
It should work with any language that can do HTTP POST including very low level programming languages. I think .NET is ops preferred language.

Yep.  Exactly.  But could somebody post an example of an HTTP POST in .Net that sends a transaction into a node (the network) - (which node?) (a permanent known node?). 

Please post some code which does this if you can.
hero member
Activity: 672
Merit: 507
LOTEO
May 04, 2015, 04:49:38 PM
#13
Yeah, I don't know how to write the WebRequest object in .Net to send to the push URL at blockr.  Having trouble with the encoding and stuff. 

Blockchain.info has a sweet API for .Net - but then they go and block OP_Return.  Why do they block OP_Return?  That is totally stupid.  Does any other blockchain API providers have a nice .Net code on GitHub? 

Holy shit this is hard.

I don't understand what .NET has to do with it.  If you're using that blockchain API, can't you just use HTTP POST.  Programming language shouldn't matter should it?

It should work with any language that can do HTTP POST including very low level programming languages. I think .NET is ops preferred language.
legendary
Activity: 1456
Merit: 1078
I may write code in exchange for bitcoins.
May 04, 2015, 12:12:57 PM
#12
Yeah, I don't know how to write the WebRequest object in .Net to send to the push URL at blockr.  Having trouble with the encoding and stuff. 

Blockchain.info has a sweet API for .Net - but then they go and block OP_Return.  Why do they block OP_Return?  That is totally stupid.  Does any other blockchain API providers have a nice .Net code on GitHub? 

Holy shit this is hard.

I don't understand what .NET has to do with it.  If you're using that blockchain API, can't you just use HTTP POST.  Programming language shouldn't matter should it?
hero member
Activity: 874
Merit: 1000
May 02, 2015, 06:30:46 AM
#10
Yeah, I don't know how to write the WebRequest object in .Net to send to the push URL at blockr.  Having trouble with the encoding and stuff. 

Blockchain.info has a sweet API for .Net - but then they go and block OP_Return.  Why do they block OP_Return?  That is totally stupid.  Does any other blockchain API providers have a nice .Net code on GitHub? 

Holy shit this is hard.
legendary
Activity: 3052
Merit: 1031
RIP Mommy
hero member
Activity: 874
Merit: 1000
May 02, 2015, 02:05:00 AM
#8
010000000128442f044ac462554b880776d3e2e33794e6fec7c1f01ee9e7e82ae66534034300000 0
006a47304402203fe2ee295c4c27b6d2d90e5aeaa83b651d2ad729d99b57fb292d4ea4e07a1d690 2
201265c12ec5bbe379c973c358738a07ee369e9237dd600ad07b7db41729b8457d012103611dc2a 5
7e244ab48a6d1b9bbb8958a0743c002d141def726cd2d2732dd01561ffffffff03c027090000000 0
001976a914c5760f778c8d2fcd0f7e8aa1a163ca8089c9fe9488ac309c3800000000001976a9140 c
c3ed93022d209d7907939a5be757db143e568c88ac0000000000000000266a24313337352054686 f
6d61732053742e2053616e2052616661656c2c20434120393230363700000000

Need to remove all spaces and carriage returns from that hex so that it is an unbroken string of characters, then it's valid. I just broadcasted it via Electrum.
Nice!  Thanks very much for that.  Smiley

OOPs, bad news.  Blockchain.info blocks transactions with an OP_Return as 'non standard transactions' - https://blockchain.info/rejected .  Is there a better API to push transactions into?

legendary
Activity: 3052
Merit: 1031
RIP Mommy
May 01, 2015, 03:03:16 PM
#7
010000000128442f044ac462554b880776d3e2e33794e6fec7c1f01ee9e7e82ae66534034300000 0
006a47304402203fe2ee295c4c27b6d2d90e5aeaa83b651d2ad729d99b57fb292d4ea4e07a1d690 2
201265c12ec5bbe379c973c358738a07ee369e9237dd600ad07b7db41729b8457d012103611dc2a 5
7e244ab48a6d1b9bbb8958a0743c002d141def726cd2d2732dd01561ffffffff03c027090000000 0
001976a914c5760f778c8d2fcd0f7e8aa1a163ca8089c9fe9488ac309c3800000000001976a9140 c
c3ed93022d209d7907939a5be757db143e568c88ac0000000000000000266a24313337352054686 f
6d61732053742e2053616e2052616661656c2c20434120393230363700000000

Need to remove all spaces and carriage returns from that hex so that it is an unbroken string of characters, then it's valid. I just broadcasted it via Electrum.
hero member
Activity: 874
Merit: 1000
May 01, 2015, 06:29:23 AM
#6
@OP, the blockchain tool to accept a raw transaction over HTTP is here: https://blockchain.info/pushtx

Hmm, that's seems cool.  

However, I can't get this one to publish.  Any idea what's up?

010000000128442f044ac462554b880776d3e2e33794e6fec7c1f01ee9e7e82ae66534034300000 0
006a47304402203fe2ee295c4c27b6d2d90e5aeaa83b651d2ad729d99b57fb292d4ea4e07a1d690 2
201265c12ec5bbe379c973c358738a07ee369e9237dd600ad07b7db41729b8457d012103611dc2a 5
7e244ab48a6d1b9bbb8958a0743c002d141def726cd2d2732dd01561ffffffff03c027090000000 0
001976a914c5760f778c8d2fcd0f7e8aa1a163ca8089c9fe9488ac309c3800000000001976a9140 c
c3ed93022d209d7907939a5be757db143e568c88ac0000000000000000266a24313337352054686 f
6d61732053742e2053616e2052616661656c2c20434120393230363700000000


I have a most perfectly formed transaction ready to go.
Maybe not! Wink
legendary
Activity: 2097
Merit: 1068
April 30, 2015, 05:26:17 PM
#5
Someone wrote a blog entry which covers this - scroll down a little and there's a python script to do it.

http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html
legendary
Activity: 1456
Merit: 1078
I may write code in exchange for bitcoins.
April 30, 2015, 01:27:45 PM
#4
I have a most perfectly formed transaction ready to go.  What is the easiest way to transmit it into the bitcoin network for processing?  

I don't want to set up and run bitcoind on a local machine.  Too much agro.  Is there a trusted node with a permanent IP which I can send (via some protocol) the bytes to?  What is the minimum handshaking that must be done to establish a connection to this node with a know IP.  Is there an easier way?  Does blockchain.info support that?

You can use a thin client library for that, have a look at pybitcoinlib. Transactions can be pushed using blockchain.info or an exchange.


I poked around a bit in that library, I see where in an example "import socket" is used to send to a local IP.  I guess socket uses TCP for the connection.  However, like the OP, I'd also be interested in knowing if it's possible to connect in this way to any particular full node.  

@OP, the blockchain tool to accept a raw transaction over HTTP is here: https://blockchain.info/pushtx
sr. member
Activity: 412
Merit: 266
April 30, 2015, 01:20:48 PM
#3
Substitute the tx hex for your own, and this is good to go. I haven't used it over the CLI before, it will reject transactions sometimes, so watch out for that. It sometimes states there is a problem with the transaction, but it gets broadcast anyway.

curl -X POST -d tx=010000000158891e8f28100642464417f53845c3953a43e31b35d061bdbf6ca3a64fffabb8000000008c493046022100a9d501a6f59c45a24e65e5030903cfd80ba33910f24d6a505961d64fa5042b4f02210089fa7cc00ab2b5fc15499fa259a057e6d0911d4e849f1720cc6bc58e941fe7e20141041a2756dd506e45a1142c7f7f03ae9d3d9954f8543f4c3ca56f025df66f1afcba6086cec8d4135cbb5f5f1d731f25ba0884fc06945c9bbf69b9b543ca91866e79ffffffff01204e0000000000001976a914d04b020dab70a7dd7055db3bbc70d27c1b25a99c88ac00000000 https://blockchain.info/pushtx

Otherwise, you might be able to do something similar for this form: https://insight.bitpay.com/tx/send

There are probably several of these insight servers around, some googling might help you have some redundancy for broadcasting.
hero member
Activity: 672
Merit: 507
LOTEO
April 30, 2015, 01:08:31 PM
#2
I have a most perfectly formed transaction ready to go.  What is the easiest way to transmit it into the bitcoin network for processing? 

I don't want to set up and run bitcoind on a local machine.  Too much agro.  Is there a trusted node with a permanent IP which I can send (via some protocol) the bytes to?  What is the minimum handshaking that must be done to establish a connection to this node with a know IP.  Is there an easier way?  Does blockchain.info support that?

You can use a thin client library for that, have a look at pybitcoinlib. Transactions can be pushed using blockchain.info or an exchange.

hero member
Activity: 874
Merit: 1000
April 30, 2015, 01:05:13 PM
#1
I have a most perfectly formed transaction ready to go.  What is the easiest way to transmit it into the bitcoin network for processing? 

I don't want to set up and run bitcoind on a local machine.  Too much agro.  Is there a trusted node with a permanent IP which I can send (via some protocol) the bytes to?  What is the minimum handshaking that must be done to establish a connection to this node with a know IP.  Is there an easier way?  Does blockchain.info support that?
Jump to: