Post
Topic
Board Development & Technical Discussion
Merits 8 from 5 users
Re: Clarification on how sigwit reduce transaction malleability issue
by
gmaxwell
on 10/06/2025, 02:32:10 UTC
⭐ Merited by ABCbits (3) ,hosemary (2) ,HeRetiK (1) ,vapourminer (1) ,Cricktor (1)
I was doing some research about the ways to cut out transaction fees when I came across SegWit. I discovered that SegWit was introduced to fix transaction malleability and improve block space efficiency, but I’m still a bit unclear and confused on how it works under the hood.
SegWit which is Segregated Witness in full  actually changes Bitcoin transactions by separating witness data (which are actually signatures and public keys) from the main transaction data which  makes it easier to work with and also save block space and improve efficiency smaller space occupied means smaller fees paid.

The witness data is not separated from the transactions, it's in each transaction before the nLocktime field.   It prevents malleability attacks by separating it from the txid so that child transactions aren't invalidated by changes to the signature, the same way *within* a transaction the various signatures don't sign each other.  It doesn't change the space of anything.  It doesn't directly lower fees, but because the witness field isn't counted in the original blocksize limit the change was able to effectively eliminate the old limit and replace it with a "weight limit"-- like measuring blocks by the pound instead of by the gallon and the witness data takes up less weight.  The increase in capacity can result in lower fees for a given amount of demand since users bid against each other for access to capacity.