Title: Is there a way to find which block your bitcoin was mined from? Post by: Decoded on December 11, 2015, 03:50:37 AM Hey guys, as the title says, i'd like to know if there was a tool or a method to find what block my bitcoin was mined from. Is this possible? I'd like to know if my bitcoin was from the first block every mined xD
Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: achow101 on December 11, 2015, 03:52:45 AM It is possible to trace the origins of the Bitcoin in your addresses, but they will not go back to the same block. It would all trace to a bunch of different blocks. All you have to do is follow the chain of inputs to outputs to find the block the Bitcoin was generated.
Your Bitcoin is not from the first block ever mined, or from any of the first couple hundred, since the bitcoin generated in those blocks have never been spent. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: Monnt on December 11, 2015, 03:53:55 AM It is possible to trace the origins of the Bitcoin in your addresses, but they will not go back to the same block. It would all trace to a bunch of different blocks. All you have to do is follow the chain of inputs to outputs to find the block the Bitcoin was generated. Your Bitcoin is not from the first block ever mined, or from any of the first couple hundred, since the bitcoin generated in those blocks have never been spent. Yeah what he said above... You'll probably end up with a bunch of different blocks where the BTC comes from. Why do you need to do this anyway? There is no point. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: teukon on December 11, 2015, 01:47:21 PM Hey guys, as the title says, i'd like to know if there was a tool or a method to find what block my bitcoin was mined from. Is this possible? I'd like to know if my bitcoin was from the first block every mined xD Not really. Bitcoin doesn't work this way. Suppose I have 1 BTC from 2014 and 1 BTC from 2012. If I use these to buy something worth 2 BTC then the seller will receive a single 2 BTC output which can be traced back to 2012. If this seller later sends 1 BTC to a friend then both the seller and the friend will have a bitcoin which can be traced back to 2012. Chunks of bitcoin are easy to mix up in this way. Even "freshly mined coins" are indistinguishable from collected fees. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: fbueller on December 11, 2015, 02:02:26 PM (1) Register on an API
(2) Take an address you're interested in (3) Request all utxos on the address (4) Lookup txid on the API. If coinbase: stop here. Otherwise: look at inputs, and repeat this step. At the end you'll have a rather large list of blocks. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: Sir_lagsalot on December 12, 2015, 10:33:52 AM Your bitcoin probably came from multiple blocks, is they aren't freshly mined. This is because people's wallets mix and match the coins that will be transacted, and you can never know if they're from the same block.
It is possible to trace the origins of the Bitcoin in your addresses, but they will not go back to the same block. It would all trace to a bunch of different blocks. All you have to do is follow the chain of inputs to outputs to find the block the Bitcoin was generated. Your Bitcoin is not from the first block ever mined, or from any of the first couple hundred, since the bitcoin generated in those blocks have never been spent. Yeah what he said above... You'll probably end up with a bunch of different blocks where the BTC comes from. Why do you need to do this anyway? There is no point. I guess he's just interested. He wants to know the origins of his coins. I, myself always check the date my coins were minted. Some old habit of mine. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: teukon on December 12, 2015, 10:42:20 PM (1) Register on an API (2) Take an address you're interested in (3) Request all utxos on the address (4) Lookup txid on the API. If coinbase: stop here. Otherwise: look at inputs, and repeat this step. At the end you'll have a rather large list of blocks. Why stop at a coinbase transaction? Coinbase outputs contain the fees of transactions included in its block. Surely we should repeat the iteration with each one of the block's fee-paying transactions. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: achow101 on December 12, 2015, 10:58:26 PM (1) Register on an API (2) Take an address you're interested in (3) Request all utxos on the address (4) Lookup txid on the API. If coinbase: stop here. Otherwise: look at inputs, and repeat this step. At the end you'll have a rather large list of blocks. Why stop at a coinbase transaction? Coinbase outputs contain the fees of transactions included in its block. Surely we should repeat the iteration with each one of the block's fee-paying transactions. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: equator on December 13, 2015, 02:48:45 AM thanks guys, it was really very usefull for me as i was also curious to know some technical details about my transactions and from your all replies i also got the solution for my doubt , so their is a output and input details for each and every transactions in bitcoins wallets.
Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: teukon on December 13, 2015, 09:35:10 PM Fees aren't outputs. Fees are the difference between the sum of the inputs and the sum of the outputs of a transaction. Of course. I didn't suggest otherwise. There is nothing that links fees back to the transaction that they belong to. If so then this is equally true for normal transactions. There is nothing that links outputs to the inputs they came from. Really what they are are coins that disappear into thin air and then are regenerated in the block reward. A matter of interpretation which I will accept here for the sake of argument. To be consistent, should we not interpret the bitcoins of a transaction's inputs as disappearing into thin air before being regenerated in its outputs? Now, instead of "Why stop at a coinbase transaction", I ask "Why not stop immediately"? Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: achow101 on December 13, 2015, 09:44:16 PM Of course. I didn't suggest otherwise. Sorry, I misinterpreted your response.Now, instead of "Why stop at a coinbase transaction", I ask "Why not stop immediately"? What do you mean by this? I think you are misinterpreting fbueller's response. He isn't saying to stop searching through the utxo list when you see a coinbase, but to keep searching through the list. For each utxo, search through its inputs and follow the chain until all coinbases in that chain are reached, then go back to the list and repeat with the next utxo. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: DannyHamilton on December 13, 2015, 11:43:21 PM teukon has it right.
knightdk appears to be struggling to understand the concept. A (non-coinbase) transaction has two parts pertinent to this discussion. There are a list of inputs that provide value to the transaction. There are a list of outputs that are assigned value that must be less than or equal to the sum of the value supplied by the inputs. A coinbase transaction also assigns value to a list of outputs. That value must also be less than or equal to some total value that is available to the coinbase transaction. The difference is that a non-coinbase transaction gets its value from the list of inputs whereas the coinbase transaction gets its value from the block subsidy plus the sum of all transaction fees from all transactions in the block. This means that if you sum up all the outputs of all the transactions in the block (including the coinbase output) it will be equal to the sum of all the inputs plus the block subsidy. Therefore, every transaction in the block that left unaccounted-for value as a transaction fee essentially has that value accounted for in the output of the coinbase transaction. So, when you follow the list back and you get to a coinbase transaction, you can't stop there. The value that you are tracing back didn't "come from" the coinbase transaction any more than it "came from" the inputs of the transaction where you started. Since the coinbase transaction got some of its value from the transaction fees (and therefore from the inputs of all the transactions that left value for transaction fees), you have to keep going with all those inputs and the transactions that created them. And so on, and so on, until you get to coinbase transactions that came from blocks where none of the transactions in the block paid any transaction fee. At that point you'll finally be back to the point where the value first came into existence. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: achow101 on December 14, 2015, 12:01:59 AM teukon has it right. Ah. I see now. Thanks for explaining.knightdk appears to be struggling to understand the concept. A (non-coinbase) transaction has two parts pertinent to this discussion. There are a list of inputs that provide value to the transaction. There are a list of outputs that are assigned value that must be less than or equal to the sum of the value supplied by the inputs. A coinbase transaction also assigns value to a list of outputs. That value must also be less than or equal to some total value that is available to the coinbase transaction. The difference is that a non-coinbase transaction gets its value from the list of inputs whereas the coinbase transaction gets its value from the block subsidy plus the sum of all transaction fees from all transactions in the block. This means that if you sum up all the outputs of all the transactions in the block (including the coinbase output) it will be equal to the sum of all the inputs plus the block subsidy. Therefore, every transaction in the block that left unaccounted-for value as a transaction fee essentially has that value accounted for in the output of the coinbase transaction. So, when you follow the list back and you get to a coinbase transaction, you can't stop there. The value that you are tracing back didn't "come from" the coinbase transaction any more than it "came from" the inputs of the transaction where you started. Since the coinbase transaction got some of its value from the transaction fees (and therefore from the inputs of all the transactions that left value for transaction fees), you have to keep going with all those inputs and the transactions that created them. And so on, and so on, until you get to coinbase transactions that came from blocks where none of the transactions in the block paid any transaction fee. At that point you'll finally be back to the point where the value first came into existence. Title: Re: Is there a way to find which block your bitcoin was mined from? Post by: teukon on December 14, 2015, 12:16:04 PM Of course. I didn't suggest otherwise. Sorry, I misinterpreted your response.Now, instead of "Why stop at a coinbase transaction", I ask "Why not stop immediately"? What do you mean by this?My apologies, I've obviously communicated poorly. I'm glad Danny was able to clear things up for you. |