unconfirmed transactions – Can a 0 confirmation Bitcoin Core change output be spent?

I have a Bitcoin Core wallet which has a utxo which I spent from, in a transaction where around 1% was sent to an external wallet address, with the ~99% change output remaining in the wallet, sent to a new internal change address selected by core.

The fee used turned out to be too low and I am still waiting for the transaction to be confirmed, and now when I attempt to spend using the balance that is displayed in the wallet (with getbalance endpoint), I am told there is “Insufficient funds.”.

But when I list the wallet utxos with listunspent, “spendable” has value true for the change output mentioned above – this is what I expected since my understanding is the core wallet by default will use CFPF to still spend an unconfirmed change output (please correct me if this is wrong).

My question is:
Why does the output listed by listunspent indicate that the output is ‘spendable’, when if I try to spend the output, it fails with an ‘Insufficient funds’ error?

Is there another reason for the wallet complaining that there is insufficient funds? Probably relevant is that it was an opt-in RBF tx, and I have already tried bumping the fee (still too low and not confirmed) but now would prefer to use CPFP as I have another transaction that I would like to make from the same unconfirmed change output.

bitcoind – Can I see transactions in bitcoin-qt without downloading blocks? if I have a server with blocks on the local network?

I have server with bitcoind (synchronized), port 18443 opened. And I tried to connect to rpc server with bitcoin-qt in my mac. With this configuration:

regtest=1
rpcuser=<login>
rpcpassword=<pass>
rpc_connect=<ip to server>

But bitcoin-qt writes that it is synchronizing, and to use the application you have to wait.

Can I use bitcoin-qt without synchronization?

P.S. Sorry for my english

transactions – Sent two btc transacton to payeer wallet less than the mnmum deposit,neither where credited

recently sent to my payeer wallet a 0.0002 btc transaction which is less than the 0.0005 minium btc deposit, then did a second transacton of 0.0003 btc thnking that it will sums up.

Both transaction where conrmed more than 100 times and sent to the payeer wallet adress but are not credited and payeer system refuse to credited it. Yet those btc habe been sent to as the bitc explorer show for a total deposit of 0.0006 btc?

What can do to retrieve my funds ?

transactions – I sent Bitcoin to an address but the recipient hasn’t yet received it

The Blockchain is the only truth

At the time I wrote this, that transaction has 204 confirmations. That means it was absolutely definitely received.

If the address is correct and the recipient says they didn’t “receive” it, they are wrong. Either their wallet isn’t properly synchronised or they are mistaken (or lying to you)

Note that Bitcoin doesn’t actually send money from wallet to wallet, it isn’t a process that takes time between sending and receiving. At no point in time is money really out of one wallet and “on its way” to another wallet.

The only thing transmitted is a new block being transmitted to every node (wallets etc) in the Bitcoin world roughly every ten minutes. So long as you have the latest block, you know exactly which address has the money.


What follows is to clarify my point about the process taking no time. You should skip it unless you are interested in this detail or find it controversial.

Duration of transaction

Let’s consider in a little more detail what happens when you make a typical Bitcoin payment. Note that Bitcoin is pretty complex, so I’ll be simplifying. There are exotic forms of payment I won’t cover (RBF, n of m, …). My knowledge is limited but I think I can shed a little more light on this subject.

When you make a payment in your wallet, what happens is that your wallet constructs a kind of proposal for a transaction. This proposal is sent out into some nearby nodes in the Bitcoin network.

After sending that proposal, your wallet will mark the input amount as reserved for that transaction and won’t let you try to spend it again. Your wallet will however know that this amount is still under your control and still as much “in your wallet” as it ever was and not yet in anyone else’s wallet.

After a short time your proposed transaction will have been passed from node to node, being checked at each, and will reach some miners. Eventually a miner will incorporate your proposed transaction in a block and successfully mine that block.

Before this instant in time, the miner considers the money to be yours. After this instant in time, the miner considers the money to be the recipient’s. There is no time when the miner considers the money to be in transit.

The miner transmits the new block to nearby nodes. As each node finishes checking the new block, that is the instant that particular node stops believing the money belongs to you and starts believing the money belongs to the recipient.

The new block is passed from node to node until it reaches your wallet, At the instant in time it finishes checking that block your wallet ceases believing the money is yours and starts believing (provisionally†) that the money now belongs to the recipient.

There is no time in between. No time when your wallet believes the money is in neither wallet, in transit between wallets, sent but not yet received. None of those are really possible.

There is time during which the proposed transaction is circulating, but during that time all nodes consider the money to be yours. All nodes will accept other proposals from you for another transaction involving that money. This is because until one of those proposals gets included in a mined block, the money is still yours, still unspent.

The circulation of a proposed transaction takes time. Mining takes time. The Bitcoin network is large, so there are times when some nodes have the latest block and some don’t. We say the network has not reached consensus – although each node has no doubt about whether the money is yours or the recipient’s.

The change in ownership of money is instant (at each node separately) and money is never really “in between wallets”.


†Blockchain Forking

Since there are many independent miners (and mining pools), it can be that there are two or more blocks mined at about the same time competing to be accepted as the generally accepted next block. This means that sometimes a recently accepted block is discarded in favour of another block which has a greater number of subsequent blocks mined “on top of” it. This is why nodes generally wait for at least five blocks to be mined on top of the block containing your transaction (six blocks in total) before they accept the change of ownership of money as being fully confirmed.

So there is a period of time between the first block being mined and the sixth block being mined when a node might regard the change of ownership of the money as not sufficiently confirmed. This doesn’t mean a node is unsure about who has the money. It doesn’t mean the money is in transit. It doesn’t mean the Bitcoin network can issue a second transaction to take money back out of the recipient’s wallet. It just means that there is a tiny possibility the Bitcoin network might collectively decide your proposed transaction never got mined in the first place, that it never happened, nothing to see, move along. In most cases where this happens, the forgotten proposed transaction automatically gets included in some subsequent block and everything is OK and everyone forgets there was ever a hiccup.

This doesn’t happen to every transaction, this is rare, it isn’t really a case of money being “in transit” or “not in either wallet” or “not yet received”.


Terminology and philosophical aspects

Proposed Transactions

Above I talk about proposed transactions and proposals. Those words are not generally used in the Bitcoin community. Mostly people talk about transactions, unconfirmed transactions and confirmed transactions. I wanted to use a different word to clearly distinguish a transaction which is circulating which has not yet been mined.

What is in your wallet?

The reason I put “in your wallet” inside scare-quotes the first time I mentioned it is that Bitcoin wallets don’t really contain money. They contain a secret number, called a private-key, that can be used to prove you control some money (own some money). Anyone else who knows that secret number can take money “out of your wallet” from afar without any access to your wallet! Money isn’t stored inside Bitcoin wallets but we go along with the charade because it is a useful shorthand that makes it easier to talk about Bitcoin. It is a useful way to explain Bitcoin to beginners even though it is misleading and unsafe.

This is weird!

Other people will feel my description of the way Bitcoin works places too much emphasis on the underlying dry technical (scary?) nature of transactions and that it is better to describe the process as if paper banknotes were taken out of your leather wallet, moved through an intermediary organisation and then placed into someone elses leather wallet. I agree this view has some utility but I worry it gives the impression that there is time in which banknotes are not in the senders wallet and not in the recipient’s wallet but in the hands of some intermediary who can be asked to return them or intervene to change the outcome. Consider a literal reading of the original title of the question at the top of this page.

Pending coinbase transactions for days

Good pm pls I transferred some btc from coinbase account 440$ worth as usual coinbase use their default fee but up till this moment since the 17th of November its still pending no confirmation no hash I’d
Pls help me I’ve contacted support no reply

transactions – How can be proven that a signature is valid with it’s public key

If someone wants to make a transaction, they need to sign the transaction data with their private key. For example Sign(transactionData, privateKey) creates the signature. What is exactly this Sign function and what happens inside this function? And how can be verified that a signature is valid with a public key? For example Verify(signature, publicKey), what happens inside this function?

transactions – Why does the txn_count field exists in a block?

I was wondering why the txn_count field in a block exists. The count of transactions could be determined by parsing the txns field in tx format, right?

Yes, it could, but it isn’t. Ultimately serialization formats are a convention, and Satoshi picked one when he created the initial software which has persisted in the protocol. It could be changed, but why bother?

The tx_in and tx_out can be just parsed and the count can be determined based on that, right?

That’s not quite true – you need some way of conveying at least where the inputs end and the outputs begin (which in the existing protocol is served by the txin count). When deserializing a list of transactions (like in a block message), you also need to know where each transaction ends and the next one begins (which in the existing protocol is served by the txout count).

Is it also used so you can reserve a certain amount of memory before parsing the transactions you think?

You could, but that actually isn’t done (at least in Bitcoin Core). The problem is what if you receive a block that claims to contain a billion transactions? Instead, it will allocate buffer space in increments of at most a few MB, so an attacker would need to actually send megabytes of data to get you to allocate that much.

transactions – How is the balance of a Bitcoin address quickly calculated?

At the protocol level, Bitcoin has no concept of “balances” or “addresses”, and their common interpretation isn’t relevant during verification.

Every transaction spends “coins” and reforges them into new “coins” (called UTXOs). Every UTXO has a value (in number of satoshis) and an locking script. UTXOs are always spent in their entirety. If you only have a 1 BTC UTXO and want to send 0.1 BTC to someone, your wallet will under the hood create a transaction that has one input (your 1 BTC UTXO) and two outputs (one 0.1 BTC UTXO with an locking script created from the receiver’s address, and one 0.9 BTC UTXO with an locking script you can unlock yourself). From a protocol perspective, there is nothing special about this UTXO that goes back to yourself (called a “change output”) – it’s just another UTXO.

Transaction explicitly identify which previous coins they’re spending, based on the txid that created them, not based on the locking script. So it doesn’t matter what the sum of the values of UTXOs with a particular locking script is; coins are spent when they’re mentioned as an input in another transaction. That means the only thing that matters is:

  • Do the input UTXOs exist?
  • Is the sum of the input UTXO values (whether they have the same locking script or not) not less than the sum of the values of the newly created UTXOs.

Now, sites like blockexplorers do show balances. They’re a higher-level – and misleading – abstraction. They do this by simply maintaining an index per address of all transactions that have the script corresponding to that address as locking script, and all transactions that spends such outputs.

Wallets for privacy reasons construct new addresses all the time (typically one per incoming transaction), as there is no cost to creating more addresses. Looking at it from a per-address perspective is therefore misleading, and has caused people to lose money (when they think “X is my address, I only need its private key” – you need the keys to all addresses, even change addresses, your wallet uses).

traceability – How can Bitcoin transactions be traced if you can change your address?

How can Bitcoin transactions be traced if you can change your address?

In Bitcoin you don’t change your address. You create new receiving addresses.

This is normally done so that a new address is created for each new transaction with the intention to increase privacy.

However in each transaction there are inputs and outputs and if a transaction has one input and two outputs, if you can infer which output is change, you know that there is some connection between the input address and the output address. You may be able to then trace that connection further back through a series of transactions. This is approximately like tracing possession of a coin passing through a series of people or businesses in a series of transactions.

This becomes more difficult if transactions have much more than one input and much more than two outputs.

Transactions may have certain characteristics such as address-types, size, timing and so on that may make it possible to make inferences. Transactions with differing characteristics could be inferred as being different parties, those with similar characteristics might be potentially associated with a single party of interest.

For example, if you see a large transaction with hundreds of inputs and one high-value output occur every Friday at 19:00 UTC, you might suspect it was a large exchange moving funds into cold storage as part of it’s regular operational procedures. The timing might suggest a specific timezone.

We know that organisations such as the FBI perform blockchain analysis to trace illegal activity. The details of their methods are not published, so far as I know.

See

transactions – What happens when a request expires in Electrum, then I am paid?

I just bought bitcoin from the bitcoin website, and it is taking a lot longer than I expected to process my information and my request and actually send BTC to my wallet. I set the “expire” setting to 1 day when I was requesting in my BTC wallet. What happens if I am paid after the request expires? Is the address no longer used by my wallet? Does the BTC go somewhere else? Or does it go no where at all?