<p>This transaction is not signed. It is not valid and I cannot find it on my testnet node nor on any testnet blockchain explorers. The signature takes up the bulk of the bytes in a transaction, so this is expected behavior.</p>

CC BY-SA 3.0
2018-01-03T20:59:38.450Z
in that case is it possible to calculate signature size somehow and add it up to this transaction size, so we have the final transaction size?
Tailer
CC BY-SA 3.0
2018-01-03T21:09:08.767Z
Yes. The signature will be at most 72 bytes, the public key is either 33 or 65 depending on whether it is compressed (and you will know that if you know the public key). So the entire scriptsig for one input is 72+33+2=107 bytes or 72+65+2=139 bytes. Just add that to the size of the unsigned transaction for each input and you will get a decent estimate of the size of the final, signed transaction.
Ava Chow
CC BY-SA 3.0
2018-01-04T01:26:35.377Z
Not all transactions need to have signatures, to be clear.
Claris
CC BY-SA 3.0
2018-01-03T20:50:53.550Z
2018-01-03T20:55:37.513Z
2018-01-03T20:55:37.513Z
Ava Chow
<p>How does this TestNet bitcoin transaction have 85 bytes? </p>

<p>is this result wrong or it's possible to have input smaller than 148 bytes.</p>

<pre><code>Array
(
    [txid] =&gt; 687fb5d0659ef7e21bd567f9b7677d1847d4cc84839a537ab8da8336101a5ca7
    [hash] =&gt; 687fb5d0659ef7e21bd567f9b7677d1847d4cc84839a537ab8da8336101a5ca7
    [version] =&gt; 2
    [size] =&gt; 85
    [vsize] =&gt; 85
    [locktime] =&gt; 0
    [vin] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [txid] =&gt; 0ac6f42816611c2ed7b31dc38e0dece1eeaf987d1f373bd6e8109430aba826f6
                    [vout] =&gt; 0
                    [scriptSig] =&gt; Array
                        (
                            [asm] =&gt; 
                            [hex] =&gt; 
                        )

                    [sequence] =&gt; 4294967295
                )

        )

    [vout] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [value] =&gt; 0.000708
                    [n] =&gt; 0
                    [scriptPubKey] =&gt; Array
                        (
                            [asm] =&gt; OP_DUP OP_HASH160 c3f01af4ca2ef310c61d2244a22bbbe42739202f OP_EQUALVERIFY OP_CHECKSIG
                            [hex] =&gt; 76a914c3f01af4ca2ef310c61d2244a22bbbe42739202f88ac
                            [reqSigs] =&gt; 1
                            [type] =&gt; pubkeyhash
                            [addresses] =&gt; Array
                                (
                                    [0] =&gt; myNyhGasXAHDoRS58StxuVmRLofCN1kcZ2
                                )

                        )

                )

        )

)
</code></pre>

<transactions>
Input size smaller than 148 byte
Tailer
# Input size smaller than 148 byte

(Asked by: username_0 on 2018-01-03)

How does this TestNet bitcoin transaction have 85 bytes?

is this result wrong or it's possible to have input smaller than 148 bytes.

```
Array
(
    [txid] => 687fb5d0659ef7e21bd567f9b7677d1847d4cc84839a537ab8da8336101a5ca7
    [hash] => 687fb5d0659ef7e21bd567f9b7677d1847d4cc84839a537ab8da8336101a5ca7
    [version] => 2
    [size] => 85
    [vsize] => 85
    [locktime] => 0
    [vin] => Array
        (
            [0] => Array
                (
                    [txid] => 0ac6f42816611c2ed7b31dc38e0dece1eeaf987d1f373bd6e8109430aba826f6
                    [vout] => 0
                    [scriptSig] => Array
                        (
                            [asm] => 
                            [hex] => 
                        )

                    [sequence] => 4294967295
                )

        )

    [vout] => Array
        (
            [0] => Array
                (
                    [value] => 0.000708
                    [n] => 0
                    [scriptPubKey] => Array
                        (
                            [asm] => OP_DUP OP_HASH160 c3f01af4ca2ef310c61d2244a22bbbe42739202f OP_EQUALVERIFY OP_CHECKSIG
                            [hex] => 76a914c3f01af4ca2ef310c61d2244a22bbbe42739202f88ac
                            [reqSigs] => 1
                            [type] => pubkeyhash
                            [addresses] => Array
                                (
                                    [0] => myNyhGasXAHDoRS58StxuVmRLofCN1kcZ2
                                )

                        )

                )

        )

)

```

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2018-01-03. Score: 2 | Accepted answer

This transaction is not signed. It is not valid and I cannot find it on my testnet node nor on any testnet blockchain explorers. The signature takes up the bulk of the bytes in a transaction, so this is expected behavior.

> **Comments:**
> **username_0**: in that case is it possible to calculate signature size somehow and add it up to this transaction size, so we have the final transaction size?  
> **username_1**: Yes. The signature will be at most 72 bytes, the public key is either 33 or 65 depending on whether it is compressed (and you will know that if you know the public key). So the entire scriptsig for one input is 72+33+2=107 bytes or 72+65+2=139 bytes. Just add that to the size of the unsigned transaction for each input and you will get a decent estimate of the size of the final, signed transaction.  
> **username_2**: Not all transactions need to have signatures, to be clear.  

---

