Author

Topic: Is there a way to find which block your bitcoin was mined from? (Read 1242 times)

legendary
Activity: 1246
Merit: 1011
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
Ah. I see now. Thanks for explaining.
legendary
Activity: 3472
Merit: 4801
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1246
Merit: 1011
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"?
legendary
Activity: 1190
Merit: 1002
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
(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.

Fees aren't outputs. Fees are the difference between the sum of the inputs and the sum of the outputs of a transaction. There is nothing that links fees back to the transaction that they belong to. Really what they are are coins that disappear into thin air and then are regenerated in the block reward.
legendary
Activity: 1246
Merit: 1011
(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.
sr. member
Activity: 392
Merit: 251
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.
sr. member
Activity: 412
Merit: 287
(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.     
legendary
Activity: 1246
Merit: 1011
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.
legendary
Activity: 938
Merit: 1002
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1232
Merit: 1030
give me your cryptos
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
Jump to: