I need a function that generates a random number from 0 to n for the lottery.
I found 2 ways to do that:
1. https://gist.github.com/alexvandesande/259b4ffb581493ec0a1c
But miners can influence the number by not publishing a block with an unwanted outcome
2. Use JSON-RPC random.org with oraclize.it
But oraclize is centralized service.
So, which is the safest way to generate a random number?
Asked
Active
Viewed 102 times
3
J-B
- 8,941
- 16
- 46
- 77
Maxim Ananko
- 63
- 3