How to access Bitcoin's transaction database?


The best way to write a parser of your own for the blockchain is to find the source code of one that already exists and from that deduce the precise underlying data structure and how to parse and interpret it. e.g. here in C++ and here in C# - and there are many others.

The data in the blockchain is stored in a custom binary format that is a little tricky to untangle without some help; this link seems as good as any to get started on the overall structure.

There are many"gotcha's" to watch out for. For example:

'endianess' i.e. having to reverse binary digits before interpretation and some of the interesting values associated with a transaction have to be calculated e.g. for addresses 'big numbers' where the numbers used internally are so huge you may need custom code/libraries to deal with them

Comparing your results to those that are freely available via the blockchain and blockexplorer as well as the bitcoind.exe API would be a must. Otherwise it is easy to...

0 0


Michael receives 0.05000000 BTC from Pablo and another 0.01000000 BTC from Kuradang. Michael also wants to send 0.02500000 BTC to Berteng. Each amount that Michael receives has the corresponding txid and other details. Lets check that out using listunspent command then create a raw transaction using createrawtransaction after that sign it using signrawtransaction and send that raw transaction using sendrawtransaction.


Michael's Bitcoin Address: mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe Berteng's Bitcoin Address: mxh3H416KCRoBDiweSESew5YJyAk1nxLrN Send to Berteng: 0.02500000 mBTC

Step 1)



$ bitcoin-cli listunspent [misconf=1] [max_number_confirmation=99999999] '''[""]'''

Lets check Michael's list of unspent using with his address.


$ bitcoin-cli listunspent 1 99999999 '''["mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe"]'''


[{ "txid":...
0 0

Byte-map of Transaction with each type of TxIn and TxOut

A transaction is a transfer of Bitcoin value that is broadcast to the network and collected into blocks. A transaction typically references previous transaction outputs as new transaction inputs and dedicates all input Bitcoin values to new outputs. Transactions are not encrypted, so it is possible to browse and view every transaction ever collected into a block. Once transactions are buried under enough confirmations they can be considered irreversible.

Standard transaction outputs nominate addresses, and the redemption of any future inputs requires a relevant signature.

All transactions are visible in the block chain, and can be viewed with a hex editor. A block chain browser is a site where every transaction included within the block chain can be viewed in human-readable terms. This is useful for seeing the technical details of transactions in action and for verifying payments.

general format...

0 0

A few days ago, I wanted to sell some bitcoins for USD on my debit card. I decided to use Paxful, as I have a well trusted buyer there, whom I have been dealing with for quite a while. So, I transferred my bitcoins to my wallet on Paxful. Surprisingly enough, the transaction was confirmed exactly 30.25 hours after initiating it, which was extremely inconvenient to me and my trading partner. Interestingly, it happened that I sent a couple of transactions after initiating the Paxful transaction, and they were both confirmed much earlier than the Paxful transaction, so why are some transactions confirmed before the others? and why do some transactions take a long time to get confirmed?

Fees versus Confirmation Delays:

Obviously, when traffic across the bitcoin network increases, confirmation delays can be expected. This usually happens during times of bullish rallies. Bitcoin price had just crossed the $1,200 mark, when I had to wait for more than 30 hours for my...

0 0

Bitcoin is the currency of the Internet: a distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. As such, it is more resistant to wild inflation and corrupt banks. With Bitcoin, you can be your own bank.

If you are new to Bitcoin, check out We Use Coins and You can also explore the Bitcoin Wiki:

How to buy bitcoins worldwide
Buying Reddit Gold with bitcoin

Will I earn money by mining bitcoin?

Security guide for beginners - (WIP)

Community guidelines

Do not use URL shortening services: always submit the real link. Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins. Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person...
0 0

You can send Bitcoin using your Cubits Wallet in only a few steps:

Go to the Send Money page on your Cubits Account Enter or scan the address of the person you wish to send Bitcoin Enter the amount of Euro or Bitcoin you wish to send Press the “Send Money” button

Your transaction status may be pending for one of two reasons:

You performed a Buy or Sell operation using funds not immediately available on your Cubits account. The transaction will be pending until we receive confirmation from your bank. You performed a large transaction that must be verified by the Cubits Team.

Once you have submitted a Bitcoin transaction it cannot be cancelled. Bitcoin transactions are instantaneous - once the funds have been moved into another address Cubits cannot access the transferred Bitcoin.

Internal transactions completed between Cubits users will not be visible on the blockchain. For instance, if a Cubits Wallet user...

0 0

by Balaji S. Srinivasan (@balajis), Veerbhan Kheterpal (@veerbhan), and Christian Papauschek (@papauschek)

To send a Bitcoin transaction you typically need to include a transaction fee. In general, the larger the fee, the more quickly the transaction will be written to the Blockchain by the distributed group of transaction processors known as bitcoin miners. However, exactly how large a fee you need to get rapid transaction confirmation can be hard to predict in advance, because everyone else sending a Bitcoin transaction at the same time is effectively competing with you for the speed of inclusion into the Blockchain.

One solution is to use, originally developed by one of us (Christian) at For those who are manually sending transactions, you can use our web interface (pictured below) to determine how much you’ll likely need to send in fees to get a transaction through in a given amount of time:

0 0

Command: abandontransaction

nullabandontransaction "txid" Mark in-wallet transaction as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace "stuck" or evicted transactions. It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already conflicted or abandoned. Arguments: 1. "txid" (string, required) The transaction id Result: Examples: > bitcoin-cli abandontransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;'...
0 0

"Malleability" of Bitcoin transactions has recently become a major issue. This article looks at how transactions are modified, at the byte level.

An attacker has been modifying Bitcoin transactions, causing them to have a different hash. Recently an attacker has been taking transactions on the Bitcoin peer-to-peer network, modifying them slightly, and rapidly sending them to a miner. The modified transaction often gets mined first, pre-empting the original transaction. The attacker can only make "trivial" changes to a transaction, so exactly the same Bitcoin transfer happens as was intended - the same amount is moved between the same addresses, so this attack seems entirely pointless. However, each transaction is identified by a cryptographic hash, and even a trivial change to the transaction causes the transaction hash to change. Changing the hash of a transaction can have unexpected effects on the Bitcoin system.

A very quick explanation of transactions


0 0

The number of transactions on the Bitcoin network has steadily increased over the years. This means more blocks are filling up. And as not all transactions can be included in the blockchain straight away, backlogs form in miners’ “mempools” (a sort of “transaction queue.”)

Miners typically pick the transactions that pay the most fees and include these in their blocks first. Transactions that include lower fees are “outbid” on the so called “fee market,” and remain in miners’ mempools until a new block is found. If the transaction is outbid again, it has to wait until the next block.

This can lead to a suboptimal user experience. Transactions with too low a fee can take hours or even days to confirm, and sometimes never confirm at all.

But here is what you can do today to keep your own transaction from getting stuck.

Before You Send It

For the first years of Bitcoin’s existence, most wallets added fixed fees to outgoing transactions: typically, 0.1...

0 0

A transaction is a section of data confirmed by a signature. It is sent to the Bitcoin network and forms blocks. It typically contains references to preceding transactions and associates a certain number of bitcoins with one or several public keys (Bitcoin addresses). It is not encrypted because there is nothing to encrypt in the Bitcoin system. A block chain browser is where all transactions are combined in the form of a block chain. They can be found and verified. This is necessary to determine technical transaction parameters as well as verify the details of payments.

Example of a Bitcoin transaction with input and output


Input: Previous tx: f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6 Index: 0 scriptSig: 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d10 90db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501 Output: Value: 5000000000 scriptPubKey: OP_DUP OP_HASH160...
0 0

The latest versions of our wallet now use a dynamic fee structure (which you can read about here) to determine appropriate fees for your transactions, so some of the information in this post no longer applies.

If you have a pending transaction that is taking an abnormally long time to confirm, it may be due to network congestion. To find out more about how network congestion can affect your transaction, check out this article in our Support Center.

This is a Blockchain Quick Bit, where we cover the basics of a topic, or product, to help you understand it better. This Quick Bit is intended to help you learn about bitcoin transaction fees. Bitcoin transaction fees are one of the many benefits for consumers and merchants to utilize bitcoin, and is an attractive aspect of the digital currency. Currently bitcoin transaction fees can average to around .04 cents USD (or 0.0001 BTC) per transaction.

Bitcoin transactions are in place as an incentive to miners when...

0 0

Last updated: 20th March 2015

Bitcoin transactions are sent from and to electronic bitcoin wallets, and are digitally signed for security. Everyone on the network knows about a transaction, and the history of a transaction can be traced back to the point where the bitcoins were produced.

Holding onto bitcoins is great if you’re a speculator waiting for the price to go up, but the whole point of this currency is to spend it, right? So, when spending bitcoins, how do transactions work?

There are no bitcoins, only records of bitcoin transactions

Here’s the funny thing about bitcoins: they don’t exist anywhere, even on a hard drive. We talk about someone having bitcoins, but when you look at a particular bitcoin address, there are no digital bitcoins held in it, in the same way that you might hold pounds or dollars in a bank account. You cannot point to a physical object, or even a digital file, and say “this is a bitcoin”.

Instead, there are only...

0 0

If you have sent a bitcoin payment in the last couple of weeks, you may have noticed that your transactions are taking much longer than expected to confirm.

We have received your emails.

Since, like the Bitcoin network, we are currently working through a backlog, we want to thank you for your patience. With the high volume of questions we're getting about delayed payments, we decided it would be best to write a short explanation about what's happening with many bitcoin transactions right now.

Transactions on the Bitcoin network itself aren't controlled or confirmed by BitPay, but by the bitcoin miners which group transactions into "blocks" and add those blocks to the Bitcoin "blockchain" – the shared historical record of all transactions. When a transaction has been added to a block six blocks ago, it's considered a done deal.

Currently, bitcoin network traffic is unusually high due to increasing demand for transactions per block. Block sizes are...

0 0

Having greatly influenced Mt. Gox in 2014, transaction malleability is a “new-old” issue within the Bitcoin industry. This issue can still create problems for the network, and negatively affect the perception of cryptocurrencies in general.

Also read: How Bitcoin Can Alter Our Psychology

Disclaimer: This article is a guest post from Helga Danova, Communications Officer, CEX.IO. This is not a sponsored story.

As one of the exchanges that have faced several attempts of transaction malleability attacks against the platform, CEX.IO shares its experience of identifying and fighting trans-action.

What is Transaction Malleability?

Transaction malleability is an attack that lets a person change a Bitcoin transaction’s unique ID before confirmation on the Bitcoin network. This change makes it possible for the person to pretend that a transaction didn’t happen. In case of Bitcoin exchanges, it can be used to make a double deposit or double...

0 0

After sending

If you can’t get your transaction confirmation after sending you have to know how to make “queue jumping” in mempool.

Opt-In RBF – «optional fee replacement»

In order to enable your transaction to make “queue jumping” we recommend you using the option of “optional fee replacement” - Opt-In RBF. Thanks to this option user has the possibility of transaction recurrent sending with bigger amount of commission.

In most cases new payment is declined when sending the same transaction network. Bitcoin nodes treat such action as an attempt of double payment and don’t process it. When sending transaction using Opt-In RBF function you generally notify network that you are sending the same transaction with bigger amount of commission fee. This results at old transaction replacement with new transaction and enables payment to jump a queue.

At the same time it is necessary to take into account one nuance: the inclusion of new transaction into...

0 0

Notes on Bitcoin:

Anybody who studied with Dave and Charlie in the late 90s knows, it is always easier to encrypt data then to decrypt it. Even if some government, don't think the US is the only one working on it, has the ablility to decrypt the data, it will always require a focused effort, and they won't be doing it realtime. In addition, more robust encryption alogrithms can always be written. So I don't worry to much about it being tracked or hacked.

Bitcoin is the ultimate fiat currency. It is backed by nothing except faith in the software and hardware infrastructure it is based on. That said, the software infrastructure is completely opensource, effectively transparent, can't say that about the FRN, Euro, Yen, or Yuan, other Central Bank currencies.

If you're holding for the long term, Bitcoin is like a startup, a high risk high return speculation on what you believe is a good idea, not a bad thing. It is not a safe long term store of value, if for no...

0 0

tl;dr: You can now use our searchable database to download Bitcoin timestamps for items in the Internet Archive.

While that title sounds like clickbait, the hard work of the Internet Archive made it much more accurate than it sounds. They’re a San Francisco non-profit digital library that provides free public access to collections of digitized materials, ranging from software applications/games, music, movies/videos, moving images, and millions of public-domain books. But they’re perhaps best known for the Wayback Machine, an archive of hundreds of billions of website snapshots, providing a priceless historical record of the evolution of the web.

In short, if it’s on the internet, there’s a pretty good chance the Internet Archive has a copy of it.

But is that copy the right copy?

OpenTimestamps helps answer that question by cryptographically proving data existed in the past, long before an attacker would have had an opportunity or reason to forge or...

0 0
0 0

Video transcript

What I would like to do is describe an imaginary, or a fictitious, Bitcoin transaction. And then talk about how somebody might try to game or defraud the system. And why that's not only mathematically hard to do, but why there's actually an incentive-- actually an economic incentive in the Bitcoin system for different people to behave honestly. So let's suppose that there is someone out there named Dan, and that Dan wants to order a pizza-- maybe a cheese pizza, from Pete's Pizza Shop. And let's say that Pete's Pizza Shop accepts Bitcoins as payment, and that it costs 1 Bitcoin for a pizza pie. And imagine that Dan receive previously-- let's say he received 5 Bitcoins from his cousin, Carol. So maybe Carol, who I'm going to label by C, gave to Dan 5 Bitcoins, which we can label as a B with a circle around it. And that he wants to use 1 of these 5 Bitcoins to buy a pizza from Pete. And so what Dan's Bitcoin client will do is it will create a transaction...

0 0

Brace yourselves for the next wave of bitcoin startups, and prepare to be surprised: they may not have much to do with bitcoin as a payment mechanism at all.

We usually see bitcoin as disruptive to the payments industry, as its technology greases the wheels of transaction, and eliminates the need for currency conversions and hefty fees.

We think of banks and credit cards. But just as we're getting used to that idea, the next wave of disruption is coming – with new targets.

This wave takes aim at those who hold money for us as guarantors for contracts or deals we've made: escrow companies, betting agencies and bookmakers.

Digital currency technology has the ability to secure and enforce a whole range of digital contracts all by itself, performing functions that have previously required a trusted (human) third party with access to the deal-makers' money.

Futures contracts, world event prediction exchanges, insurance, even your last will and...

0 0

Last Updated: 19th February 2016

Who is Satoshi Nakamoto?

While we may not know who he (or she) was, we know what he did. Satoshi Nakamoto was the inventor of the bitcoin protocol, publishing a paper via the Cryptography Mailing List in November 2008.

He then released the first version of the bitcoin software client in 2009, and participated with others on the project via mailing lists, until he finally began to fade from the community toward the end of 2010.

Nakamoto worked with people on the open-source team, but took care never to reveal anything personal about himself, and the last anyone heard from him was in the spring of 2011, when he said that he had “moved on to other things”.

But he was Japanese, right?

Best not to judge a book by its cover. Or in fact, maybe we should.

“Satoshi” means "clear thinking, quick witted; wise". “Naka” can mean “medium, inside, or relationship”. “Moto” can mean “origin”, or...

0 0

Ignore Bitcoin’s challenges. In this interview, Don Tapscott explains why blockchains, the technology underpinning the cryptocurrency, have the potential to revolutionize the world economy.

What impact could the technology behind Bitcoin have? According to Tapscott Group CEO Don Tapscott, blockchains, the technology underpinning the cryptocurrency, could revolutionize the world economy. In this interview with McKinsey’s Rik Kirkland, Tapscott explains how blockchains—an open-source distributed database using state-of-the-art cryptography—may facilitate collaboration and tracking of all kinds of transactions and interactions. Tapscott, coauthor of the new book Blockchain Revolution: How the Technology Behind Bitcoin is Changing Money, Business, and the World, also believes the technology could offer genuine privacy protection and “a platform for truth and trust.” An edited and extended transcript of Tapscott’s comments follows.

Interview transcript

0 0