14
votes
Accepted
How is a Transaction Output Marked as Spent?
Every full Bitcoin node maintains a database of which unspent outputs are left.
When verifying a transaction, all its inputs are fetched from the database. If one is missing, validation fails. Among ...
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 ...
10
votes
Accepted
How does BitCoin prevent fraud during confirmation period?
This is definitely a concern, and is the reason why Bitcoin users are encouraged to wait for several confirmations before accepting a transaction and delivering goods.
It's not quite as easy as you ...
10
votes
Double Spending - Does each node maintain a list of unspent transaction references?
Each full node must maintain a list of all unspent outputs. Currently there are 15 million unspent outputs with a total size of 525 MB. To check whether a new transaction is a double-spend, Bitcoin ...
9
votes
Accepted
Why doesn't bitcoin place additional constraints on competing block chain forks, other than length of chain? (e.g., time and confirmation count)
My question then is: why doesn't bitcoin specify a maximum duration of time and/or a maximum number of confirmations, after which a competing/forking block is rejected even if it's backed by a longer ...
8
votes
Why doesn't bitcoin place additional constraints on competing block chain forks, other than length of chain? (e.g., time and confirmation count)
First, a quick clarification: assuming two chains both have valid blocks, it's the chain with the most proof of work that wins, not necessarily the chain with the most blocks.
Second, thanks for the ...
8
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 ...
7
votes
How do miners detect double-spending?
The other two answers explain what has to be done to discover doublespends. I'll try to explain how it works.
There are no "balances", there are "coins"
A common misunderstanding is that there is a ...
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-...
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 ...
6
votes
Accepted
How to minimize risk when accepting zero confirmation payments?
From
http://www.cryptocoinsnews.com/news/the-mathematically-secure-way-to-accept-zero-confirmation-transactions/2014/02/13, here is what services like MyCelium and BitPay may be doing:
More ...
6
votes
Accepted
What exactly happens when a node detects a double spend?
When a node hears about a new transaction, they try to accept it to their in-memory pool of transactions. If a node hears about a transaction that conflicts with one of the transactions that is ...
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 ...
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 ...
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"). ...
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 ...
5
votes
Accepted
Could any standard fee transaction be double spent by using a higher fee?
The original design assumes a common behavior of processing the incoming transaction on FIFO basis. That means the first transaction received by a miner wins and all conflicting transactions received ...
5
votes
Accepted
What happens if a miner confirms their own double spend?
Every single Bitcoin node in the network will reject and ignore the block as invalid if there is a double spend in it. The block won't even spread very far, because the peers that first receive it ...
5
votes
Accepted
Is it possible to use Selfish Mining to steal bitcoins?
Selfish Mining cannot be used to change transactions in any way, therefore, it is impossible to steal funds in such fashion.
Also, Selfish Mining is somewhat the opposite of Double-Spending, as ...
5
votes
What can a dishonest node do (or try to do)?
just off the top of my head, here are some things a dishonest miner can do:
fail to include one or more transactions in the block. this is not technically 'dishonest', since the protocol does not ...
5
votes
How do miners detect double-spending?
Yes, miners check the blockchain to ensure all new transactions are valid before including them into a block. However, it also depends on your definition of "miner". If you mean the people running ...
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 ...
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 ...
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 ...
5
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 ...
4
votes
Does using Ripple to accept Bitcoin reduce risk of Bitcoin fraud?
With Bitcoin there are various ways to mitigate the risks and issues you mention to allow some use of payments with zero confirmations instead of waiting for sufficient confirmations to be sure the ...
4
votes
Double spend transactions flag the node as "bad"?
Your current peers can ban (for some time, not forever) your IP-address.
Just connect to other nodes in case.
The network itself can not do anything with you because there is no such thing in protocol....
4
votes
Accepted
What's the easiest way to someone to double-spend 0-confirmation transactions?
Peter Todd wrote [Replace-By-Fee Tools](https://github.com/petertodd/replace-by-fee-tools
)
Basic usage:
./double-spend.py <address> <amount>
Creates two transactions in ...
4
votes
Accepted
Speeding up confirmation by double-spending a transaction stuck in mempool
Yes, it is quite possible to successfully double-spend an unconfirmed transaction. Only about 20% of hash power today strictly mines the first transaction seen.
Here is a chart showing the ...
4
votes
Accepted
Can a malicious majority miner rewrite history?
Let's assume for a minute that your theory is true, and that actual nodes on the network would not accept this new, valid, and longer block chain.
That on itself would be a bug. Maybe it isn't ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
doublespend × 271transactions × 54
blockchain × 30
bitcoin-core × 25
unconfirmed-transactions × 20
confirmations × 19
security × 18
attack × 16
mining-theory × 15
proof-of-work × 14
majority-attack × 14
blockchain-fork × 13
bitcoind × 12
ripple × 9
utxo × 9
zero-confirmation × 9
transaction-fees × 8
transaction-verification × 8
consensus × 8
wallet × 7
fraud × 7
whitepaper × 7
electrum × 6
orphaned-blocks × 6
race-attack × 6