Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: hathmill on March 21, 2013, 06:34:59 PM



Title: Deserialize Raw TX?
Post by: hathmill on March 21, 2013, 06:34:59 PM
I created a TX using http://brainwallet.org/ and instead of a fee if 0.001 BTC it took 1.8... Probably it was me who did something wrong, but from now on I will want to decode the raw TX before sending it.

Anyone here who knows of a script that can decode/deserialize a raw tx that have not yet been broadcasted - so that I can verify that the fee and so forth is what I want to send?

EDIT: I checked the blockchain.info and found that BTC Guild had relayed that block. I contacted them and Eleuthria was very helpful and sent as much of the fees as recoverable back to me.  ;D


Title: Re: Deserialize Raw TX?
Post by: Joric on March 21, 2013, 06:53:11 PM
It decodes transactions as well, just paste raw transaction to the Raw Transaction field.


Title: Re: Deserialize Raw TX?
Post by: hathmill on March 21, 2013, 07:19:18 PM
It decodes transactions as well, just paste raw transaction to the Raw Transaction field.

Ah, ok so when I input my own raw transaction data the JSON textarea is updated. Then I copy the out scriptPubKey hex and use the brainwallet converter to verify that the proper address has been encoded.

So I get some coins going back to my source address and some coins goes to destination address. Then there are some coins "missing" from the out array, is this the fee?


Title: Re: Deserialize Raw TX?
Post by: jackjack on March 21, 2013, 08:15:14 PM
Yes


Title: Re: Deserialize Raw TX?
Post by: hathmill on March 21, 2013, 08:33:22 PM
Thank you all for your help!  ;D


Title: Re: Deserialize Raw TX?
Post by: eleuthria on March 21, 2013, 11:15:01 PM
BTC Guild sent back the amount of the fee that hadn't been paid to miners already.  I wish we could've returned more like the user that paid over 100 BTC in fees, but we've seen a huge shift to PPLNS as ASIC users come into the pool, which pays the transaction fees out to miners.  45~55% of the pool currently gets paid transaction fees, and it happens immediately after the block is solved.

Be very careful when dealing with raw transcations, or a transaction builder (I've never had experience with Brainwallet).  As more pools switch to paying fees to miners, the likelihood of being able to recover erroneous fees shrinks, assuming it even goes to a known pool/miner that is willing to return it.