Bitcoin Forum
October 18, 2018, 07:29:47 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: non-segwit to segwit raw transactions  (Read 73 times)
samspaces
Legendary
*
Offline Offline

Activity: 1324
Merit: 1000


View Profile
March 21, 2018, 03:12:22 PM
 #1

Hi,

Weirdly, I'm not able to find easily identifiable info on the title topic. I have an old wallet and want to move coins to segwit addresses. I used to do offline raw transaction signing in the format:

createrawtransaction '[{"txid":"input_tx_number_long_string","vout":number}]' '{"sendtoaddress": amount}'

I've made transactions to a segwit address this way and it shows fine in the balance. Still I'm a bit worried I'm doing something wrong or overlooking something. And do segwit to segwit raw transactions have the same format as stated above?

Thanks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1539890987
Hero Member
*
Offline Offline

Posts: 1539890987

View Profile Personal Message (Offline)

Ignore
1539890987
Reply with quote  #2

1539890987
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 1568
Merit: 1094

Somewhat inactive.


View Profile WWW
March 21, 2018, 03:31:34 PM
 #2

If the transaction has appeared in your bech32 address, then its definitely fine. It wouldn't appear if the transaction is invalid.

Bitcoin Core supports bech32 addresses since 0.16.0 and it is definitely possible to use that command to send to bech32 addresses. If you're using an older version, you've probably sent it to a P2SH address and that is completely fine.

samspaces
Legendary
*
Offline Offline

Activity: 1324
Merit: 1000


View Profile
March 21, 2018, 03:44:42 PM
 #3

If the transaction has appeared in your bech32 address, then its definitely fine. It wouldn't appear if the transaction is invalid.

Bitcoin Core supports bech32 addresses since 0.16.0 and it is definitely possible to use that command to send to bech32 addresses. If you're using an older version, you've probably sent it to a P2SH address and that is completely fine.

Thanks, I sent it to P2SH addresses, since Bitcoin Core 0.16 wasn't out yet. So you're saying that the above raw transaction format works from and to all Bitcoin address types, right?
ranochigo
Legendary
*
Offline Offline

Activity: 1568
Merit: 1094

Somewhat inactive.


View Profile WWW
March 21, 2018, 03:53:18 PM
 #4

Thanks, I sent it to P2SH addresses, since Bitcoin Core 0.16 wasn't out yet. So you're saying that the above raw transaction format works from and to all Bitcoin address types, right?
Bitcoin Core 0.16 is already out: https://bitcoin.org/en/download.

Anyways, yup. P2SH addresses has been supported for a very long time and bech32 will work for createrawtransaction as well[1]. It's the same arguments.

[1] https://github.com/bitcoin/bitcoin/pull/11167/

samspaces
Legendary
*
Offline Offline

Activity: 1324
Merit: 1000


View Profile
March 21, 2018, 07:01:34 PM
 #5

Thanks, I sent it to P2SH addresses, since Bitcoin Core 0.16 wasn't out yet. So you're saying that the above raw transaction format works from and to all Bitcoin address types, right?
Bitcoin Core 0.16 is already out: https://bitcoin.org/en/download.

Anyways, yup. P2SH addresses has been supported for a very long time and bech32 will work for createrawtransaction as well[1]. It's the same arguments.

[1] https://github.com/bitcoin/bitcoin/pull/11167/

Great, thanks!
Maybe others out there will find this little thread useful too.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!