Bitcoin Forum

Economy => Gambling => Topic started by: jpoker272727 on June 20, 2016, 07:39:42 PM



Title: Question thats been bothering me
Post by: jpoker272727 on June 20, 2016, 07:39:42 PM
I feel like I should know how to do this, and it's probably very basic.  Not that Im questioning the integrity of Satoshibones at all, I play there all the time, especially since they show you right on their site how to verify your bets, the only problem is, Im unclear on exactly what to do with the script, or verification they show.

Heres what it says: if someone could explain to me where I would put type this in, I'd really appreciate it


The bet outcome is calculated by hashing today's secret with your Transaction ID.
You can check on your own by using the code and a past secret published here.


import hashlib
def xor_func(s1,s2):
   return ''.join(chr(ord(a) ^ ord(b)) for a,b in zip(s1,s2))
def verify(txid,secret,lessthan):
   sha512 = hashlib.sha512()
   sha512.update(xor_func(secret,txid))
   b = long(sha512.hexdigest(),16)
   result = b % 65537
   if result<lessthan:
      print "win!"
   else:
      print "lose!"
         
Past Secrets
current time: Mon, 20 Jun 2016 19:37:33 +0000
Date   
Secret June 19 2016   c77bd2d2e5a4911efeb8c1227f7676d90fecf53f13ba34df2011ad4c1df494fe




Is there a program i would plug and chug the numbers into that equation, or how exactly does that work?   Thank you so much for anyone who can explain it very simply...


Title: Re: Question thats been bothering me
Post by: JasonXG on June 20, 2016, 09:28:17 PM
Maybe you should offer a bounty for this. You might have better luck finding someonenthat can assist you that way.


Title: Re: Question thats been bothering me
Post by: jpoker272727 on June 21, 2016, 12:50:29 AM
Maybe you should offer a bounty for this. You might have better luck finding someonenthat can assist you that way.


It seems like you copy and paste it somewhere, I dont think its meant to be tricky or complicated.  Thats the impression i get from look at the site.  Ill try emailing the owner of the site ,  i have a feeling you just copy and paste it somewhere.  I just dont know where.  Ill keep ya updated. :)


Title: Re: Question thats been bothering me
Post by: Joel_Jantsen on June 21, 2016, 01:34:30 AM
That code is basically to verify if your roll result is provably fair.You don't really copy paste the code anywhere but you use that algorithm to verify if the result of your roll is exactly the same after you apply the actual txid and secret open hash.You don't need a lot of math to do so,Internet does everything for you.

NlNiCo has nicely explained how to check and verify the result also he has provided all the links such as Sha512 converter/modulo finder/hex to decimal ,all you literally have to do is just copy paste your tx along with the server hash from the list below the code on the website.

Hope this helps.If its too much too understand ,let me know I will break it down for you.
https://dicesites.com/provably-fair


Maybe you should offer a bounty for this. You might have better luck finding someonenthat can assist you that way.
YoShitters and their opinions...I wonder if having a YoShit signature automatically affects your brain.


Title: Re: Question thats been bothering me
Post by: jpoker272727 on June 21, 2016, 11:44:42 AM
yes it does very much thank you, i really appreciate it. 


Title: Re: Question thats been bothering me
Post by: JasonXG on June 24, 2016, 07:45:28 PM
Maybe you should offer a bounty for this. You might have better luck finding someonenthat can assist you that way.


It seems like you copy and paste it somewhere, I dont think its meant to be tricky or complicated.  Thats the impression i get from look at the site.  Ill try emailing the owner of the site ,  i have a feeling you just copy and paste it somewhere.  I just dont know where.  Ill keep ya updated. :)

Yes ,

https://dicesites.com/provably-fair won't help since it has support for many other sites but not satohibones. Satoshibones works differently. Have a look here https://docs.python.org/3.4/library/hashlib.html
You are indeed correct you do copy and past the code but first you need your tx. Everyday the secret that you use to hash with your tx will be found here http://bitzillions.com/satoshibones/verify it will change each day.
If you like you can run different kinds of code on the following site http://ideone.com/fork/BAoZgq