Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
user380208's user avatar
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 ...
cainy393's user avatar
  • 251
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 ...
KalenGi's user avatar
  • 213
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?
Casey Rodarmor's user avatar
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. ...
Click Upvote's user avatar
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?
Murch's user avatar
  • 72.6k
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. ...
Thorkil Værge's user avatar
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? ...
mshomali's user avatar
  • 163
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 ...
sizzlecookie's user avatar
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....
Mars Lee's user avatar
  • 173
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 ...
jiamijiang's user avatar
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",...
lxgr's user avatar
  • 281
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....
dentaku's user avatar
  • 53
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 ...
Eimrine's user avatar
  • 95
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....
mrp's user avatar
  • 215
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 ...
UTF-8's user avatar
  • 3,224
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 ...
user avatar
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?
knaperek's user avatar
  • 1,424
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, ...
stall man's user avatar
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 ...
bvpx's user avatar
  • 1,132
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 ...
jgm's user avatar
  • 758
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?
Murch's user avatar
  • 72.6k
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 ...
torstack45's user avatar
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?
Darius's user avatar
  • 779
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 ...
Piero's user avatar
  • 33
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/...
Nucklear's user avatar
  • 163
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/...
YVGorshkov's user avatar
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 ...
Lev's user avatar
  • 65
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 ...
igobivo's user avatar
  • 147
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, ...
Ugam Kamat's user avatar
  • 7,348
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 ...
S. C.'s user avatar
  • 21
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. "...
MikiBelavista's user avatar
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? ...
Goel77's user avatar
  • 23
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 ...
Peter's user avatar
  • 115
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:...
zigak's user avatar
  • 21
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/...
h__'s user avatar
  • 433
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 ...
Doug Peters's user avatar
  • 1,366
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. ...
Michael Hamilton's user avatar
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 ...
zaabson's user avatar
  • 21
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 ...
Ahia Cohen's user avatar
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 ...
Arsenius's user avatar
  • 239
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 ...
Samir Sadek's user avatar
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 ...
anne1234's user avatar
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 ...
iasonas ladias's user avatar
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 ...
d3llafr33's user avatar
  • 123
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 ...
Albert Renshaw's user avatar
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?
Errol's user avatar
  • 117
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 ...
Harry Pillsbury's user avatar
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 ...
Chiru's user avatar
  • 141
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 ...
Basj's user avatar
  • 354