Questions tagged [transaction-weight]
51 questions
66
votes
3 answers
How to calculate transaction size before sending (Legacy Non-Segwit - P2PKH/P2SH)
I know that I pay the transaction fee per kB, so how can I calculate how large the transaction will be before I send it via the RPC api. I run a site using bitcoins, and I cannot let the user's balance go negative, so I need to know if they have…
macintosh264
- 761
- 1
- 6
- 3
21
votes
2 answers
Is there a difference between bytes and virtual bytes (vbytes)?
In an Optech newsletter, size is referred to using vbytes. Is there a difference between vbytes and bytes? If so, what is the difference?
AdaptiveAnalysis
- 659
- 4
- 10
15
votes
3 answers
What is the maximum number of inputs/outputs a transaction can have?
Is there a maximum recommended number of inputs/outputs for each transaction? I was scripting a faucet and wasn't sure whether to payout in one transaction to all addresses or split them into groups of say 100 or 1000.
cainy393
- 251
- 2
- 3
10
votes
3 answers
How is the size of a bitcoin transaction calculated
From what I understand, the fees set on bitcoin transaction are based on a recommended fee (mostly, from a 3rd party service) per byte of the transaction size. What I am curious about is how do wallets arrive at the size of a transaction?
Skelli
- 217
- 2
- 8
10
votes
2 answers
How do virtual size, stripped size and raw size compare between legacy address formats and native segwit?
This answer states that SegWit doesn't reduce transaction size. If this is true, why is it cheaper to send a SegWit transaction?
ecurrencyhodler
- 188
- 1
- 9
8
votes
3 answers
Benefits of Bech32 addresses?
In Bitcoin core, when generating a new address for receiving a payment, you get this dialogue:
There is a tick-box for "Generate Bech32 address".
I understand that this is a relatively new feature not yet supported by all wallets. The tooltip help…
RedGrittyBrick
- 24,039
- 3
- 23
- 47
8
votes
2 answers
How does SegWit reduce transaction size, when the signature is simply moved to another part of the transaction?
This video explains that the signature is moved out of the input section and moved to the new one called the witness. From what I can tell, the witness signature is still contained in this transaction - how would a simple reordering of information…
robinnnnn
- 183
- 4
8
votes
2 answers
What is the size of different Bitcoin transaction types?
I found this interesting take on Bitcoin transaction type trends from 2015.
As that article is from 2 years ago, I am wondering:
a. Are there any newer transaction types?
b. What is the average size of each of these transactions?
c. Is there a…
Nona Shah
- 101
- 4
8
votes
1 answer
What is signature grinding?
What is signature grinding and why does the answer to What is the size and weight of a wrapped segwit single-sig input? "highly recommend it"?
Murch
- 71,155
- 33
- 180
- 600
7
votes
1 answer
How big is the input of a P2PKH transaction?
How many bytes does a P2PKH input have? I'm finding a few different numbers:
Why does the default miner implementation use pay-to-pubkey? states:
push + sig + push + key = 1 + 72 + 1 + 61 = 139
Princeton Bitcoin Book states [p.123]:
The…
Murch
- 71,155
- 33
- 180
- 600
7
votes
1 answer
How much blockspace would it take to spend the complete UTXO set?
I was curious how much blockspace has already been spoken for in the future. Paraphrased:
Assuming all block space were used to consolidate the UTXO set in the most efficient manner (and all key holders were collaborating for this purpose). How many…
Murch
- 71,155
- 33
- 180
- 600
6
votes
1 answer
What are the minimum sizes for transactions and blocks in Bitcoin?
I have gone through many research articles but couldn't find out what the minimum sizes of a transaction and a block are.
Is there any reference where I can find an answer to my question?
DOLLY PATWA
- 585
- 2
- 9
- 16
6
votes
1 answer
Why does BIP141 define both virtual transaction size and weight?
Why does BIP 141 (segwit) define both virtual transaction size and weight?
Weight seems to be just four times virtual transaction size (or vice versa, depending on what you define first). Why are both needed?
Karel Bílek
- 2,655
- 3
- 24
- 45
6
votes
1 answer
Is there an economic incentive to switch from P2WPKH to P2TR?
I have multiple times seen people argue that there is “no economic incentive” to switch from P2WPKH to P2TR. I know that the sum of input and output weight on P2WPKH and P2TR are very similar, but how does that actually work out in detail?
Murch
- 71,155
- 33
- 180
- 600
5
votes
1 answer
What are the sizes of single-sig and 2-of-3 multisig taproot inputs?
There was a Twitter discussion about the sizes of inputs and Taproot came up. What are the input sizes for Taproot inputs?
Please cover both the key path spend (single-sig or default spend) and 2-of-3 multisig script path spends.
Murch
- 71,155
- 33
- 180
- 600