Questions about the mechanics of redeeming a UTXO in an input script.
Questions tagged [transaction-input]
116 questions
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
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
9
votes
2 answers
What is Bitcoin locking and unlocking script?
The locking script on an UTXO and the unlocking script are written in bitcoin scripting language. When a transaction is validated, the unlocking script in each input is executed alongside the corresponding locking script to see if it satisfies the…
user2203937
- 319
- 2
- 9
9
votes
2 answers
Why is the locktime set at transaction level while the sequence is set at input level?
Giacomo Zucco pointed out the oddity of there being one timelock field per transaction, but one sequence per input.
Even for the original use of determining the order of replacement, it would seem that only the maximum sequence is relevant in the…
Murch
- 71,155
- 33
- 180
- 600
8
votes
1 answer
multiple input and output addresses in bitcoin transactions
I was checking transactions in blockchain.info. I have some questions about transaction information about input and output addresses.
block address:
https://blockchain.info/address/1NHv6qBxu6haWj8rqeLqw9eyJqm4JT26R6
why some of transactions have…
Mahla
- 103
- 1
- 1
- 4
8
votes
2 answers
How to retrieve the from and to wallet addresses of a transaction?
Given a transaction's inputs and outputs, I'd like to be able to extract the wallet address (or addresses) which sent the transaction, and also the address/addresses that will receive the transaction.
Which part / field of the input refers to the…
Click Upvote
- 183
- 1
- 6
8
votes
1 answer
Why are transaction input and output indices called `vin` and `vout`?
What does the v in vin and vout stand for? And is it an instance of a more general naming scheme?
Casey Rodarmor
- 524
- 2
- 9
7
votes
2 answers
How OP_EQUALVERIFY works in a standard transaction?
3 weeks ago I began learning about Bitcoins, and now I'm analyzing how it works internally. My problem is that I can't understand what two public key hashes are compare to use de OP_EQUALVERIFY, because I understand that sender's public key is…
Zanetti
- 81
- 1
- 3
7
votes
1 answer
What are the standard formats of transaction outputs?
A transaction output can have the type
Pay to public key hash, P2PKH, where the ScriptPubKey field has the format:
76 a9 14 <20-byte hash of pubkey> 88 ac
Pay to script hash, P2SH, used for e.g. multisig:
a9 14 <20-byte hash of script> 87
There is…
Thorkil Værge
- 1,047
- 8
- 24
7
votes
2 answers
How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?
Now that Electrum 3 supports Bech32 addresses for segwit, when sending coins to a legacy address are fees higher or cheaper?
Patoshi パトシ
- 10,956
- 18
- 80
- 151
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
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
5
votes
2 answers
Can signature be re-used to cash out everything in the address?
I Know for the P2PK locking script it was like this
[pubkey]
and then an unlocking script is provided as simple as this:
[sig]
But if it works like this, others can simply grab the [sig] and cash out everything in your address!
Is…
gudako
- 159
- 6
5
votes
1 answer
Maximum number of inputs per transaction
In theory, what is the maximum number of inputs per transaction? Is it defined primarily by the maximum number we can store on the 9 byte varint?
How big of a number can be stored on 9 bytes?
Would such a transaction even fit in a block if it had…
Pedro
- 385
- 2
- 9
5
votes
1 answer
Are all UTXOs locked by an address spent in a transaction?
Imagine I have 2 UTXOs locked by my address, each of which allows me to spend 5 bitcoins.
If I subsequently want to send just 2 bitcoins to someone else, will both UTXOs be used as inputs in the transaction, where I now receive 8 BTC change as a…
Simon O'Hanlon
- 155
- 4