Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ability to generate more random values from interface #16

Open
moodysalem opened this issue Mar 7, 2023 · 0 comments
Open

remove ability to generate more random values from interface #16

moodysalem opened this issue Mar 7, 2023 · 0 comments

Comments

@moodysalem
Copy link

moodysalem commented Mar 7, 2023

it should be clear from the interface that the randomness provider can only generate max 32 bytes of entropy per block, at least as currently implemented

/// @notice Returns >= 1 random values from a specific block.
function fetchRandomness(uint256 blockNum, uint256 numberRandomValues) external view returns (uint256[] memory);

this interface may confuse the user of the randomness provider into thinking that they can get more entropy from a single block, when it's really just pseudorandom numbers generated from a seed. while this can be explained in docs, it's better to keep it out of the interface and just have a separate library for generating pseudorandom numbers from a seed imo

also the user may not want to use the method for generating pseudorandom numbers that is implemented in the randomness provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant