Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed 70 times
Let's say Alice sends 5 BTC to Bob and Alice tries to make double spending by again sending those same 5 BTC inputs to carl and lets say that Alice is also a one of the miner node.
- Here Alice tries to take those 2 double spent transactions into a same single block
- lets say Alice solved hash puzzle and broadcasted those 2 transactions in the same block
since in first transaction, inputs UTXO and output UTXO are valid and in second transaction which is of same block, even have input UTXO which is unspent, but it is double spent. when block is broadcasted those 2 transactions are broadcasted simultaneously,
Questions:
- how other nodes are going to validate those 2 simultaneously broadcasted transaction technically by bitcoin code(Where those 2 transaction in same block)?
- How is this double spending is solved technically by bitcoin code, when 2 transactions are included in same block (When block is broadcasted then those 2 transactions are broadcasted simultaneously )?
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 to the shared global state and as a mechanism to select the author of the next block in a distributed manner. Additionally, the block has to pass all the ~40ish rules for blocks to be valid in the first place.
A block that contains two conflicting transactions is invalid. A full node validating it will mark the UTXO as spent when it validates the first transaction, and when the second transaction refers to the same UTXO as its input, the UTXO is no longer available and the block gets rejected.
If a block contains two conflicting transactions (a double spend) then the block is invalid, despite the proof of work being correct. Thus, the miner has wasted their work, and the block will be rejected by all validating nodes.
You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.
Comments