<p>SegWit doesn't save space, per se.</p>

<p>What it does do is:</p>

<ol>
<li><p>From the perspective of a non-upgraded node, it makes transactions <em>seem</em> smaller. The witness part is not recognized or considered by pre-fork nodes, so more of them can fit in a block.</p></li>
<li><p>From the perspective of an upgraded node, the block size is calculated differently. Less weight is assigned to witness data than to non-witness data. So for the purpose of the calculation, a SegWit transaction is considered lighter than a non-SegWit transaction. So more of them are allowed per block - but the physical data size of the block increases as a result.</p></li>
</ol>

<p>SegWit was to be introduced anyway because it solves malleability etc. But it also offered an opportunity to increase the block size limit (to allow more transactions) without requiring a hard fork, and this opportunity was seized, resulting in the feature described above.</p>

CC BY-SA 4.0
2019-07-30T00:12:33.410Z
Hello. Thanks for the answer, you write "Less weight is assigned to witness data than to non-witness data", this is kind of confusing, can you elaborate? how is block size calculated? I will update the question to include this.
Alejandro Veintimilla
CC BY-SA 4.0
2019-07-30T03:00:49.607Z
Blocks are no longer limited by size in bytes, rather they are limited by the number of "weight units" which are an arbitrary unit based upon bytes. Each byte of a transaction that is not witness data (so everything that a non-segwit node would see) is worth 4 weight units. Every byte of witness data is worth 1 weight unit. Blocks are limited to 4000000 weight units, which, if full of non-segwit transactions, is 1 MB.
Ava Chow
CC BY-SA 4.0
2019-07-29T23:22:23.753Z
2019-07-29T23:22:23.753Z
Meni Rosenfeld
<p>I have seen similar questions without a clear answer. So, how does Segregated Witness make transactions smaller? I understand it removes data from the transaction hash and solves malleability ... But it adds a field called "witness", so, how does this save space? </p>

<p>Also (this is related and helps understand the question), how is block size <a href="https://bitinfocharts.com/comparison/bitcoin-size.html" rel="nofollow noreferrer">calculated</a>? Does it include the witness?</p>

<segregated-witness>
How Segwit makes transactions smaller? What about the witness?
Alejandro Veintimilla
# How Segwit makes transactions smaller? What about the witness?

(Asked by: username_0 on 2019-07-29)

I have seen similar questions without a clear answer. So, how does Segregated Witness make transactions smaller? I understand it removes data from the transaction hash and solves malleability ... But it adds a field called "witness", so, how does this save space?

Also (this is related and helps understand the question), how is block size [calculated](https://bitinfocharts.com/comparison/bitcoin-size.html)? Does it include the witness?

**Tags:** segregated-witness


---

## 1 answers

### Answer by username_1 on 2019-07-29. Score: 4 | Accepted answer

SegWit doesn't save space, per se.

What it does do is:

1. From the perspective of a non-upgraded node, it makes transactions *seem* smaller. The witness part is not recognized or considered by pre-fork nodes, so more of them can fit in a block.
2. From the perspective of an upgraded node, the block size is calculated differently. Less weight is assigned to witness data than to non-witness data. So for the purpose of the calculation, a SegWit transaction is considered lighter than a non-SegWit transaction. So more of them are allowed per block - but the physical data size of the block increases as a result.

SegWit was to be introduced anyway because it solves malleability etc. But it also offered an opportunity to increase the block size limit (to allow more transactions) without requiring a hard fork, and this opportunity was seized, resulting in the feature described above.

> **Comments:**
> **username_0**: Hello. Thanks for the answer, you write "Less weight is assigned to witness data than to non-witness data", this is kind of confusing, can you elaborate? how is block size calculated? I will update the question to include this.  
> **username_2**: Blocks are no longer limited by size in bytes, rather they are limited by the number of "weight units" which are an arbitrary unit based upon bytes. Each byte of a transaction that is not witness data (so everything that a non-segwit node would see) is worth 4 weight units. Every byte of witness data is worth 1 weight unit. Blocks are limited to 4000000 weight units, which, if full of non-segwit transactions, is 1 MB.  

---

