Bitcoin Forum
April 26, 2024, 07:37:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Segwit address sending?  (Read 905 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
June 19, 2017, 08:15:32 PM
Merited by ABCbits (1)
 #1

I have looked everywhere, but have been unable to find any documentation yet, on how to make use of the possible new Segwit addresses. How can we send or accept the new type of pay to script hash address?

We keep talking about the extra space that will be available but I see no technical documentation on how to implement the pay to witness pubkey hash and pay to witness script hash.

And as far as I also understand, there is an option to enable new P2SH Segwit address to allow outputs from nodes that are not upgraded to pay into a segwit address.

PS. No politics about segwit in this thread. I will remove it.

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
1714117057
Hero Member
*
Offline Offline

Posts: 1714117057

View Profile Personal Message (Offline)

Ignore
1714117057
Reply with quote  #2

1714117057
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714117057
Hero Member
*
Offline Offline

Posts: 1714117057

View Profile Personal Message (Offline)

Ignore
1714117057
Reply with quote  #2

1714117057
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
June 19, 2017, 08:59:39 PM
 #2

There currently is no address for the native P2WSH and P2WPKH outputs yet. Bech32 has been written and proposed but not yet finalized.

Segwit addresses for now will the be the nested P2SH type. There is no difference between these nested types and any other p2sh address for sending to them and receiving payments with them. You send to them as you normally would any other address.

For spending from these addresses, the nested output is the redeemScript of the p2sh address and then the rest of spending it is as normal spending from a P2WSH or P2WPKH output. This is all detailed in BIP 143: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki

JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
June 19, 2017, 09:23:56 PM
 #3

Thanks for the quick reply.

So I guess what I really ask is, is there any good documentation that explains how to deployed the newly available P2SH nested addresses? This way we can start moving Bitcoin into the Segwit space and save on cost when we flush a high amount of tx's.

Also, as an example to understand the extra space. Say I was the only one that used the newly created P2SH addresses. Would that guarantee my tx included in the next block? Since I could use the extra space? Or would it only be a saving in terms of how big a portion of my transaction would end up in the extra space?

I know its a stupid example as many more would probably end up using the new addresses, but for the sake of understanding, if I am the only one, I assume I get included, right? 

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
June 19, 2017, 09:42:58 PM
 #4

So I guess what I really ask is, is there any good documentation that explains how to deployed the newly available P2SH nested addresses? This way we can start moving Bitcoin into the Segwit space and save on cost when we flush a high amount of tx's.
Yes. There is a segwit developer's guide: https://bitcoincore.org/en/segwit_wallet_dev/ which explains everything that needs to be done to implement all parts of segwit. The BIPs also explain most of this.

Also, as an example to understand the extra space. Say I was the only one that used the newly created P2SH addresses. Would that guarantee my tx included in the next block? Since I could use the extra space? Or would it only be a saving in terms of how big a portion of my transaction would end up in the extra space?

I know its a stupid example as many more would probably end up using the new addresses, but for the sake of understanding, if I am the only one, I assume I get included, right? 
I assume the "extra space" you are talking about is the witness data "extra space". That space is for witness data only (and it really isn't actually a separate "reserved for witness data" space in blocks either). Since only the signatures go in the witness data, you still have the rest of the transaction that must compete for the "normal" block space too. There is no guarantee that your transaction will get included in the next block.

JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
June 19, 2017, 10:39:41 PM
 #5

Awesome! This is all I needed, thanks!

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!