Questions tagged [raw-transaction]

This tag should be used for questions related to raw transactions, bitcoin transactions that have been serialized for network transmission.

Filter by
Sorted by
Tagged with
41 votes
1 answer
5k views

My raw transaction destroyed 0.0284377 BTC. What did I do wrong?

Years ago I designed a .NET module which facilitates the transmission of BTC to my customers. It creates a binary representation of the desired transaction based on the material presented here and ...
31 votes
2 answers
24k views

Redeeming a raw transaction step by step example required

I am looking, specifically, for a step by step example transaction of sending Bitcoin which uses an actual transaction (How To Redeem A Basic Txn, from a few years back, does a great job of outlining ...
17 votes
3 answers
7k views

How to sign a transaction with multiple inputs?

I have been able to program an application in python that sends valid transactions that spend 1 input, but I really can't get it to work with 2 or more inputs. So my question is, how exactly is the ...
11 votes
2 answers
1k views

How do I spend bitcoins from multiple wallets in a single transaction?

Using, e.g., the Bitcoin Core command line, how could I spend bitcoins from multiple wallets in a single transaction? This comment says: instead of sending the transaction to the network, you send ...
  • 4,449
10 votes
1 answer
3k views

What does a segregated witness transaction look like?

I'd like to learn how segregated witness works, and I thought the raw transaction data would be a good place to start If this is the structure of current transactions: version | [inputcount] {[txid] ...
  • 2,858
9 votes
3 answers
15k views

Is it possible to create a transaction in pure python without needing to run bitcoin locally?

Lets say I have a bitcoin address that has 10 BTC sent to it. I also have the private key for this address Using Python (2 or 3) is there a way to create a signed transaction (which I believe is a ...
  • 301
9 votes
4 answers
3k views

Is there a user-friendly tool for creating and signing raw transactions?

The title stands for itself. The only tool for doing so I know of is the bitcoind daemon, but it is for from user-friendly. A web-tool in JS would be ideal or a simple CLI tool with clear ...
  • 11.4k
9 votes
3 answers
3k views

Can an unconfirmed transaction that only Blockchain.info shows be manually re-broadcast?

Blockchain.info shows a transaction that was created by Blockchain.info/wallet but for whatever reason the transaction didn't confirm right away and appears to not be getting re-broadcast (perhaps ...
8 votes
3 answers
2k views

How to extract addresses from input in raw transaction

I need help to get input addresses from "vin" in offline mode. I don't know how https://live.blockcypher.com/btc/decodetx/ is doing it. Example raw transaction: txn id : ...
  • 105
7 votes
2 answers
2k views

HTLC (Hash Time Lock Contract) using bitcoin-qt

Is it possible to manually create a HTLC using the bitcoin-qt command line? I know how to manually creating createrawtransaction/sendrawtransaction using the bitcoin-qt clients command line, and ...
7 votes
1 answer
3k views

What are the hex and asm field values in the JSON decoded from a raw transactions?

I used the command line bitcoin-cli decoderawtransaction <hex-value> and got back a JSON output (see below). However, I noticed there are hex and asm fields that are themselves hex values (at ...
7 votes
1 answer
4k views

How to sign raw transaction given a private key and SHA hash (in java)

I have followed the instructions here to build my own bitcoin transaction. Redeeming a raw transaction step by step example required Currently my code can create a transaction and compute the SHA ...
  • 73
7 votes
1 answer
686 views

Can I send almost 1MB transaction?

Block size is still limited to 1MB. As I understood, transaction size is no longer limited. So can I be sure that my transaction with 29000 outputs and reliable fee will be included into block? Or ...
7 votes
1 answer
7k views

How to decode raw tx hex programmatically

createrawtransaction(...) in testnet returns this hex: ...
  • 1,366
7 votes
3 answers
4k views

Reading Bitcoin Raw Transaction

I want to understand Bitcoin data structure. So i try to understand a raw transaction in json format. When i checked the blockchain.info API documentation, i see that input structure is defined for ...
6 votes
2 answers
1k views

OP_RETURN data transaction

Looking at Dev Update #5 and in particular the OP_RETURN data function due to be included in 0.9 release, how is data returned during the transaction? Am I meant to create a new txout with no value ...
  • 163
6 votes
2 answers
286 views

Double spend transactions flag the node as "bad"?

I'm playing with raw transactions. It's easy to send two signed valid transactions at the same time from the same output to different addresses (making a double-spend attack). My doubt is: if I make ...
  • 1,678
6 votes
2 answers
6k views

How to do mass payouts in my application to multiple addresses at once, or very quickly?

Let's say it's pay day--I've accumulated a lot of bitcoins, and sent them all to a single address. I now want to pay a lot of addresses from this "pool" of coins, say anywhere between 100 and 10,000 ...
  • 201
6 votes
1 answer
986 views

How would this normal raw transaction appear if it was a raw segwit transaction?

How would this raw bitcoin transaction appear if it was a raw segwit transaction? https://blockchain.info/tx/ff8766ec873ff55cc0ac17dee7b379a4efa2a5c83dabdd9a30287c7761ad55d5 This TX Raw is: ...
  • 1,416
6 votes
2 answers
230 views

To combine or not to combine

If I have to make 10 payments of various amounts to different recipients: What is the best approach for the lowest tx fee? One transaction that will serve many (or all) logical payments (many inputs ...
  • 1,366
6 votes
1 answer
1k views

What is the exact difference between a Bitcoin and Bitcoin Cash raw transaction to address sighash_forkid?

Bitcoin Cash apparently uses sighash_forkid, such that if you don't implement that into your raw transactions, the bitcoin cash network won't accept it. How would one need to alter (what to add and ...
  • 1,416
6 votes
1 answer
630 views

How to sign non-standard transaction

Consider Testnet transaction 7a438...de03e which has vout[0].scriptPubKey = OP_DUP OP_DROP OP_DUP OP_HASH160 039.....6fe OP_EQUALVERIFY OP_CHECKSIG The script is equivalent to a standard pay-to-...
  • 988
6 votes
2 answers
4k views

Are timestamps in transactions trustable?

I need to properly segment transactions by time. Are timestamps in transactions trustable? Can these be forged? I'm not sure if transaction timestamps are part of the protocol, but I'm particularly ...
  • 163
6 votes
1 answer
578 views

Working example of raw transaction utilising Boolean (OP_IF, OP_ENDIF) scripting REQUIRED

I recently posted this Testnet TX (TxID 2d0daa01da8294a54178f8111eb2a02010c425fd15957d8baee8717edcfbe105) which successfully spends an output (TxID ...
5 votes
2 answers
349 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
948 views

Is it possible to combine two separate transactions into one transaction by only using their signatures?

I have two valid txs and two valid signatures for those txs. Right now they look like: 1) A -> B 2) C -> D A and C are inputs & B and D are outputs. I want to be able to combine them ...
5 votes
1 answer
1k views

How do you spend a P2SH transaction?

I've been running into a lot of trouble getting a transaction to spend coins in a multisig address. I create the raw transaction When I go to sign, I get "Operation not valid with the correct stack ...
  • 358
5 votes
1 answer
1k views

Signing a raw transaction with multiple inputs

So I am creating a simple P2PKH transaction and after I researched about this found few useful posts and answers here; I was able to successfully spend a a single P2PKH UTXO but it is really getting ...
5 votes
3 answers
6k views

Calculating "total received" and balance by an address

This is something which I think should be simple but it's driving me crazy. See for example this list of transactions associated with an address: https://blockchain.info/address/...
5 votes
1 answer
1k views

Problem with sendrawtransaction

When I use bitcoin-cli sendrawtransaction and only get -25 errors. I have tried to push the transaction using different blockchain explorer sites, but that didn't work. I have tried: ...
  • 1,408
4 votes
2 answers
924 views

How does the variable length integer work?

I'm trying to write a script that constructs a serialized bitcoin transaction from scratch. But when it comes to the number of inputs, the field is a variable length integer. It's typically only 1 ...
  • 2,858
4 votes
4 answers
3k views

How to decode very huge (!) raw transactions?

I'm parsing the blockchain to extract certain information I need for a script. One thing I do is parsing transactions. What I do is: getrawtransaction <tx> decoderawtransaction <rawtx> ...
  • 1,406
4 votes
1 answer
817 views

How to tell which part of the previous tx I need to make the hash to sign for an old given tx?

I have recently been taught (here) how to create the hash to sign for a given "input script" for an existing transaction. I then sought to test my abilities and sought out a difficult ...
  • 1,416
4 votes
1 answer
6k views

Signing a raw transaction with Python ECDSA (or OpenSSL)

I'm looking for specifics of Step15-17 from Redeeming a raw Tx Step By Step, which is essentially the step where the concatenated raw Tx structure is double sha256 hashed, and then signed with an ...
4 votes
1 answer
184 views

Can a node broadcast a valid signed raw transaction while still syncing?

Built and signed a native bech32 UTXO, but when I attempt to broadcast from my testnet node using the command sendrawtransaction it returns "missing inputs". I don't have the private keys in my wallet,...
  • 5,388
4 votes
1 answer
1k views

Transaction's maximum size

Is there a maximum size for any given transaction? I just created this tx: http://blockexplorer.com/testnet/tx/194173dcc07b396433d5725abe76d52b10d42ebd3d1d10b465429f87fee12a52 and although it ...
  • 1,366
4 votes
1 answer
736 views

Why do my transactions show I received 1 satoshi?

My Multi-Bit client shows 1 satoshi sent to me in my receiving transactions, with 1 confirmation only. The receiving address is quite old too. Why is that showing up when I didn't send myself anything ...
  • 588
4 votes
1 answer
770 views

Parsing a SegWit transaction - what is the size of witness data?

I'm parsing s SegWit transaction, I got it done until i reach the witness data. How big is the witness data?
  • 1,590
4 votes
3 answers
3k views

2of2 multisig - redeem script required

Normally somebody who signs a multisig transaction also needs the redeem script or all the public keys used for the creation of the redeem script, alongside their own private key. No I was thinking, ...
  • 217
4 votes
1 answer
4k views

Creating a raw transaction using Bitcoin Core v0.10.0 bitcoin-tx / createrawtransaction

I'm trying to create a raw transaction using Bitcoin Core v0.10.0 (on Windows 7 x64, and with txindex=1 optioned). Bitcoin Core v0.10.0 comes with a new Bitcoin-tx executable utility. The help menu ...
4 votes
1 answer
4k views

How do I find the txid and vout values for an input I want to spend?

I was in the http://coinb.in/multisig/#newTransaction and wanted to make a input but it needed 2 values. Txid, How do I get that? TxIn/vout, Whats that and how do I get that?
  • 229
4 votes
2 answers
2k views

Broadcast raw transaction without input validation

What tool/software can I use to broadcast a raw transaction, which would not reject a transaction because of invalid or double spend? Bitcoind with RPC has a validation step which rejects any raw ...
  • 1,007
4 votes
1 answer
381 views

How widespread is OP_RETURN forwarding and mining (as of February 2014)?

As of now (February 2014), how easy is it to have a transaction which makes use of OP_RETURN data confirmed into a block? Do standard nodes forward such transactions yet? Have major mining pools ...
  • 366
4 votes
1 answer
2k views

Code sample to sign a transaction

I have the 32-bytes double hash of a transaction, a 32-bytes private key, and I would like to sign the hash using the private key. How do I do that using BouncyCastle (or anything, really), in C# or ...
  • 1,007
4 votes
1 answer
2k views

How are transaction fees calculated in raw-transactions?

So, after understanding how to create and send raw transactions on the basis of 'How to send from many bitcoin addresses to one bitcoin address?', in practice I still struggle with transaction fees. ...
  • 229
4 votes
1 answer
2k views

Building Signed Bitcoin Transaction in Java

I have been attempting to build my own raw transaction generator in Java which I can then broadcast on the testnet network. The problem is when I attempt to broadcast the transaction it says there is ...
3 votes
1 answer
208 views

What is the different between CompactSize and VarInt encoding?

Pieter Wuille's definition of CompactSize encoding seems to match Greg Walker's definition of VarInt encoding, yet the BitcoinWiki claims that CompactSize is not to be confused with VarInt. What, if ...
  • 107
3 votes
1 answer
617 views

Transaction with OP_RETURN rejected by bitcoind 0.9

The raw transaction below is being rejected by bitcoind 0.9.1 (error: {"code":-22,"message":"TX rejected"}) ...
  • 1,007
3 votes
1 answer
123 views

Function combinerawtransaction is not working

I have multiple partially signed transactions that I want to combine into one transaction. All those transactions were signed using the same key so it should be possible to combine all those partial ...
3 votes
1 answer
125 views

How can I recognize an OP_RETURN transaction looking only at the hex?

Looking at these two transactions for example: tx1 and tx2. tx1 is an OP_RETURN trasaction, tx2 is a normal transaction. raw hex from tx1 (OP_RETURN): ...

1
2 3 4 5
8