Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: leen93 on April 08, 2015, 05:30:08 PM



Title: change tx id
Post by: leen93 on April 08, 2015, 05:30:08 PM
Hi!
I want to change the tx id when i do a transaction (or at least have the ability to check it before i send the transaction)
What's the easiest way to do this? I tried it in blockchain.info and at advanced it gave a hash in the confirmation stage but it seems it's not the tx id. Can someone help me how to do this?


Title: Re: change tx id
Post by: shorena on April 08, 2015, 05:33:15 PM
Hi!
I want to change the tx id when i do a transaction (or at least have the ability to check it before i send the transaction)
What's the easiest way to do this? I tried it in blockchain.info and at advanced it gave a hash in the confirmation stage but it seems it's not the tx id. Can someone help me how to do this?

Create a raw transaction[1] with bitcoin core, but dont broadcast it.


[1] https://bitcoin.org/en/developer-examples#simple-raw-transaction


Title: Re: change tx id
Post by: leen93 on April 08, 2015, 05:35:29 PM
i don't have that and i guess it'll take me a while to download the full blockchain
any options to do it faster or should i just start downloading?  :D


Title: Re: change tx id
Post by: shorena on April 08, 2015, 05:38:46 PM
i don't have that and i guess it'll take me a while to download the full blockchain
any options to do it faster or should i just start downloading?  :D

You dont need to download the blockchain to create a raw TX. I could create a raw transaction for any inputs on the blockchain, I just cant sign it. The only thing that requires a copy of the blockchain is "listunspend" you can replace that step by just looking up the tx id and the position of the output on a blockexplorer. You could also do the broadcasting externally[1] and thus keep bitcoin core offline the entire time. The only thing you would need is the private key(s) to sign the TX.


[1] https://en.bitcoin.it/wiki/Transaction_broadcasting


Title: Re: change tx id
Post by: leen93 on April 08, 2015, 05:42:42 PM
i don't have that and i guess it'll take me a while to download the full blockchain
any options to do it faster or should i just start downloading?  :D

You dont need to download the blockchain to create a raw TX. I could create a raw transaction for any inputs on the blockchain, I just cant sign it. The only thing that requires a copy of the blockchain is "listunspend" you can replace that step by just looking up the tx id and the position of the output on a blockexplorer. You could also do the broadcasting externally[1] and thus keep bitcoin core offline the entire time. The only thing you would need is the private key(s) to sign the TX.


[1] https://en.bitcoin.it/wiki/Transaction_broadcasting
ok, i'm a bitcoin noob, but in the end i want to sign the transaction, so where should i do this then?


Title: Re: change tx id
Post by: shorena on April 08, 2015, 08:05:20 PM
i don't have that and i guess it'll take me a while to download the full blockchain
any options to do it faster or should i just start downloading?  :D

You dont need to download the blockchain to create a raw TX. I could create a raw transaction for any inputs on the blockchain, I just cant sign it. The only thing that requires a copy of the blockchain is "listunspend" you can replace that step by just looking up the tx id and the position of the output on a blockexplorer. You could also do the broadcasting externally[1] and thus keep bitcoin core offline the entire time. The only thing you would need is the private key(s) to sign the TX.


[1] https://en.bitcoin.it/wiki/Transaction_broadcasting
ok, i'm a bitcoin noob, but in the end i want to sign the transaction, so where should i do this then?

This is not actually noob level youd probably have to advance a bit. When in doubt use testcoins or regtest mode[1]. The signing would be done within bitcoin core, thus you need your private key there. AFAIK there is no way to create a raw transaction with bitcoin core and sign it with bc.i. You can use bc.i to push it once its signed though.

[1] https://bitcoin.org/en/developer-examples#regtest-mode


Title: Re: change tx id
Post by: 1000000 on April 08, 2015, 08:33:36 PM
If you don't want to use Bitcoin Core, try this:

  • Get the unspent outputs with https://blockchain.info/unspent?address=yourbitcoinaddresshere
  • Turn off your internet connection
  • Build a raw transaction using https://brainwallet.github.io/#tx
  • Turn on your internet connection
  • Decode and check the transaction here https://btc.blockr.io/tx/push

Now you have the txid and can decide if you want to push it or build a new raw transaction.


Title: Re: change tx id
Post by: Taras on April 08, 2015, 09:07:55 PM
Why exactly do you want to do this?

Like block hashes, it's impossible to get whatever hash you want, but having a mathematically low hash is proof that a lot of work has been done.


Title: Re: change tx id
Post by: leen93 on April 09, 2015, 10:16:23 AM
If you don't want to use Bitcoin Core, try this:

  • Get the unspent outputs with https://blockchain.info/unspent?address=yourbitcoinaddresshere
  • Turn off your internet connection
  • Build a raw transaction using https://brainwallet.github.io/#tx
  • Turn on your internet connection
  • Decode and check the transaction here https://btc.blockr.io/tx/push

Now you have the txid and can decide if you want to push it or build a new raw transaction.
ok how do i build this raw transaction? :)


Title: Re: change tx id
Post by: samson on April 09, 2015, 10:41:50 AM
If you don't want to use Bitcoin Core, try this:

  • Get the unspent outputs with https://blockchain.info/unspent?address=yourbitcoinaddresshere
  • Turn off your internet connection
  • Build a raw transaction using https://brainwallet.github.io/#tx
  • Turn on your internet connection
  • Decode and check the transaction here https://btc.blockr.io/tx/push

Now you have the txid and can decide if you want to push it or build a new raw transaction.
ok how do i build this raw transaction? :)

You're going to need to do a whole lot of learning before you should meddle with raw transactions.

https://bitcoin.org/en/developer-examples#complex-raw-transaction


Title: Re: change tx id
Post by: Velkro on April 09, 2015, 11:32:56 AM
Hi!
I want to change the tx id when i do a transaction (or at least have the ability to check it before i send the transaction)
What's the easiest way to do this? I tried it in blockchain.info and at advanced it gave a hash in the confirmation stage but it seems it's not the tx id. Can someone help me how to do this?

Create a raw transaction[1] with bitcoin core, but dont broadcast it.


[1] https://bitcoin.org/en/developer-examples#simple-raw-transaction
Was reading one time about it, very hard to understand, still don't get it. Good luck topic author :)


Title: Re: change tx id
Post by: shorena on April 09, 2015, 04:25:44 PM
Hi!
I want to change the tx id when i do a transaction (or at least have the ability to check it before i send the transaction)
What's the easiest way to do this? I tried it in blockchain.info and at advanced it gave a hash in the confirmation stage but it seems it's not the tx id. Can someone help me how to do this?

Create a raw transaction[1] with bitcoin core, but dont broadcast it.


[1] https://bitcoin.org/en/developer-examples#simple-raw-transaction
Was reading one time about it, very hard to understand, still don't get it. Good luck topic author :)

I had problems understand as well, but than I took a few hours and tried it on the testnet. Made some mistakes, now it seems simple. I think its something thats best understood by doing it. Testnet or regtest (did not use that yet) is perfect for that as you dont have to play with real bitcoin.


Title: Re: change tx id
Post by: Muhammed Zakir on April 09, 2015, 06:39:12 PM
If you don't want to use Bitcoin Core, try this:

  • Get the unspent outputs with https://blockchain.info/unspent?address=yourbitcoinaddresshere
  • Turn off your internet connection
  • Build a raw transaction using https://brainwallet.github.io/#tx
  • Turn on your internet connection
  • Decode and check the transaction here https://btc.blockr.io/tx/push

Now you have the txid and can decide if you want to push it or build a new raw transaction.
ok how do i build this raw transaction? :)

If you are using Brainwallet.github.io, he has mentioned the steps but a bit more detailed one:

• Go to https://blockchain.info/unspent?address=yourbitcoinaddress or https://blockexplorer.com/q/mytransactions/yourbitcoinaddress.
• Copy all the contents(hold Ctrl and press 'a' and then hold ctrl and press 'c')
• Open Brainwallet.github.io/#tx[1] and turn off internet.
• Put private key in "Private key"(first) field and click cancel when a popup comes.
• Click "Edit History" under it and paste the content you copied earlier and in the expanded field.

If you do this successfully, you can see total Bitcoins available in your address in "BTC" field right to "Source Address"(second) field.

• Now enter the address you want to send the Bitcoins to in "Destination Address"(fourth) field and enter the amount in the next field.

Optional: If you want to send Bitcoins to more than one address, you can click "+" button and add appropriate address and amount in it/them.

Optional: Check the size of transaction in "JSON Transaction"(seventh) field and and if it is higher than 1000, change fee to 0.0002BTC and click "Re-sign".

• Now you can see some alpha-numerical characters in field "Raw Transaction"(eighth), it is the raw transaction of that transaction.

Congratulations, you just created a raw transaction!

[1] It is better to download it. Older version is verified by other persons than the new one. So I recommend downloading the previous version.

Edit: Fixed typo.