Author

Topic: Transaction ID (Read 662 times)

newbie
Activity: 14
Merit: 0
May 31, 2013, 05:42:18 PM
#3
I see.  I wanted to do an auction for multiple items with a chance to get it for free and use for example the last digit of the transaction id as a determiner as to who gets it free.  I guess I can still do that with a hash of some sort of multiplier and reveal it afterwards and apply it to each incoming transaction id to see who won but it is a bit bulky and not easily explained to a regular user.
legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
May 31, 2013, 01:13:16 AM
#2
The transaction ID is a hash of the transaction. It is random, but it is possible to generate many variations of the same transaction (without actually sending them) until you get a transaction with a transaction ID that matches some criteria, and then only send that one. You should not use a transaction ID alone as a source of random data.

The correct way to do what you're trying to do is to generate a secret, then publish a hash of that secret. Add the secret to the transaction ID, then hash that, and use that hash to select the winner. When you announce the winner, reveal the secret at the same time. To verify that the winner was fairly chosen, anyone can hash the secret, verify that the hash matches the hash you published earlier (to prevent you from cheating by changing the secret), and then hash the secret+transaction ID to verify that you selected the winner correctly.
newbie
Activity: 14
Merit: 0
May 30, 2013, 11:21:51 PM
#1
Maybe someone can answer a question for me.  Are transaction id's random or maybe a better question is how random are they?  I'm thinking of doing a promotion/lottery type giveaway and want to have the transaction id determine who the winner is.  That way it is provably fair.
Jump to: