Author

Topic: Question about transaction outputs. (Read 845 times)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 18, 2011, 12:14:30 PM
#9
thanks for your help kjj and forp, I think i can come up with a pretty accurate guess using both those methods.

Another thing i'm confused about. How to I determine the address the block reward was sent to? e.g. is their some way to extract the address out of "scriptSig"?
Take the 65 bytes starting with 04, it's the public key
Then, do that: http://dl.dropbox.com/u/1139081/BitcoinImg/PubKeyToAddr.png
hero member
Activity: 910
Merit: 1005
August 18, 2011, 12:04:20 PM
#8
thanks for your help kjj and forp, I think i can come up with a pretty accurate guess using both those methods.

Another thing i'm confused about. How to I determine the address the block reward was sent to? e.g. is their some way to extract the address out of "scriptSig"?
kjj
legendary
Activity: 1302
Merit: 1026
August 18, 2011, 07:00:13 AM
#7
You can guess based on the amounts and have a very good chance of getting it right.  The code looks for the smallest single transaction larger than the spend amount to redeem, if possible, and then the smallest group of transactions.

For better privacy, the client could attempt to make the spend and the change roughly equal in size, but that will churn the wallet and make you pay higher fees in the long run.
full member
Activity: 195
Merit: 100
August 17, 2011, 04:06:40 PM
#6
Somebody who knows the source better than I can correct, but it looks like the output for "change" is inserted at a random position in the transaction.  See CWallet::CreateTransaction(), wallet.c:969.  So, there shouldn't be any deterministic clues.

From my point of view it is a correct reading of the source but an incorrectly drawn conclusion.

Example: Assume a transaction hat the outputs X and Y. Then usually ONE is the recipient of the payment and the OTHER is the original owner of the coins. Now assume that X is a well known bitcoin address (for example a donation address mentioned here in the forum). In this case you can safely conclude that Y belongs to the original owner of the coins.





hero member
Activity: 910
Merit: 1005
August 17, 2011, 03:52:57 PM
#5
Ok thanks.
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
August 17, 2011, 03:41:14 PM
#4
I guess it is not possible then? i.e. there is no relationship between prev_out hash and any of the out hashes?

Somebody who knows the source better than I can correct, but it looks like the output for "change" is inserted at a random position in the transaction.  See CWallet::CreateTransaction(), wallet.c:969.  So, there shouldn't be any deterministic clues.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 17, 2011, 03:40:36 PM
#3
Nope, impossible to know because the output address is a pool key which never was used before
hero member
Activity: 910
Merit: 1005
August 17, 2011, 03:27:03 PM
#2
I guess it is not possible then? i.e. there is no relationship between prev_out hash and any of the out hashes?
hero member
Activity: 910
Merit: 1005
August 17, 2011, 10:39:20 AM
#1
When a bitcoin user sends an amount smaller than the size of their balance it is my understanding that two transactions are created and the remainder is sent back to the user. In a transaction such as this:

Quote
{
            "hash" : "6d124d67f4ebfd7a2b4e05852a86980b665f3e46903dd3177c12b3ebeb6ffbb6",
            "version" : 1,
            "lock_time" : 0,
            "size" : 259,
            "in" : [
                {
                    "prev_out" : {
                        "hash" : "5add561ad3d8e0e554809623509681101c85a666c5e48a5c3887c7c922e7841a",
                        "n" : 0
                    },
                    "scriptSig" : "3046022100b05a8751279e78c5096c536af528532f37e16c92ca9a4ac0f91e279f5f65990302210 0be87185a99bc6ace21209f13b148d44eaef2a2d7df6fda67bef84ab2e927b71701 04e6a2a199649366be01cabb1d9019ab755de0add011bfc2ea34c4c0243f1f80a708a2c2d53a91b f44bba215df1a4b1c8ebbe13480da35db73f080b425e05532ad"
                }
            ],
            "out" : [
                {
                    "value" : 18.44000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 1106a35156e021ac69bfb0fc0922a633447214e0 OP_EQUALVERIFY OP_CHECKSIG"
                },
                {
                    "value" : 0.01000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 b644b4754ea9a24ff7932b6d63e0878be63bd155 OP_EQUALVERIFY OP_CHECKSIG"
                }
            ]
 }

Is there anyway to determine which output was "real" and which one was returned to the original owner?
Jump to: