Bitcoin Forum
May 11, 2024, 07:30:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there a way to find which block your bitcoin was mined from?  (Read 1240 times)
Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
December 11, 2015, 03:50:37 AM
Merited by ABCbits (1)
 #1

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

looking for a signature campaign, dm me for that
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715455830
Hero Member
*
Offline Offline

Posts: 1715455830

View Profile Personal Message (Offline)

Ignore
1715455830
Reply with quote  #2

1715455830
Report to moderator
1715455830
Hero Member
*
Offline Offline

Posts: 1715455830

View Profile Personal Message (Offline)

Ignore
1715455830
Reply with quote  #2

1715455830
Report to moderator
1715455830
Hero Member
*
Offline Offline

Posts: 1715455830

View Profile Personal Message (Offline)

Ignore
1715455830
Reply with quote  #2

1715455830
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
December 11, 2015, 03:52:45 AM
 #2

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.

Monnt
Legendary
*
Offline Offline

Activity: 938
Merit: 1002


View Profile
December 11, 2015, 03:53:55 AM
 #3

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.
teukon
Legendary
*
Offline Offline

Activity: 1246
Merit: 1004



View Profile
December 11, 2015, 01:47:21 PM
Merited by ABCbits (1)
 #4

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.
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 275


View Profile
December 11, 2015, 02:02:26 PM
Merited by ABCbits (2)
 #5

(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.     

Bitwasp Developer.
Sir_lagsalot
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
December 12, 2015, 10:33:52 AM
 #6

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.
teukon
Legendary
*
Offline Offline

Activity: 1246
Merit: 1004



View Profile
December 12, 2015, 10:42:20 PM
 #7

(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.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
December 12, 2015, 10:58:26 PM
 #8

(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.

equator
Legendary
*
Offline Offline

Activity: 1190
Merit: 1002


View Profile
December 13, 2015, 02:48:45 AM
 #9

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.
teukon
Legendary
*
Offline Offline

Activity: 1246
Merit: 1004



View Profile
December 13, 2015, 09:35:10 PM
Merited by ABCbits (1)
 #10

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"?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
December 13, 2015, 09:44:16 PM
 #11

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.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
December 13, 2015, 11:43:21 PM
 #12

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.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
December 14, 2015, 12:01:59 AM
 #13

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.

teukon
Legendary
*
Offline Offline

Activity: 1246
Merit: 1004



View Profile
December 14, 2015, 12:16:04 PM
 #14

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!