Author

Topic: Is this double spending? Block #515266 (Read 199 times)

legendary
Activity: 3472
Merit: 4801
March 28, 2018, 09:51:20 AM
#5
I'm wondering if my understanding is missing something?

Your understanding is definitely missing something.  If you try to look at the technical details of what is happening in a block or a transaction without understanding how transactions, blocks, validation, and confirmation actually work then you WILL confuse yourself.

sent around from a wallet with ID 17A16QmavnUfCW11DAApiJxp7ARnxN5pGX

That is NOT a wallet.  That is a Bitcoin Address.  There is a difference.  A wallet is a collection of one OR MORE Bitcoin addresses along with the private keys for each address.

I'm a little confused because it appears that the wallet was able to send itself the same BTC holdings multiple times (multiple transactions) within the same block.

Address re-use is a bad idea, but that doesn't stop people from doing it. The creator of the transactions sent some bitcoins to some addresses, and then sent the change back to the same re-used address where they had previously received the bitcoins.  Any transaction that spends an output can NOT be confirmed BEFORE the transaction that creates the output, however it CAN be confirmed in the SAME block as the transaction that creates the output.

My understanding was that if you own 6.3k BTC and you send the full balance to yourself, the 6.3k BTC goes into processing until the transaction is confirmed,

Goes into processing?

That's not how Bitcoin works.

The transaction is broadcast to all peers.  Each peer validates the transaction before it accepts it or relays it to any other peers.  If the transaction is valid, then the peer adds the transaction to it's own mempool, updates its own UTXO, and relays the transaction to all the peers that it is connected to. Block creators (solo miners and mining pools) receive the transaction, and choose if/when to add it to any block they are working on.  Eventually, when a transaction is included in a block, it said to have 1 confirmation.  Each additional block added to the chain after that block is considered to be an additional confirmation. Any valid transaction that spends any of the unconfirmed outputs of a transaction can still be broadcast and relayed. This is a very bad idea unless you are very certain that the original transaction WILL confirm eventually, but people still do it sometimes. Transactions spending unconfirmed outputs can NOT be confirmed before the transaction that creates the outputs is confirmed.

meaning that you are not able to put through a second transaction with the balance until it circles back around to you.

There is no "circle back".  The balance never goes anywhere.  It is just a set of outputs in the UTXO.

this wallet was able to put through multiple transactions that utilized the full balance within one block

There are no balances.  Each transaction "spends" an existing output (making it invalid to spend that output again) and creates one or more new unspent outputs.

So,


The first transaction:

"spent" the 6,838.01769589 BTC output identified as transaction 7de881...f6631b output number 5 (and so long as this transaction exists, it is invalid to re-spend this output)

"created" a new 6,837.61130142 BTC unspent output identified as transaction e53047...725347 output number 5

The next transaction:

"spent" the 6,837.61130142 BTC output identified as that transaction e53047...725347 output number 5 (and so long as this transaction exists, it is invalid to re-spend this output)

"created" a new 6,837.44545549 BTC unspent output identified as transaction 99b7ef...5680c2 output number 5

The next transaction:

"spent" the 6,837.44545549 BTC output identified as that transaction 99b7ef...5680c2 output number 5 (and so long as this transaction exists, it is invalid to re-spend this output)

"created" a new 6,830.08610752 BTC unspent output identified as transaction 33a6fc...eee290 output number 8


And so on.  Each of these transactions spends a different output, therefore it is not a "double-spend".  A "double-spend" is when two (or more) transactions each attempt to "spend" the exact same output.  Because of the nature of a decentralized peer-to-peer network, it is possible for UNCONFIRMED double-spend transactions to exist. ( It is possible for some peers to receive and believe one transaction while other peers receive and believe a competing transaction that spends the same output.  Until confirmation, there is no way for these peers to come to an agreement on which peers have the "REAL" transaction and which have fraudulent "double-spend".  This is the problem that Satoshi solved with the invention of the blockchain.  Any block that tries to include a transaction that "spends" an output that is already "spent" in the same (or earlier) block is considered by ALL peers to be an invalid block and therefore rejected by everyone.  Therefore, all peers can look at the list of transactions in the blockchain to identify which transaction is the "REAL" transaction and can reject any competing transaction that tries to spend an output that has already been spent by a transaction in the blockchain.  This is why transactions are called "CONFIRMED" when they show up in the blockchain.
newbie
Activity: 2
Merit: 0
March 26, 2018, 09:36:02 PM
#4
Ah, makes sense. Thanks for clarifying!
legendary
Activity: 2772
Merit: 3284
March 26, 2018, 09:29:09 PM
#3
You're seeing the change of the first transactions being spent. These are valid transactions; transactions do not have to be confirmed to be spent. This is also why CPFP (child pays for parent) works. If you check the specific amounts, you will see that the amounts equal the last change output.

Double spending is when you attempt to spend the same input twice, and in this case, it's different inputs making it not a double spend.
copper member
Activity: 434
Merit: 278
Offering Escrow 0.5 % fee
March 26, 2018, 09:22:15 PM
#2
it could be an offline signing of transaction.
This is not a double spend in Electrum there's an option in which you can either enable or disable spent unconfirmed transaction.
newbie
Activity: 2
Merit: 0
March 26, 2018, 08:54:33 PM
#1
Hello,

Looking for an explanation for something like the following:

Block: #515266

Output: 99,681.95307254 BTC

Link: https://blockchain.info/block-index/1684356

So if you look through the transactions, there are multiple transactions for about 6,300 BTC being sent around from a wallet with ID 17A16QmavnUfCW11DAApiJxp7ARnxN5pGX (https://blockchain.info/address/17A16QmavnUfCW11DAApiJxp7ARnxN5pGX) .

I'm a little confused because it appears that the wallet was able to send itself the same BTC holdings multiple times (multiple transactions) within the same block. The wallet name relates to Poloniex, but it only has a balance of about 6.3k BTC. If you look at the transactions within the block, it was able to circulate that balance multiple times.

My understanding was that if you own 6.3k BTC and you send the full balance to yourself, the 6.3k BTC goes into processing until the transaction is confirmed, meaning that you are not able to put through a second transaction with the balance until it circles back around to you. However, this wallet was able to put through multiple transactions that utilized the full balance within one block.

I'm wondering if this is double spending or if my understanding is missing something?

In advance, thank you for taking the time to read this and for your responses.
Jump to: