How to fully decode a coinbase transaction?


I am exploring a transaction and if would like to know when was the money created, I guess I would end up with a lot of coinable transactions. For a certain transaction I could explore the previous transactions successively until I found the coinbases. But I imagine this would be a very laborious job that could take a lot of resources. Just like trees ( but expanding the tree till the coinbase transactions

In the other hand I guess nodes when verifying a transaction do something very similar, don’t they? How could I create this list of coinable transactions that original the bitcoins involved in a particular...

0 0

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 decoderawtransaction

This works on most of the transactions (>99%) but some are very huge and the bitcoin client cant handle them. I wonder what else can handle them if not bitcoind itself. The error I get in bitcoind:

TX decode failed (code -22)

Thats because it cant accept very long arguments. My ruby script dies with

Arguement list too long - (Errno::E2BIG)

How to decode such transactions? Here are some examples:

2f50fdf7adbf58e91d738869948f4b191eb3cafa016c6df7e9182c06e4513852 e7229316b5a5b1f53382ec5a526b842dda2ca96bc891cd02d397a52c4a84dba0 540359af779a510828f0afd3c88562b62c37d0e4eeccb08104a167a3600f7956


Update: I just tried to paste the rawtransaction to this online parser and this one decodes that transaction without any problems. How is that possible...

0 0

Honestly, I'm not sure why that would be the case. Could you perhaps share (either here, or you can message me directly if you prefer) the transaction hash, or id that is returned to you?

I'm going to answer the specific question in the title while I'm here though, as I think it's an interesting question that could be useful for others.

This'll have two parts, and in the second part, you might see where your approach differs.

Why not all transactions sent from a Coinbase account will have a transaction hash How to get a transaction hash, or determine that there isn't one

1. Why not all transactions sent from a Coinbase account will have a transaction hash

Coinbase enables "off-blockchain" transactions between Coinbase accounts. This can be done by sending to an email address, or Coinbase account ID. Because these transactions are moved internally, and don't need to be processed by the bitcoin network, there are zero fees, and the amount sent can be...

0 0

Dell Terms & Conditions for Bitcoin Purchases

These Terms & Conditions for Bitcoin Purchases (“Bitcoin Terms & Conditions”) apply to your use of Bitcoin as your selected payment method. By using Bitcoin as your method of payment, you acknowledge and agree to be bound by these Bitcoin Terms & Conditions. These Bitcoin Terms & Conditions apply in addition to the terms and conditions contained in Dell’s

Terms of Sale


Site Terms

(collectively, “Dell Terms & Conditions”). If there is a conflict between these Bitcoin Terms & Conditions and Dell Terms & Conditions with respect to Bitcoin transactions, these Bitcoin Terms & Conditions govern. If you do not agree with all of these terms, do not select Bitcoin as your payment method.

Paying with Bitcoin

Provided by Coinbase.

The option to complete your transaction in Bitcoin is provided by Coinbase. Dell does not guarantee and is not responsible for the availability of Coinbase’s...

0 0

After reading this What is the format of coinbase transaction? I was wondering about a few things.

decoderawtransaction of a random Litecoin coinbase transaction:

"coinbase" : "038abd07062f503253482f048725ee5208083865a409000000092f7374726174756d2f", ... "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 975efcba1e058667594dc57146022ec46560a63c OP_EQUALVERIFY OP_CHECKSIG", "hex" : "76a914975efcba1e058667594dc57146022ec46560a63c88ac", .. "addresses" : [ "LZ2L61M8rCoZmK7SemTBqfxuFZv5Uj4peR"

Is the asm field the outgoing address? If yes how is it encoded and what is the hex field for? Same question goes for scriptSig asm field in a normal transaction. It contains the public key and the signature but how is it structured/encoded. Because I have a Tx with to vins from the same address and I don't see the same public key in the asm field.

How do I read the coinbase? Hex2asic gives me "?????/P2SH/??%?R??8e??????/stratum/". Is that all I can do if I don't know how...

0 0

This is a glossary of terms related to Bitcoin and Coinbase.

Address: A string of letters and numbers which bitcoins can be sent to and from. A bitcoin address can be shared publicly, and like sending a message to an email address, a bitcoin address can be provided to others that wish to send you bitcoin. Attack Surface: In computer security, an attack surface refers to the number of places where a malicious user may be able to gain access to a system. In general, a computer running more complex software has a higher attack surface than one running simpler software. Bitcoin: The first global, decentralized currency. Bits: A sub-unit of one bitcoin. There are 1,000,000 bits in one bitcoin. Block: A collection of Bitcoin transactions that have occurred during a period of time (typically about 10 minutes). If the blockchain is thought of as a ledger book, a block is like one page from the book. Blockchain: The authoritative record of every Bitcoin transaction that...
0 0

Look at block #280963. Look at coinbase transaction d1c6b8...fd08. You can see CoinBase data:


This is a script. Look at wiki for details. In coinbase transaction this script can contain any data. If you change this data, merkle root will change as well, and diffirent miners can start changing nonce/timestamp for merlke root, that you provides for them. Look at wiki for more information about merkle tree.

Coinbase transaction contains single input. This is input is not used, and it contains 32 bytes zeros as previous tx. Look at wiki for more information about what data transaction contains. I provide as example of decoding raw coinbase transaction.

> getrawtransaction d1c6b8140246950475735394b0ac68f9ada60d313d2b5308afbc569c84f7fd08
0 0

All the recent media attention on Bitcoin inspired me to learn how Bitcoin really works, right down to the bytes flowing through the network. Normal people use software


that hides what is really going on, but I wanted to get a hands-on understanding of the Bitcoin protocol. My goal was to use the Bitcoin system directly: create a Bitcoin transaction manually, feed it into the system as hex data, and see how it gets processed. This turned out to be considerably harder than I expected, but I learned a lot in the process and hopefully you will find it interesting.

(Feb 23: I have a new article that covers the technical details of mining. If you like this article, check out my mining article too.)

This blog post starts with a quick overview of Bitcoin and then jumps into the low-level details: creating a Bitcoin address, making a transaction, signing the transaction, feeding the transaction into the peer-to-peer network, and observing the results.


0 0

This is a contract between you and Coinbase UK, Ltd, a private limited company incorporated in England and Wales ("Coinbase"). By signing up to use an account through or, or any associated websites, APIs, or mobile applications (collectively the "Coinbase Site"), you agree that you have read, understood, and accept all of the terms and conditions contained in this Agreement, as well as our Privacy Policy and E-Sign Consent.

Last updated: September 22, 2016

1. Basic Coinbase Services.

1.1. Eligibility. To be eligible to use the Coinbase Services, you must be at least 13 years old. In order to link a funding method or to purchase or sell digital currency, you must be at least 18 years old (or the applicable age of majority and contractual capacity). If you are under the age of 18 and you wish to engage in digital currency purchase or sale activity, please contact us at

Your eligibility to access certain...

0 0

Find examples of how to build programs using Bitcoin.

The following guide aims to provide examples to help you start building Bitcoin-based applications. To make the best use of this document, you may want to install the current version of Bitcoin Core, either from source or from a pre-compiled executable.

Once installed, you’ll have access to three programs: bitcoind, bitcoin-qt, and bitcoin-cli.

bitcoin-qt provides a combination full Bitcoin peer and wallet frontend. From the Help menu, you can access a console where you can enter the RPC commands used throughout this document.

bitcoind is more useful for programming: it provides a full peer which you can interact with through RPCs to port 8332 (or 18332 for testnet).

bitcoin-cli allows you to send RPC commands to bitcoind from the command line. For example, bitcoin-cli help

All three programs get settings from bitcoin.conf in the Bitcoin application...

0 0