user114644: Related to post Murch Explanation of Segwit Tx Fee Rate he breaks a TX down into:

TxHeader
TxInput
TxOutput

To calculate the weight and the final virtual size of a transaction (P2PKH,P2WPKH,P2SH-P2WPKH)
My question relates to what is the TxHeader in detail. I haven't heard about this classification in any articles.

user114644: When I look at the following Transaction Description Transactions I see the following distinction so I conclude:
TxHeader:




Field
Size (in bytes)




Version no
4


Flag
2 (optional only for segwit v0 right now)


In-counter
1 - 9 bytes (varint)


Out-counter
1 - 9 bytes (varint)


lock_time
4 bytes




TxInput:




Field
Size (in bytes)




list of inputs
(in-counter)-many inputs




TxOutput:




Field
Size (in bytes)




list of inputs
(out-counter)-many inputs




114644: <p>Related to post <a href="https://bitcoin.stackexchange.com/questions/84004/how-do-virtual-size-stripped-size-and-raw-size-compare-between-legacy-address-f">Murch Explanation of Segwit Tx Fee Rate</a> he breaks a TX down into:</p>
<ul>
<li>TxHeader</li>
<li>TxInput</li>
<li>TxOutput</li>
</ul>
<p>To calculate the weight and the final virtual size of a transaction (P2PKH,P2WPKH,P2SH-P2WPKH)</p>
<p>My question relates to what is the TxHeader in detail. I haven't heard about this classification in any articles.</p>
 114644: <p>When I look at the following Transaction Description <a href="https://en.bitcoin.it/wiki/Transaction" rel="nofollow noreferrer">Transactions</a> I see the following distinction so I conclude:</p>
<p>TxHeader:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Field</th>
<th style="text-align: left;">Size (in bytes)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Version no</td>
<td style="text-align: left;">4</td>
</tr>
<tr>
<td style="text-align: left;">Flag</td>
<td style="text-align: left;">2 (optional only for segwit v0 right now)</td>
</tr>
<tr>
<td style="text-align: left;">In-counter</td>
<td style="text-align: left;">1 - 9 bytes (varint)</td>
</tr>
<tr>
<td style="text-align: left;">Out-counter</td>
<td style="text-align: left;">1 - 9 bytes (varint)</td>
</tr>
<tr>
<td style="text-align: left;">lock_time</td>
<td style="text-align: left;">4 bytes</td>
</tr>
</tbody>
</table>
</div>
<p>TxInput:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Field</th>
<th style="text-align: left;">Size (in bytes)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">list of inputs</td>
<td style="text-align: left;">(in-counter)-many inputs</td>
</tr>
</tbody>
</table>
</div>
<p>TxOutput:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Field</th>
<th style="text-align: left;">Size (in bytes)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">list of inputs</td>
<td style="text-align: left;">(out-counter)-many inputs</td>
</tr>
</tbody>
</table>
</div>