How to force bitcoind to include a specific transaction as an input of another transaction?


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

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
0 0

The reference client currently refuses to relay transactions it considers unacceptable, such as those with zero or no fees. However, there may be miners who are willing to put these in a block. This group is for people who want to send such transactions, and those who want to put them in blocks.

To participate, have your node maintain a connection to Lightfoot Hosting's node, which relays indiscriminately. This means that you can broadcast your transaction to it, and it will relay it to any miner who also has a connection to it. If your transaction meets the policies of at least one miner connected, it should eventually be mined into a block.

How to use or participate

bitcoind / Bitcoin-Qt

Add the command-line parameter: -addnode=

If this IP address stops working you can find potential eligius nodes here:

Participating miners


0 0

bitcoinjs-lib is an awesome library for all sort of Bitcoin operations written for Node.js. It’s used in many projects and services you probably already use such as:, Coinkite, Skyhook ATM, GreenAddress etc..

Please note: Generating raw transactions is pretty advanced and can put your coins at risk if you don’t pay attention to details, please do the following on the testnet and not on the live network.

First let’s include the library in our project:

Next, we will need to import the private key of the Bitcoin address we want to transfer coins from

You can also see the public address for a given private key to make sure you’re using the correct one

Now let’s use bitcoinjs-lib’s TransactionBuilder to create our new raw transaction

Our next step is to add inputs to our transaction. Remember, inputs should include the transaction hash of an...

0 0
0 0
0 0
0 0

Transaction strategies

Beware of these common mistakes when implementing transactions in the Java platform

Mark Richards
Published on February 03, 2009

Content series:

This content is part # of # in the series:

This content is part of the series:

Stay tuned for additional content in this series.

Learn more. Develop more. Connect more.

The new developerWorks Premium membership program provides an all-access pass to powerful development tools and resources, including 500 top technical titles (dozens specifically for Java developers) through Safari Books Online, deep discounts on premier developer events, video replays of recent O'Reilly conferences, and more. Sign up today.

The most common reason for using transactions in an...

0 0


Transactions are the fundamental atoms of the Bitcoin protocol. They encapsulate a claim upon some value, and the conditions needed for that value to itself later be claimed.

This article will discuss:

What a transaction is The Transaction class and what it gives you Transaction confidences Different ways in which transactions can be used

What is a transaction?

Transactions are, at heart, a collection of inputs and outputs. They also have a lock time, which is not used in the current Bitcoin network, and a few bits of metadata only represented in bitcoinj like when the transaction was last seen and a confidence measurement. All this is represented using the Transaction class.

An output is a data structure specifying a value and a script, conventionally called the scriptPubKey. An output allocates some of the value gathered by the transactions inputs to a particular program. Anyone who can satisfy the program (make it return...

0 0

Once again, transaction malleability is affecting the whole network of Bitcoin. In general, it can cause so much confusion above anything else and end up apparently having two the same transaction up to the point that the following block is mined. It can be perceived as follows:

The original transaction has never confirmed. One more transaction having the same coin amounts going to as well as from similar addresses, showing up. This contains another transaction ID.

Most of the time, this another transaction ID will validate and in some block explorers you’ll be able to see notices about the first transaction which was a double spend or maybe being not valid.

Eventually however, only one exchange, with the right quantity of Bitcoins being transferred ought to affirm. If no exchanges affirm, or beyond one affirm, at that point this most likely isn't specifically connected to exchange malleability.

In any case, it was seen that there were a few exchanges sent...

0 0

Understanding Transactions

For any business, transactions that may be comprised of many individual operations and even other transactions, play a key role. Transactions are essential for maintaining data integrity, both for multiple related operations and when multiple users that update the database concurrently.

This article will specifically talk about the concepts related to transactions and how transactions can be used in the context of a SQL Server database. Besides, a transaction is a fundamental concept and this article will be helpful for relating transaction concepts with other databases as well.

Note: I used SQL Server 2012 in the article but you can use SQL Server 2008 as well.

In this article, I'll cover the following:

What a transaction is When to use transactions Understanding ACID properties Design of a Transaction Transaction state Specifying transaction boundaries T-SQL statements allowed in a transaction Local transactions in...
0 0

The bitcoin system, unlike traditional banking and payment systems, is based on de-centralized trust. Instead of a central trusted authority, in bitcoin, trust is achieved as an emergent property from the interactions of different participants in the bitcoin system. In this chapter, we will examine bitcoin from a high level by tracking a single transaction through the bitcoin system and watch as it becomes "trusted" and accepted by the bitcoin mechanism of distributed consensus and is finally recorded on the blockchain, the distributed ledger of all transactions.

Each example is based on an actual transaction made on the bitcoin network, simulating the interactions between the users (Joe, Alice, and Bob) by sending funds from one wallet to another. While tracking a transaction through the bitcoin network and blockchain, we will use a blockchain explorer site to visualize each step. A blockchain explorer is a web application that operates as a bitcoin search engine, in that...

0 0

A transaction file is a data file in which transaction records are stored which relate to entries in a master file. These kinds of files serve to isolate regular transaction activity from the master file information while allowing a database to tie the two together through a key reference. This key reference is usually a single entry common to both groups of records such as an account number, employee or client name, or purchase order. This allows database operators to keep master files relatively small while having access to full transaction histories for audit trails or reporting.

Company databases can contain extremely large amounts of information which typically consist of the individual details of clients, suppliers, and employees and records of recurring events pertaining to each. Often these databases are split up into master and transaction files. The master file contains individual specific details such as names, company contacts, addresses, email lists, and...

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
0 0
By: Daniel Farina | Read Comments (19) | Related Tips: More > Database Administration Problem

You want to attach a SQL Server database that does not have the transaction log file and you get the following error when you try to attach the data file:

"The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure."

In this tip I will show how you can successfully attach a database when you get this error.


Here I will cover the not so uncommon scenario where someone gives you a SQL Server database to attach to your instance, but only gives you the *.mdf file. Unfortunately, when you try to attach the database the SQL Server engine complains about the missing transaction log and aborts the attachment process.

0 0

A transaction is in-doubt when there is a failure during any aspect of the two-phase commit. Distributed transactions become in-doubt in the following ways:

A server machine running Oracle Database software crashes

A network connection between two or more Oracle Databases involved in distributed processing is disconnected

An unhandled software error occurs

You can manually force the commit or rollback of a local, in-doubt distributed transaction. Because this operation can generate consistency problems, perform it only when specific conditions exist.

This section contains the following topics:

Discovering Problems with a Two-Phase Commit

The user application that commits a distributed transaction is informed of a problem by one of the following error messages:

ORA-02050: transaction ID rolled back, some remote dbs may be in-doubt ORA-02053: transaction ID committed, some remote dbs may be in-doubt ORA-02054:...
0 0


The "raw transaction API" was introduced with Bitcoin-Qt/bitcoind version 0.7. It gives developers or very sophisticated end-users low-level access to transaction creation and broadcast.


listunspent [minconf=1] [maxconf=999999]

Returns an array of unspent transaction outputs in the wallet that have between minconf and maxconf (inclusive) confirmations. Each output is a 5-element object with keys: txid, output, scriptPubKey, amount, confirmations. txid is the hexadecimal transaction id, output is which output of that transaction, scriptPubKey is the hexadecimal-encoded CScript for that output, amount is the value of that output and confirmations is the transaction's depth in the chain.

lockunspent unlock? [{"txid":txid,"vout":n},...]

Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection, when spending...

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
"Frozen Transactions" : Why it Happens and How to Fix it!If my walk-through is helpful to you and saves you some tears and grief, I would be most grateful for any tips or friendly donations you send my way:


Have you ever tried to send a regular Darkcoin or Bitcoin transaction only to discover, much to your dismay, that the transaction becomes "frozen" at 0/6 confirmations? You wait and wait, but the transaction still receives no confirmations. Then you start getting worried, so you go to block explorer and enter the transaction ID but the search tool says "No results found"! Now you really start worrying... did my transaction just "disappear" into thin air? Are my coins going to be stuck in limbo forever?! Will they ever reach their destination or will I ever get them back? :'(

Don't worry, there are solutions! And I'm going to help you understand what causes this problem, and share with you a couple simple and easy solutions I...

0 0

By Mark Strawmyer

Transaction logs are a vital yet often overlooked component of database architecture. They are often forgotten because they are not something actively maintained like the schema contained within a database. In this article we’ll examine how transaction logs are used in Microsoft SQL Server, maintenance and potential problems with them, how they can be used to restore a database, and finally, optimizing them for performance.

SQL Server transaction logs
A transaction log is a sequential record of all changes made to the database while the actual data is contained in a separate file. The transaction log contains enough information to undo all changes made to the data file as part of any individual transaction. The log records the start of a transaction, all the changes considered to be a part of it, and then the final commit or rollback of the transaction. Each database has at least one physical transaction log and one data file that is exclusive to...

0 0