EDIT: @BlackHatCoiner Failed to demonstrate how this is not verifiable, then wen't on a smear campaign. I'd advise to ignore himOkay, so the thousand satoshis were successfully routed to you this time. Generated a 1,980 satoshi invoice, and let it toss the coin. The page loaded, it was tails, I lost, and it showed me that if I wanted to verify the result, I should run the following command:
curl -s https://gist.githubusercontent.com/shellandbull/5ab714d5480995eeb92078c7e0d30f9e/raw/a6a6bbb7ca14def28fc6d948136c04cd75edd1aa/verify.rb | ruby /dev/stdin 793 50
Ran it, and got:
----------
seed - 793
odds - 50
House won? true
----------
Would you mind explaining a little bit what's behind this? And perhaps answer the two previous questions:
I don't understand who's generating the seed. If I do it locally, and hand it over to you, with source code transparent, can't I cheat the game? Analogously, if I don't do it locally, and you hand me over the seed, can't you cheat me?
I think I've found a bug. I've sent another 1,000, but your page has stuck here. It doesn't do anything. I have not received anything back, so I assume the coin isn't being tossed in the background.
I'm the developer. I'll answer your comments.
> Okay, so the thousand satoshis were successfully routed to you this timeThere's a ton of reasons why sats are not routed properly through lightning.
I don't know if your wallet has issues or if the node your wallet uses has issues. This is the feedback that I got from LND core developers when trying to troubleshoot this.
I "fixed" your issue by resetting mission control on our lightning node.
This erases previous routing failures. I don't know why you had a routing failure to start with and I'm not responsible for that either, as your transactions don't run through my node. If it was a routing failure coming from a payout then please by all means report it and we will sort it. Payouts come out of our node.
For the record we are aiming for users that are using battle tested software(WoS, Zeus, LND, Alby)
If your setup is non-standard please don't use my app
Would you mind explaining a little bit what's behind this? And perhaps answer the two previous questions:It's explained on the fair section of the app ->
https://roll.satsumo.xyz/#/fair and was written by my colleague. But I'll give you a TL;DR in bullets as I think its a format thats easy to digest
1) You pay us an invoice - the invoice becomes settled and has a preimage
2) the Preimage is a series of bytes on the invoice, as per ->
https://github.com/lightningnetwork/lnd/blob/master/lnrpc/lightning.proto#L3260-L32653) We decode that preimage and turn it into a NUMERICAL value. The "algorithm" to construct that number is here
https://roll.satsumo.xyz/images/seed-generation.svg 4) That number is YOUR SEED. that SEED is a DETERMINISTIC INPUT for a randomness function. For the same input you get the same output, this is why its verifiable
6) We send you that seed back alongside with the code snippet that determines wether you win or not
7) You run the code and verify your result
The preimage, so in fact, the input, is generated by lightning and nothing to do with us. Hence fair.
So again, to answer your comment
> If I do it locally, and hand it over to you, with source code transparent, can't I cheat the game? Analogously, if I don't do it locally, and you hand me over the seed, can't you cheat me?You have access to your seed the entire time, its automatically generated when you pay us, you have access to it, we have access to it. There's no cheating. The code is the same as shown in
https://roll.satsumo.xyz/#/fair> I think I've found a bug. I've sent another 1,000, but your page has stuck here. It doesn't do anything. I have not received anything back, so I assume the coin isn't being tossed in the background. It could be issues with your internet connection - Did it just froze forever? You would need to show me some sort of error message or failed HTTP request. Otherwise I wouldn't know if its something to do with your setup or connection. You're the first person to run into all of these issues.