Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: spazzdla on February 26, 2017, 05:39:20 PM



Title: Segwit
Post by: spazzdla on February 26, 2017, 05:39:20 PM
How do the signatures work?  They are separated into two separate blocks so there would be two blockchains running? One would store a block of transactions and a block of signatures?


Title: Re: Segwit
Post by: achow101 on February 27, 2017, 06:29:12 AM
How do the signatures work?  They are separated into two separate blocks so there would be two blockchains running? One would store a block of transactions and a block of signatures?
No. Segwit changes the transaction format for segwit enabled nodes. This new format includes a new field after the outputs called the txwitness. The txwitness contains what would have been an input's normal scriptsig if it were a p2pkh or p2sh input. The txwitness contains these "scriptsigs" in the exact same order as the inputs. This "scriptsig" includes the signatures, pubkeys, and redeemscripts.

When in a block, the transactions are just included with this new serialization format; there is no additional block or other outside data.

For more in depth technical details, read BIP 144 (https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki). I can also explain it with more detail if you want.



Holy shit you people really know how to derail a thread extremely quickly. No one has bothered to answer OP's question and instead went off on rants about segwit that are unrelated to OP's question. As such, all of your posts have been deleted for being off topic.


Title: Re: Segwit
Post by: amaclin on February 27, 2017, 06:48:40 AM
Holy shit you people really know how to derail a thread extremely quickly. No one has bothered to answer [...]
This is standard/normal behaviour from the very early stage of civilization :)

I am still thinking what will be the best strategy for a miner, if he receives
a block in "old" format from non-upgraded node. Such blocks will transfer
much more faster through the network, because there will be no signature
checking operations.

Should the miner throw this block away because of lack of witness parts in transactions
or should it mine on top of this incomplete block?  ;D


Title: Re: Segwit
Post by: Lauda on February 27, 2017, 07:53:26 AM
I am still thinking what will be the best strategy for a miner, if he receives
a block in "old" format from non-upgraded node.
If a soft fork is activated, why would someone be mining in "old format"? I'm assuming that you're talking about a miner/node that is using pre-Segwit software to mine, in which case it would get orphaned I believe (previous version block). If you're referring to something else, then please elaborate.


Title: Re: Segwit
Post by: amaclin on February 27, 2017, 08:35:48 AM
If a soft fork is activated, why would someone be mining in "old format"? I'm assuming that you're
talking about a miner/node that is using pre-Segwit software to mine, in which case it would get
orphaned I believe (previous version block). If you're referring to something else, then please elaborate.
No. This is some kind of SPV-mining.
You have valid pre-segwit block at height N with sufficient difficulty and correct header.
Should you start mine the block (N+1) or continue to mine block N?


Title: Re: Segwit
Post by: achow101 on February 27, 2017, 02:13:18 PM
If a soft fork is activated, why would someone be mining in "old format"? I'm assuming that you're talking about a miner/node that is using pre-Segwit software to mine, in which case it would get orphaned I believe (previous version block). If you're referring to something else, then please elaborate.
No, not necessarily. Firstly, version numbers are no longer used for signalling and "forking" as versionbits is now used. A block is still valid if it is in the non-segwit format and contains no segwit transactions. It is only invalid and thus rejected by segwit nodes if it contains segwit transactions but does not use the segwit serialization format or the have witness commitment in the coinbase.

I am still thinking what will be the best strategy for a miner, if he receives
a block in "old" format from non-upgraded node. Such blocks will transfer
much more faster through the network, because there will be no signature
checking operations.

Should the miner throw this block away because of lack of witness parts in transactions
or should it mine on top of this incomplete block?  ;D
If a node that supports segwit receives a block in non-witness format but contains witness transactions, it should reject it as invalid.


Title: Re: Segwit
Post by: amaclin on February 27, 2017, 02:16:15 PM
If a node that supports segwit receives a block in non-witness format but
contains witness transactions, it should reject it as invalid.
Should or must? How can you be sure?  ;D


Title: Re: Segwit
Post by: spazzdla on February 27, 2017, 03:10:41 PM
I don't  get how this offers an advantage over block size increase... :S


Title: Re: Segwit
Post by: Lauda on February 27, 2017, 03:29:59 PM
I don't  get how this offers an advantage over block size increase... :S
Here's the list: https://bitcoincore.org/en/2016/01/26/segwit-benefits/
In comparison, a block size increase only has 1 as mentioned in that list under "Block capacity/size increase".


Title: Re: Segwit
Post by: zzTAz on February 27, 2017, 03:44:54 PM
Roger Ver (BU) vs Tone Vays (SegWit) - Bitcoin Scaling Debate

https://www.youtube.com/watch?v=XdyIJ-BUPaU


Title: Re: Segwit
Post by: spazzdla on February 27, 2017, 03:54:36 PM
Roger Ver (BU) vs Tone Vays (SegWit) - Bitcoin Scaling Debate

https://www.youtube.com/watch?v=XdyIJ-BUPaU

Thanks. 


Title: Re: Segwit
Post by: zzTAz on February 27, 2017, 11:18:59 PM
if someone is interested you can find the second debate here

https://www.youtube.com/watch?v=JarEszFY1WY