Questions tagged [output]
The output tag has no usage guidance.
110
questions
30
votes
1
answer
28k
views
What is P2PK, P2PKH, P2SH, P2WPKH - ELI5
Explain like I'm 5 years old and my other half of the brain is surgically removed :) I don't want to put a lot of stress on my brain
Also what is the difference between BTC held in P2SH and Unspent ...
15
votes
3
answers
8k
views
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 ...
11
votes
3
answers
6k
views
How would you end up with more than two transaction outputs?
I saw a Bitcoin transaction that has 6 inputs and 4 outputs. I understand that several inputs are sometimes used in order to meet the amount requirements of the output. As a result you have two ...
8
votes
1
answer
682
views
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?
8
votes
2
answers
3k
views
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.
...
7
votes
1
answer
412
views
Will cross-input signature aggregation need a new output type?
If cross-input signature aggregation were to get implemented in a subsequent soft fork after Taproot's activation, would its use require a new output type?
7
votes
1
answer
831
views
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. ...
6
votes
2
answers
2k
views
What is this unusual transaction in the Bitcoin blockchain?
I found a transaction in the Bitcoin blockchain. The first output is unspent and has an abnormal Pkscript. What is this output and why does this output address have no transaction and balance on it?
...
5
votes
2
answers
385
views
what's the point of "n" in "vout"? getrawtransaction
It seems like "n" is the index, is that true? If that is the case, why is the "n" key necessary?
Example:
bitcoin-cli getrawtransaction ...
5
votes
2
answers
1k
views
Why does vout sometimes not have address?
I am trying to parse all transactions.
I found that some transactions do not have addresses in their vout.
There are two situations that vout does not have addresses.
The first one is the miner reward....
5
votes
4
answers
811
views
Why is little endian used in transaction formatting and other parts of bitcoin?
I've noticed just from studying the raw hex values of transactions that many components are formatted in hexidecimal little endian.
For example, the amount specified in an output will be formatted as ...
5
votes
2
answers
1k
views
Can an output be spent in the block in which it is contained?
Is a Bitcoin block containing both a transaction that funds an output, and another transaction that immediately spends the same output, allowed by the protocol?
Does such behavior occur "in the wild",...
5
votes
1
answer
860
views
Will all UTXOs eventually be worth 1 Satoshi?
If I want to spend 0.4BTC and I only have a UTXO for 1.0BTC, I will send 0.4BTC to the seller's address and 0.6BTC to my address. The seller has one UTXO and I have the other.
One UTXO has become two....
5
votes
2
answers
427
views
Is it possible to write a transaction of bitcoins, having only pen, paper and a private key from the address with some unspent outputs?
In my last answer I have done an allegation which I want to be proven or disproven. If this work possible, how much paper does it require? What kind of software needs Bob to send a transaction to ...
5
votes
1
answer
1k
views
Why do some outputs have a zero value and no address?
What does it mean when an output has a value of zero and no address? I'm looking at some fairly recent transactions, and I don't understand what this means. Here's an example: https://blockchain....
5
votes
4
answers
180
views
Is it possible to make an output only spendable to a specific address?
Basically, the entire question fits into the title. Does the Bitcoin scripting language allow for a transaction output to only be spendable to a specific address? Is it possible to forbid all other ...
4
votes
2
answers
1k
views
Why are segwit transactions cheaper than legacy transactions?
What's the reason to make fees for segwit addresses lower, while keeping legacy addresses with higher fees? --
I'm interested in both, why segwit transactions are cheaper than legacy addresses, and ...
4
votes
1
answer
1k
views
Are transactions containing zero-value output accepted by miners?
Would miners generally accept a transaction that has one of its output values set to zero? Can the acceptance in this case depend also on the scriptPubKey associated with the zeroed output?
4
votes
1
answer
644
views
What does the index of an UTXO stand for?
For example, here is the output of an API I hit with one of my testnet UTXOs. What is the meaning of the index field in this context ?
"utxo":[
{
"block_id":1899516,
...
4
votes
1
answer
516
views
Why are transactions with no outputs not relayed by default?
I was reading this thread about making a transaction without an output:
Are Bitcoin transactions permitted to have no outputs (i.e. all inputs become transaction fee)?
The answer is that outputs ...
4
votes
1
answer
193
views
Can a transaction have more than one recipient?
I am quite new to Bitcoin. I have a doubt.
Let's say I, person A, have 1 bitcoin. I want to send 0.5 BTC to person B and 0.5 BTC to person C in a single transaction. Is it possible to do so within ...
4
votes
1
answer
287
views
Why is a 20 byte hash acceptable in p2wpkh but p2wsh needs 32 bytes?
Why is it acceptable to use a 20 byte hash to represent single-sig witness programs whereas a 32 byte hash is used for pay to witness script hash?
3
votes
1
answer
434
views
How do they put several bitcoins into a block?
I recently read that there is an auction to sell almost 24,000 bitcoins, and that they have put them in blocks, each containing 2000 coins. What does that mean to put 2000 BTCs in a block? Can ...
3
votes
1
answer
166
views
Can a coinbase transaction have a segwit output?
And more generally speaking, are there any restrictions on the output of a coinbase transaction?
3
votes
1
answer
155
views
At most two outputs according to Bitcoin whitepaper. Multiple outputs in real transactions. How come?
The original Bitcoin whitepaper mentions that there can be at most two outputs:
Normally there will be either a single input from a larger previous
transaction or multiple inputs combining ...
3
votes
1
answer
203
views
Understanding transaction with hundreds of inputs and outputs
I've been trying to follow a transaction with hundreds of inputs from different addresses and hundreds of outputs.
This is the transaction I'm looking into:
https://www.blockchain.com/explorer/...
3
votes
1
answer
142
views
How come that there can be many transfers in a single Bitcoin transaction?
In Ethereum one transfer has one transaction ID. How come there can be many transfers in a single Bitcoin transaction? For example, in this transaction:
https://blockchain.info/tx/...
3
votes
1
answer
159
views
How to identify a transaction input type?
I am currently working on a tool parsing every transaction of the bitcoin blockchain, using the getrawtransaction RPC call in verbose mode.
My goal is to store them all in a database, while keeping ...
3
votes
1
answer
71
views
Can you have a transaction without a change output?
While reading about the fees here https://metamug.com/article/security/bitcoin-transaction-fee-satoshi-per-byte.html
The article said that "In the simplest case, you'll have one input and two ...
3
votes
2
answers
232
views
Why is the value field 8 bytes in transaction output when it can be achieved with 7 bytes?
Bitcoin uses a 8 bytes value field in the transaction output. However, the total supply of bitcoin is capped at 21M. Theoretically, even if all the 21M bitcoins are transferred to a single address, ...
2
votes
2
answers
2k
views
What exactly is the "vout" field?
This is driving me nuts. Through trial-and-error, asking numerous people and attempting to read endless articles and manuals, I've come to the conclusion that the "transactions" listed by ...
2
votes
2
answers
784
views
What are the hashes in Unspent outputs?
I am a newbie to Bitcoin.
Looking at
curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK
I guess that the script is the owner's address.I am not sure about this.
"...
2
votes
3
answers
209
views
Multi input transaction heuristic
I was revising for my upcoming exam and came across this slide, which I don't completely understand as I find it a bit confusing. Can someone please explain what the lecturer was trying to point out?
...
2
votes
1
answer
112
views
How come an `OP_3` P2SH redeem script is spendable?
I completed a round trip transaction with the redeem script hash: 31vFvEkyAb2iusbPip36H9rVt6pxExuaVR, whose redeem script is OP_3 (0x53) (yes I know not secure).
I can understand OP_1 redeem script ...
2
votes
1
answer
582
views
How can I get the destination address from raw transaction data?
I am writing a program that reads Bitcoin transactions from .blk files and performs some analysis on them. I would like to get the transaction destination addresses (like in some transaction explorers:...
2
votes
1
answer
1k
views
Parse UTXO of a transaction from chainstate
I'm doing some analysis on the UTXO set by reading from the chainstate database.
I was following the documents given by https://github.com/bitcoin/bitcoin/blob/...
2
votes
1
answer
144
views
Do all transactions have at least one output that contains at least one bitcoin address
Do all transactions that are included in a valid block have to have at least one bitcoin address as part of their outputs (vout)?
I found this to be similar: Are Bitcoin transactions permitted to ...
2
votes
1
answer
77
views
Estimating virtual bytes of a transaction seems circular
I'm sorry if this has been answered before, but I haven't found anyone really bring this up.
I am trying to construct a PSBT, which assumes a fixed feerate and a fixed amount to send to some address. ...
2
votes
1
answer
273
views
Refer to UTXO by output index or output full address in blockchain?
I'm writing my own simple crypto and wondering whether input in a transaction should refer to unspend output only by it's TXID and vout (index in outputs vector in a transaction) OR by it's TXID and ...
2
votes
1
answer
597
views
Can a low fee unconfirmed transaction prevent confirmations of following transactions?
To be more precise, consider the following situation:
Address A gets an input of 4 BTC.
You try to make a transaction from A to B with 1 BTC and a very low fee, which means its unconfirmed for a long ...
2
votes
3
answers
1k
views
Bitcoin transaction with dust output stuck
I made this transaction more than 24 hours ago, and it still has no confirmations at all.
What should I do? This transaction was created by the mobile Blockchain.info wallet. At the time, it didn't ...
2
votes
1
answer
166
views
Retrieve all Unspend Output given a priv key
Is it possible to retrieve all Unspend Output transaction given the private key?
I have noticed that different wallet give me different balance for the same Private Key. For instance, Atom and BitPay ...
2
votes
1
answer
182
views
Transaction parsing - Satoshi value
how exactly is the satoshi value in a raw transaction calculated to decimal? Because on blockchain.info, I cannot figure out how they parse the raw transaction from that value to the JSON result. I ...
2
votes
0
answers
125
views
Address final balance is 0 after receiving 0.003 BTC
I generated a new BTC address (address A). I tried to send 0.003 BTC to address A. After sending them from my coinnomi wallet, the balance of address A remains 0 and from output seems that 0.003 BTC ...
2
votes
2
answers
838
views
How to track the bitcoins I spent?
I'm studyng the transactions and how they work.
Suppose I would track some bitcoins that I spent.
This is a scenario:
My pubblic addresses are: addr1 and addr2.
I made a transaction tr1 (output like ...
1
vote
1
answer
143
views
Transaction Output Order
Suppose I generate a transaction with 5 outputs.
Is there a deterministic way to know how the outputs will be ordered on chain (their .n values) or will they simply appear in the order in which I ...
1
vote
1
answer
433
views
How to find out the requirements for spending an output script?
How do you find out the requirements to spend an output script?
Do you decode the hash?
1
vote
2
answers
133
views
Can unspent outputs only get smaller?
It seems that when transactions occur the outputs only get smaller and are never aggregated. There is no apparent way to combine multiple outputs into a single output. The problem I see with this is ...
1
vote
1
answer
30
views
How is the input and output fields serialised in a transaction?
I'm trying to write a parsing function to find the input and output fields in a serialised transaction.
My problem is that I can find the number of inputs and outputs using the varint byte(s), but not ...
1
vote
1
answer
308
views
How does Bitcoin know if enough BTC are available for an account to allow a transaction?
Let's consider this simplified blockchain:
BLOCK 108
address ddd111 received 2 BTC by mining block 108
BLOCK 109
address abc123 received 2 BTC by mining block 109
BLOCK 110
address xyz999 created ...