Bitcoin Forum

Bitcoin => Armory => Topic started by: papa_snurf on March 09, 2013, 02:13:38 PM



Title: Why do I need the whole chain to broadcast a transaction?
Post by: papa_snurf on March 09, 2013, 02:13:38 PM
Please excuse a noob's ignorance, but I understand that even if the transaction is generated offline, the online armory client need to download the full blockchain to broadcast the transaction message.

My question is: why ?

If I try to broadcast an invalid transaction and the originating address does not contain enough coins the miners will reject it anyway. Why do I need the whole chain?


Title: Re: Why do I need the whole chain to broadcast a transaction?
Post by: Raoul Duke on March 09, 2013, 02:34:35 PM
Please excuse a noob's ignorance, but I understand that even if the transaction is generated offline, the online armory client need to download the full blockchain to broadcast the transaction message.

My question is: why ?

If I try to broadcast an invalid transaction and the originating address does not contain enough coins the miners will reject it anyway. Why do I need the whole chain?

Because most people who would commit such a mistake most likely wouldn't be able to recover coins not spent if they were sent in an invalid transaction without coming here crying for help.

The technical reasons may be different, but this one sure is one heck of a reason.
Never trust user inputs without validation. ;)


Title: Re: Why do I need the whole chain to broadcast a transaction?
Post by: papa_snurf on March 09, 2013, 03:01:13 PM
Please excuse a noob's ignorance, but I understand that even if the transaction is generated offline, the online armory client need to download the full blockchain to broadcast the transaction message.

My question is: why ?

If I try to broadcast an invalid transaction and the originating address does not contain enough coins the miners will reject it anyway. Why do I need the whole chain?

Because most people who would commit such a mistake most likely wouldn't be able to recover coins not spent if they were sent in an invalid transaction without coming here crying for help.

The technical reasons may be different, but this one sure is one heck of a reason.
Never trust user inputs without validation. ;)

Thanks for your answer.

What kind of errors could be prevented by downloading the blockchain?

If we're talking about inputting bad addresses then the embedded checksum should prevent that.


Title: Re: Why do I need the whole chain to broadcast a transaction?
Post by: Raoul Duke on March 09, 2013, 03:39:02 PM
Please excuse a noob's ignorance, but I understand that even if the transaction is generated offline, the online armory client need to download the full blockchain to broadcast the transaction message.

My question is: why ?

If I try to broadcast an invalid transaction and the originating address does not contain enough coins the miners will reject it anyway. Why do I need the whole chain?

Because most people who would commit such a mistake most likely wouldn't be able to recover coins not spent if they were sent in an invalid transaction without coming here crying for help.

The technical reasons may be different, but this one sure is one heck of a reason.
Never trust user inputs without validation. ;)

Thanks for your answer.

What kind of errors could be prevented by downloading the blockchain?

If we're talking about inputting bad addresses then the embedded checksum should prevent that.

No, I'm talking about armory not knowing if some of the coins on "your" transaction were already spent in a previous transaction. Now imagine that mixed with those already spent coins you also send some coins you didn't spend yet. What would happen? Those "valid" coins would be "stuck" on an invalid transaction that nobody would accept or relay.
Maybe you or me could recover those coins with 5 or 10 minutes of work, deleting the tx or exporting and importing the private key(s) into another wallet, but most users won't.
Not allowing users to do stupid things is a great reason, don't you think? ;)

Certainly there may be are other technical reasons for it. I'm sure etotheipi will come here and give you a detailed explanation.


Title: Re: Why do I need the whole chain to broadcast a transaction?
Post by: nimda on March 11, 2013, 11:32:18 PM
I am fairly certain that you do not need the whole chain to broadcast a transaction. You could create one yourself with raw transactions and then push it. There is no technical obstacle; it's merely a very good design choice.


Title: Re: Why do I need the whole chain to broadcast a transaction?
Post by: ErebusBat on April 02, 2013, 07:22:06 PM
You dont need any chain to broadcast a TX; however to generate the TX you have to have the outputs of previous transactions.  This is why an offline armory computer can be very small, because it is just signing the already created TX with your privet key(s).

In that security model it doesn't make sense to have the signing computer connected to the network to broadcast the TX, although it could.  You could create a TX on a machine with the full chain, then sign it on another offline computer then broadcast the TX from a completely different computer.

You can even use the rawtx API or http://blockchain.info/pushtx to send it out.