Questions tagged [transaction-input]

Questions about the mechanics of redeeming a UTXO in an input script.

Filter by
Sorted by
Tagged with
0
votes
2answers
59 views

How to get input address and amount from vin using bitcoin core rpc

I am trying to find details of every transaction using bitcoin core rpc. First, I using bitcoin-cli getblock to get the block data, then use bitcoin-cli getrawtransaction to get the transaction ...
1
vote
1answer
35 views

What does is mean to have input from multiple wallet addresses?

I've trying to parse some data from the blockchain as provided by blockchain.info My question is about transactions that have multiple inputs like this one: https://www.blockchain.com/btc/tx/...
0
votes
1answer
31 views

OP_EQUAL not working properly

I went to https://siminchen.github.io/bitcoinIDE/build/editor.html to try some bitcoin scripting and I wrote this script: <1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU> OP_HASH160 <...
0
votes
1answer
41 views

How to manually sign a transaction with multiple inputs and multiple outputs?

I'm developing transaction constructor, but i faced several problems. To some of which i found answer in How to sign a transaction with multiple inputs?, for the rest i'll try to explain: When we ...
1
vote
2answers
105 views

What’s the purpose of checking for input overflow?

Everyone knows this famous fix for block 74638 which still exists in other files. But there’s something I can’t understand, why check for inputs overflow since it’s not possible to have enough utxo ...
3
votes
1answer
165 views

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 ...
4
votes
1answer
124 views

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 ...
2
votes
2answers
258 views

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?
0
votes
2answers
39 views

Reference an UTXO of a transaction that has not been yet mined

How to reference an UTXO that has not been yet mined? I want to prepare a transaction and, before spreading it, use its UTXO as input for another relative timelocked transaction. Then, spread the ...
1
vote
1answer
168 views

bitcoinj java library not decoding input addresses for some transactions

I'm trying to "extract" sender's addresses from OP_RETURN Bitcoin transactions, but my code is not working properly. getWalletAddressOfSender(final Transaction tx) public static Address ...
-1
votes
1answer
57 views

How do these inputs/outputs make sense for this transaction?

Using coinbase, I transferred $1 in BCH to my friends BCH address. Now I am studying the transaction on a blockchain explorer as a learning exercise. See here: https://blockchair.com/bitcoin-cash/...
0
votes
1answer
162 views

Why are the inputs of Bitcoin transactions signed?

This is my understanding of what a transaction looks like: inputs: input0: txid: <funding tx0 TXID> outputID: <output ID of UTXO in the funding tx0> scriptSig: <...
1
vote
0answers
30 views

What to pass in Transaction Input using Bitcoinj library

URGENT - Need help with setting up Transaction Input and Output objects Transaction rawTransaction = new Transaction(params); txnAmount = Coin.valueOf(50000000); rawTransaction.addOutput(txnAmount, ...
1
vote
2answers
49 views

How many weight units does an input use?

What is the weight unit cost of an input? And can you batch/aggregate the inputs or is it linearly growth when you add more inputs to a tx?
0
votes
1answer
49 views

Which values are GetValueIn() and GetValueOut() calculate?

In Transaction.cpp, there is a function CAmount CTransaction::GetValueOut() const. In Coins.cpp, there is a function CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const. My ...
1
vote
1answer
177 views

what does it mean when a transaction contain multiple inputs?

Just like https://www.blockchain.com/btc/tx/230636ab4f285ca5e9f4c32dbae581c10d491a99493d8733c594af780f1edc5e what does it mean when a transaction contain multiple inputs? as i know, an transaction ...
2
votes
1answer
56 views

How does fee split between senders in a transaction?

I know how fee is calculated in a transaction, but I don't know how this fee amount split into senders. For example, consider the following transaction with 0 BTC miner fee: inputs: Alice ...
0
votes
1answer
114 views

Sign Bitcoin transaction with several inputs using bitcoinj. Broadcasting of transaction failed

Good day! I'm working with low level API to make tx and sign it offline. But after all preparations I try to broadcast it and than i get an error from network: 16: mandatory-script-verify-flag-...
2
votes
2answers
132 views

If I reuse the same address can a previously used transaction be reused?

I was wondering, if I used an address adr0 to spend some coins in a transaction tx0 that give the coins to a different address adr1, and eventually, after some time, I receive some (completely ...
0
votes
1answer
94 views

How get outpoint from txIn

I'm from Ukraine and do not know much English, sorry. I'm not understand where in transaction keep outpoint. Please give me example or manual how get outpoint from input.
0
votes
2answers
420 views

How get address from ScriptSig: PUSHDATA(N)?

I'm from Ukraine and do not know much English, sorry. I want to parse blockchain, but I have problems. In block 728 will first txs (user-user). But input-script have not public keys. I read this ...
1
vote
1answer
69 views

How to read a transaction from a block? Who paid whom?

I'd like to know how to read a 'transaction', so if we take an example of this transaction (which comes from block #520156) it's easy to spot that 'th' paid 'U8' 0.005BTC and '9E' paid 'Y5' 0.013BTC. ...
3
votes
1answer
4k views

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/...
1
vote
2answers
61 views

how to use multiple time specific address in input scripts with difference balances?

look at to the following transaction (withdraw transaction from binance) https://blockchain.info/tx/404fd22d3d88d129975d03fe2993f0126db8f066b3d8126d6cca676747439515?show_adv=true How in input scripts ...
0
votes
1answer
43 views

Could someone explain how the TX operation here works?

I know this is a BCH address, but it's the best example I could find. The same concept holds for BTC, so understanding what's going on is relevant. https://explorer.bitcoin.com/bch/tx/...
1
vote
1answer
61 views

How are 'excessive' numbers of inputs and outputs handled in bitcoin transactions?

I wrote a bitcoin transaction parser in python and it flips out when transactions have more than 255 inputs or outputs. Some transactions have their number of inputs/outputs represented by a 1 byte ...
0
votes
1answer
261 views

Unable to decode input address

It seems that some transactions, although having "prev_out" field in their "inputs", does not have "addr" in the "prev_out", i.e. they do not have input address. What is this kind of transactions for? ...
0
votes
1answer
722 views

what happens to UTXOs when a transaction output script is satisfied?

As per my understanding from the book "Mastering bitcoin", a transaction output contains three things Amount - Bitcoin Value in Satoshis Locking-Script-Size - Locking-Script length in bytes, to ...
0
votes
1answer
103 views

Is there a way to get all addresses from an Wallet?

If I was to search the blockchain for address X, then I see that it has two inputs in a transaction, X and Y. I can safely assume that X and Y are owned by the same person? Now if I look at all of ...
1
vote
1answer
102 views

Does input and output size vary by address type?

For instance, we have two outputs, output X sends to a P2SH address, and output Z sends to a P2PKH address. Would output X have a different transaction size than output Z? What about the size of the ...
3
votes
2answers
183 views

Why do we refer to previous transactions in each transaction?

Isn't it enough to just have the Input Address, Output Address, Amount and Signature for each transaction?
0
votes
1answer
274 views

How to calculate scriptPubkey?

Given an address (i.e. 1BnPVV5Tt25cxbDg6DqoxJunjSL8reCGz6), how can I calculate its scriptPubKey in order to build a transaction?
1
vote
2answers
401 views

Can you specify more than one output index in a transaction's input?

It looks to me like each input to a bitcoin transaction has an index that specifies only one output from the input its spending. Is there a way to specify more than one output index, or do you have to ...
0
votes
2answers
101 views

Does using different addresses affect subsequent transaction size, given the same number of inputs?

I'm quite confused about the input count that affect the transaction size, example: x1 = my receive btc address x2 = my another receive btc address x3 = my another receive btc address Scenario A ...
2
votes
1answer
442 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 ...
1
vote
2answers
366 views

Do i need to sign each input in a raw transaction?

I've been reading up about raw transactions on bitcoin.org and there are two examples Simple and Complex. What I can't tell from the information provided is if it necessary to sign each of the inputs ...
0
votes
2answers
704 views

Sign transaction with multiple inputs using bitcoinj/peercoinj libraries

Good day for everyone! I have some troubles with adding signed Input to the transaction. Currently, I'm working with altCoin (fork peercoin) currency. I'm trying build the transaction in the ...
6
votes
2answers
1k views

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?
2
votes
1answer
2k views

What happens when two transactions send to the same address?

I would like to know the consequences of sending bitcoin several times to the same address. Let us say I send 1 BTC from Address1 to Address3 and later I send 2 BTC from Address2 to Address3 again. ...
3
votes
1answer
112 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/...
1
vote
1answer
115 views

Processing multiple transactions very fast

Let's say I run an automated script, with the main purpose to send transactions as fast as possible. I want to send one transaction with 5 BTC to one address and a transaction with 2 BTC to another. ...
1
vote
1answer
495 views

Submitted a raw tx that was already on the blockchain, to test it. I got 'missing inputs' instead of 'already exists'. Why?

In an attempt to more fully understand raw transactions etc, I went to look at tx 518c41d5e59114f6a23383afbe95f02cdd09cb50cabd8390bdd9162a890435b3 in its raw form being: ...
1
vote
1answer
385 views

How much does the weight of 2-of-3 multisignature inputs change between P2SH and P2SH-P2WSH?

I'm trying to calculate the weight of a 2-of-3 multisignature P2SH-P2WSH input. I found the related question Predict multi signature transaction size, which I've calculated out with m=2, n=3 here: ...
4
votes
1answer
344 views

SegWit and previous hash: txid or wtxid, or either?

With segwit there will be two transaction ids wtxid and txid Can either one of them be used as previous hash or only txid?
1
vote
1answer
215 views

How to get address from CTxIn object

I'm reading bitcoin core source code. I want to know how to get bitcoin address from CTxIn object. I have a CTransaction object. I found the way how to get addresses from vout like the following. But ...
0
votes
1answer
1k views

Determine inputs/outputs of a transaction before sending

I am attempting to build a working withdrawal system where users can withdraw funds in BTC. I am required to estimate the fee before allowing them to withdraw to include it in their payment. I was ...
2
votes
1answer
52 views

What would be the implications of limiting Bitcoin transactions to fifty inputs?

One of the issues of increasing the blocksize is the possibility of creating attackblocks which would take significantly longer to parse than the common block. The mechanism to do so is by creating a ...
2
votes
1answer
135 views

What is the point of including the scriptCode of the input in the transaction digest of segwit?

BIP143 specifies "a new transaction digest algorithm". scriptCode of the input (serialized as scripts inside CTxOuts) What problems could arise if the scriptCode of the input were not ...
0
votes
1answer
239 views

Is there a way to get the address of associated with a transaction input with bitcoinj?

If I was not mistaken, with transactioninput.getConnectedOutput(), the output which is used for the input is obtained. But what to do later? There seem to be two relevant methods: ...
0
votes
1answer
70 views

Are there other ways to have more than one address involved in a SINGLE transaction input or a SINGLE transaction output?

Full question: Except for the case of multisignature, are there other ways to have more than one address involved in a SINGLE transaction input or a SINGLE transaction output?