Skip to main content
11 votes
Accepted

Does proof-of-work contribute directly to prevent double-spending?

There are multiple definitions of the term "double spending" at play here. First, there is the actual definition of double spending: to spend the same money multiple times. A simple example of this is ...
Ava Chow's user avatar
  • 71.5k
9 votes
Accepted

Understanding a Bitcoin Double Spending Transaction by Performing one on yourself

How to Double Spend You can double spend using Electrum quite easily. Even without duplicating your wallet, be it on the same or on 2 different machines. Btw.: Duplicating wallets is super easy with ...
UTF-8's user avatar
  • 3,234
7 votes
Accepted

Is something gained by double spending myself on a 51% attack?

Double spending is not about doubling, but about using the same UTXO twice. So, you won't gain anything by double spending coins to yourself. Let me explain you, with a simple example, how double-...
sr_gi's user avatar
  • 3,230
7 votes
Accepted

Are bitcoins (or fractions of bitcoins) labeled with IDs?

So are bitcoins, or the smallest allowable bitcoin fractions, distinctly labeled entities? They are unspent amounts (outputs of prior transactions) associated with addresses. Unspent transaction ...
RedGrittyBrick's user avatar
6 votes
Accepted

How does SPV prevent double spending of UTXO?

In a bitcoin transaction, A's address is not scanned for spendable Unspent Transaction Outputs (UTXOs). Full nodes simply check if the inputs of the transaction are really unspent. There is no ...
sanket1729's user avatar
  • 1,412
6 votes
Accepted

Single tx included in two different blocks

Occasionally, minor alternate chains emerge if multiple blocks are found for a given blockheight. Usually, these alternate chains only last for a single blocked, and are quickly dropped once another ...
Raghav Sood's user avatar
  • 17.2k
6 votes
Accepted

Would first-seen prevent a double spend attack?

First of all, what is the goal? The Bitcoin consensus rules already completely eliminate the possibility of an "double spend" within any individual version of history ("chain"). ...
Pieter Wuille's user avatar
6 votes
Accepted

What happens if a miner deliberately ignores a transaction, and "wins"?

Miners have complete perogative over what transactions to include. They may include random transactions, the highest fee paying transactions, just their own transactions, or no transactions at all. If ...
Pieter Wuille's user avatar
6 votes

Why is PoW even necessary?

The problem that Bitcoin solved was the double spending problem. The scenario that causes the double spending problem does not pertain to "miner x" trying to spend Bob's money—he can't ...
Murch's user avatar
  • 76.9k
6 votes

Why is not good having forks in a blockchain?

if I imagine to work with isolated transactions chained each other according to money flow, then i understand that we wish to have a single chain because forks would mean the presence of double-spend ...
Ava Chow's user avatar
  • 71.5k
5 votes

Is "fee higher than block reward" attack possible?

An attack like this is possible, it is just a way to profit off a 51% attack. However you must remember several things: if a miner controls less than 51% of the hashpower, then chances are they will ...
chytrik's user avatar
  • 18.3k
5 votes
Accepted

What happens to rejected transactions (i.e double spend or invalid transactions)?

Invalid transactions are never included in valid blocks. They can be included in a block, but that block would be rejected as invalid (and not classified as an orphan block).
Ava Chow's user avatar
  • 71.5k
5 votes
Accepted

Regarding CVE-2018-17144 and test cases

There are tests for that. The specifically broken pattern was a block containing a single transaction spending the same output, which originated from an earlier block, twice. Testing it without ...
G. Maxwell's user avatar
  • 7,727
5 votes
Accepted

How does the blockchain prevent spending money during a "short fork"?

Then the blochain of the "hacker" will have 1 block more than the others, thus it should be, at least for a few minutes, the "valid" blockchain This is incorrect. A block that contains an invalid ...
Pieter Wuille's user avatar
5 votes
Accepted

how does bitcoin solve the same chain replay attack?

In all cases what you are describing is a double-spend. Bitcoin uses a UTXO model (not an account based model) which means that there is a set of coins also known as the UTXO set or Unspent ...
pinhead's user avatar
  • 5,174
4 votes

What if a pair of double-spent transactions are collected into a new block?

When Alice sends the bitcoin, she spends an Unspent Transaction Output (UTXO) created by a previous transaction. To create a doublespend, she has to use the same UTXO as an input for another ...
Murch's user avatar
  • 76.9k
4 votes

It's possible to spend a BTC without fee to forge a payment?

The simplest protection is to not consider a payment to have been made to you until it receives some number of confirmations. The number can depend on the value of the payment. For small payments, one ...
David Schwartz's user avatar
4 votes

Low fee Electrum wallet transaction disappeared, now when I increase the fee it seems to be rejected as a double spend

I faced a similar issue and found this reddit post quite helpful. I'm not a bitcoin expert but I will write an answer describing what I think is happening, since there are no other answers yet. When ...
dimyG's user avatar
  • 141
4 votes
Accepted

Detecting unconfirmed double spends using bitcoind

bitcoind has a debugging option named mempoolrej. You can enable this by adding debug=mempoolrej to your bitcoin.conf file. This debugging options tells bitcoind to print out information about the ...
Ava Chow's user avatar
  • 71.5k
4 votes
Accepted

How does Bitcoin protect against doublespends?

No one on the network has a 'balance', they just have the keys to the outputs of previous transactions which they haven't spent yet. At the start, Alice holds the keys to some Unspent Transaction ...
meshcollider's user avatar
  • 11.9k
4 votes
Accepted

Is in-person double-spending attacks negligible on bitcoin payments?

Double spending attacks can certainly happen in person. A customer could have set up a system on a different computer which they remote into on their phone to initiate a double spend attack. However ...
Ava Chow's user avatar
  • 71.5k
4 votes
Accepted

My blockchain.info wallet was hacked. How can I create a double send to foil the attacker?

So some background as to what happened here. I wanted to claim my bitcoin diamond air drop. I googled and this video came up first. The video played this weird music which I think was hypnotic in ...
Marcus Scipio's user avatar
4 votes

Are bitcoins (or fractions of bitcoins) labeled with IDs?

So are bitcoins, or the smallest allowable bitcoin fractions, distinctly labeled entities? No, but almost. Bitcoins are literally just a value which is assigned to a script (see Scripts below). ...
JBaczuk's user avatar
  • 7,428
4 votes

Can two or more transactions sent from the same address be mined in the same block in Bitcoin's blockchain?

Will both Bob's transactions be confirmed in the same block? This cannot be guaranteed. They might or might not. consider the case when Bob sends all 10 bitcoins to Alice in one transaction and ...
RedGrittyBrick's user avatar
4 votes

Why is PoW even necessary?

But why is it even necessary since transactions are confirmed only if they contain valid signature? Proof of work is not used for transaction validation. A signature prevents other people stealing ...
meshcollider's user avatar
  • 11.9k
4 votes
Accepted

What is an inflationary bug in the context of bitcoin?

An inflation bug is one which allows an attacker to print new money, beyond what is permitted by the subsidy rule (50 BTC per block during the first 210000 blocks, 25 BTC the next 210000 blocks, 12.5 ...
Pieter Wuille's user avatar
4 votes

Can miners double-spend with two transactions in one block?

Having sufficient proof of work is a necessary criteria for a block to be valid, but it is not a sufficient criteria for a block to be valid. The proof of work is used to limit the cadence of updates ...
Murch's user avatar
  • 76.9k
3 votes

How does a double spend get resolved when two miners find conflicting blocks at the same time?

In order to visualize the manner in which Bitcoin blocks and transactions "flow" through the network, they should be viewed as propagating through the P2P network. Connected peers (nodes) notify one ...
venzen's user avatar
  • 609
3 votes

How does a double spend get resolved when two miners find conflicting blocks at the same time?

Blocks form a chain; each block contains a prev field containing the hash of the block that "precedes" it. The two blocks Ma and Mb are incompatible (the block chain is not allowed to contain two ...
Nate Eldredge's user avatar
3 votes
Accepted

Why does only the earliest transaction matter for double spending?

"Doublespend" refers to an attempt of spending the same funds twice. In Bitcoin specifically this occurs when a user publishes two transactions that are in conflict due to attempting to use the same ...
Murch's user avatar
  • 76.9k

Only top scored, non community-wiki answers of a minimum length are eligible