Questions tagged [randomness]
The randomness tag has no usage guidance.
18
questions with no upvoted or accepted answers
3
votes
0answers
11 views
How does eth2 Random Election Work?
In eth2 validators will be randomly selected. What is the formula for how this random selection works?
3
votes
0answers
1k views
Is this approach to an ethereum lottery sound and/or novel?
I'm looking at making gambling apps is ethereum. Currently made a contract that can flip a coin. After looking at this question:
How can I securely generate a random number in my smart contract?
and ...
3
votes
0answers
79 views
How can the “Random Beacon” proposal guard against bribes?
The Random Beacon proposal suggests a scheme where K-of-N signatures are used to sign a random number. It suggests that the only way for a random number to be corrupted if all K signers are corrupt; ...
3
votes
0answers
66 views
Will Serenity provide a practical built-in solution for contracts to get random numbers?
As discussed in How can I securely generate a random number in my smart contract?, it's currently quite hard to get a random number reasonably fast to use in a contract. In situations where you can ...
2
votes
0answers
22 views
Increasing the difficulty/cost of manipulating an on-chain PRNG?
well, from what I understand since everything on-chain is deterministic so theoretically there's no way of having a real cryptograhically secure random number generator that cannot be manipulated by ...
2
votes
0answers
162 views
How bad are future blockhashes as source of entropy exactly?
This is not a duplicate (see below)
Before you answer “bad, the miner can influence them”, please let me specify the question.
It’s clear that things like timestamp should not flow into a random ...
1
vote
0answers
71 views
exploiting keccak for random number generation?
Whenever a ticket will be purchased, a random number will be generated
function _mightWin()
internal
{
address _player = msg.sender; // players address
uint256 ...
1
vote
0answers
35 views
How can I securely generate a random number in my smart contract at POA?
I heard that a block of random function results can be dropped by a malicious miner.
Can POA prevent this?
How can I securely generate a random number in my smart contract?
1
vote
0answers
39 views
PoA (like rinkeby) safer to generate random number (RNG) this function than POW/POS?
How can I securely generate a random number in my smart contract?
I heard that a block of random function results can be dropped by a malicious miner. Can POA prevent this?
1
vote
0answers
32 views
How do mrand.Float64() output the same result with same order in reorganisation?
Recently, I did go deep into the code of reorganisation in blockchain, but I'm confused by the mrand.Float64() in WriteBlockWithState. Here is the code: original code position
// If the total ...
1
vote
0answers
39 views
Can one safely use a bitcoin block hash as a source of randomness in an ethereum contract?
This question here Why aren't block hashes a reliable source of randomness? explains why it is not a good idea to use an ethereum block hash as a source of randomness (SoR) for a contract C; the ...
1
vote
2answers
52 views
accessing unpredictable numbers
I see that this has been a widely discussed topic in the past but I still don't understand why the future block hashes shouldn't be used for lottery-type games. As long as the incentive for a miner to ...
1
vote
0answers
126 views
Can the blockchain run a billion dollar lottery?
As many games and other applications, a lottery needs a reliable random number generator. Especially when the prize is high. There are some sophisticated algorithms to achieve this goal, such as ...
0
votes
0answers
47 views
Bad randomness exploitation
There is a contract with a betting function that calculates a random number and send you back a reward if winning. The betting function looks like:
function bet() public payable
{
if ((...
0
votes
0answers
21 views
How to fix gas estimation failed error while getting random number from Provable Random DS?
I'm using Provable for getting a random number and I am using following code snippet from their github: https://github.com/provable-things/ethereum-examples/blob/master/solidity/random-datasource/...
0
votes
0answers
28 views
How can I use bitcoin block stamp as seed for random number generation?
I am trying to create an ethereum based smart contract that shall generate random number. After searching around, I get to know that ethereum block stamp is vulnerable to miners hacks and false ...
0
votes
1answer
209 views
TypeError: Wrong argument count for function call: 2 arguments given but expected 1. Use abi.encodePacked
I was playing with this post code example:
function random() private view returns (uint8) {
return uint8(uint256(keccak256(block.timestamp, block.difficulty))%251);
}
But I'm always ...
0
votes
1answer
205 views
Need of a random number oracle
I am looking for the less gas consuming random number generator. I think i need an oracle but can you direct me to the best ?
Thanks