Pages:
Author

Topic: My Segwit questions - a Q&A for Achow and the rest - page 3. (Read 1212 times)

legendary
Activity: 2898
Merit: 1823

Aside:

Ok, sorry for all the dumb questions. As you have seen, I am not a technical person so the concept is a little hard for me to grasp.

There is no need for you to grasp it.  If you’re “not a technical person”, don’t even try.  And if you do want to try, then you should start by increasing your basic technical skills—then reading the specs.  Then, you would never find yourself apologizing for “dumb questions”.

There is some sort of absurd postmodern myth that everybody needs to understand everything.  No, you don’t—and you won’t; you never will.  You use technology every day which you have not the slightest hope of ever understanding.  I guarantee that you don’t understand GPS, either; but I’d wager that you trust it to guide you where you want to go.

Segwit is highly technical.  It’s a hack; but it’s a brilliant, elegant hack which makes everything Just Work without sacrificing backwards compatibility (= no hardfork).  The whole Internet is built on such hacks, most of them far less neat and orderly.  Do you want to start brushing up on IPv6 and DNSSEC?  Or for that matter, the long chain of weird kludges applied to SMTP since the protocol was first defined in 1982?

Segwit does not remove signatures; that’s a ridiculous canard peddled by smear campaigners for cheap propaganda purposes.  The engineers did a fine job on this one.  That’s all you really need to know.  If you can’t or won’t read all the specs—if you lack the ability and/or the will to work through the process of gaining significant expertise—then don’t ask questions, especially if you won’t read the answers anyway.  Just sit back, use, and enjoy.

(Note:  I am not affiliated with Core, though I hope to perhaps contribute someday.  I like specs and Unix kernel C code for bedtime reading.)

Sorry. I know I am technically slow to you but the least you can do is to encourage the learning process. I also know I do not have to understand what goes on "under the hood". But what can I do? There interest is there.
legendary
Activity: 3948
Merit: 3191
Leave no FUD unchallenged
I finally found a video that explains it in a way a non-technical person like me can understand. https://www.youtube.com/watch?v=QYZv92F2kCw

It can't be that great a video if it explains it in a way that gave you the wrong impression.  I'll take a crack at it in the hope it might make more sense. 

There is only one set of blocks.  It's just that the blocks can be read in one of two ways.  Legacy nodes (any non-SegWit ones) can only ever see a maximum of 1MB of the block, however large it actually happens to be.  SegWit nodes, however, can see the total size of the block in its entirety.  SegWit transactions store witness data in the extra space (up to a maximum of 3MB added on top of the base 1MB) that all the legacy nodes can't read, meaning there's slightly more space for transactions in the 1MB base portion.

As an example, you can see with your own eyes plenty of blocks now taking up more than 1MB of space, but for all the nodes that don't support SegWit, they won't be able to recognise or understand the witness portions that take those blocks over 1MB.  They simply don't see it, so all of those blocks still appear to be smaller than 1MB to them, meaning they'll simply ignore everything in the witness space (because they don't even know it's there).

Technically it isn't any smaller, but it still means more transactions can fit into the base 1MB portion of the block, because the legacy nodes can ignore all the SegWit signatures.
copper member
Activity: 630
Merit: 2614
If you don’t do PGP, you don’t do crypto!
Hi Achow, did Segwit make the blocks more compact by removing the signatures from the transactions and placing them in an "extended block", and at the same time, maintaining the block size to 1mb?

Is that what it really did?

Another question. Where is the "extended block" stored exactly?


achow101 already answered your questions.  Fully.  Did you read his replies to you?

There are no "extended blocks". Blocks are the same as before; [...]

The signatures are stored as part of the transaction.

In other words, there is no “removing” of signatures as you say.  Now to elaborate on this, which you should read carefully:

What actually happened is that the block size limit was redefined to something called block weight. There is now a block weight limit, which is 4000000 weight units. Each byte of non-witness data (everything that a legacy node will see) is worth 4 weight units. Each byte of segwit data (everything that a legacy node won't see) is worth 1 weight unit. So if you use segwit, more bytes of your transaction will be in witness data than a comparable non-segwit transaction. So the weight of your transaction is lower and thus there will be more weight for other transactions in the block. That is where the capacity increase comes from.

Stop thinking in terms of “block size”.  The whole concept of a “block size” is obsolete.  With Segwit, there is no longer a block size limit at all!  Instead, as achow101 already explained to you, there is a block weight limit of 4000000 bytes:

Code:
/** The maximum allowed weight for a block, see BIP 141 (network rule) */
static const unsigned int MAX_BLOCK_WEIGHT = 4000000;

The above-mentioned “weight” calculation is specified by BIP 141:

Ok, sorry for all the dumb questions. As you have seen, I am not a technical person so the concept is a little hard for me to grasp.

There is no need for you to grasp it.  If you’re “not a technical person”, don’t even try.  And if you do want to try, then you should start by increasing your basic technical skills—then reading the specs.  Then, you would never find yourself apologizing for “dumb questions”.

There is some sort of absurd postmodern myth that everybody needs to understand everything.  No, you don’t—and you won’t; you never will.  You use technology every day which you have not the slightest hope of ever understanding.  I guarantee that you don’t understand GPS, either; but I’d wager that you trust it to guide you where you want to go.

Segwit is highly technical.  It’s a hack; but it’s a brilliant, elegant hack which makes everything Just Work without sacrificing backwards compatibility (= no hardfork).  The whole Internet is built on such hacks, most of them far less neat and orderly.  Do you want to start brushing up on IPv6 and DNSSEC?  Or for that matter, the long chain of weird kludges applied to SMTP since the protocol was first defined in 1982?

Segwit does not remove signatures; that’s a ridiculous canard peddled by smear campaigners for cheap propaganda purposes.  The engineers did a fine job on this one.  That’s all you really need to know.  If you can’t or won’t read all the specs—if you lack the ability and/or the will to work through the process of gaining significant expertise—then don’t ask questions, especially if you won’t read the answers anyway.  Just sit back, use, and enjoy.

(Note:  I am not affiliated with Core, though I hope to perhaps contribute someday.  I like specs and Unix kernel C code for bedtime reading.)
legendary
Activity: 2898
Merit: 1823
Hi Achow, did Segwit make the blocks more compact by removing the signatures from the transactions and placing them in an "extended block", and at the same time, maintaining the block size to 1mb?

Is that what it really did?

Another question. Where is the "extended block" stored exactly?
legendary
Activity: 2898
Merit: 1823
Ok, sorry for all the dumb questions. I believe it is time for me to go back and read more about it. As you have seen, I am not a technical person so the concept is a little hard for me to grasp.
staff
Activity: 3458
Merit: 6793
Just writing some code
Thanks for the reply. But where are the input signatures "stored" and hashed, and how does that "free" space from the blocks to allow more transactions to fit in?

The more I try to learn the more questions I have. Sad
The signatures are stored as part of the transaction. Because legacy nodes will not see the signatures, there is effectively more free space in the block for more data that those legacy nodes can see (e.g. more transactions).

What actually happened is that the block size limit was redefined to something called block weight. There is now a block weight limit, which is 4000000 weight units. Each byte of non-witness data (everything that a legacy node will see) is worth 4 weight units. Each byte of segwit data (everything that a legacy node won't see) is worth 1 weight unit. So if you use segwit, more bytes of your transaction will be in witness data than a comparable non-segwit transaction. So the weight of your transaction is lower and thus there will be more weight for other transactions in the block. That is where the capacity increase comes from.
legendary
Activity: 2898
Merit: 1823
Thanks for the reply. But where are the input signatures "stored" and hashed, and how does that "free" space from the blocks to allow more transactions to fit in?

The more I try to learn the more questions I have. Sad
staff
Activity: 3458
Merit: 6793
Just writing some code
There are no "extended blocks". Blocks are the same as before; they only contain the block header and the transaction. What changed was the transactions. The transactions have two different formats: legacy, and segwit. When a segwit capable nodes receives a block, it will receive the block with transactions in the segwit format. When a non-segwit node receives a block, it will receive the transactions in the legacy format.

When you run a segwit capable node, using the getrawtransaction or gettransaction commands will give you all of the details of the transaction, including the witnesses.
legendary
Activity: 2898
Merit: 1823
I finally found a video that explains it in a way a non-technical person like me can understand. https://www.youtube.com/watch?v=QYZv92F2kCw

But that brings me to a question. Where are extended blocks stored and can we call the information from within it on command? What if I want to see the signature of the sender? Are all the data pulled by Segwit still retrievable?
Pages:
Jump to: