-
Notifications
You must be signed in to change notification settings - Fork 4
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
Proposal for randomness story #28
Comments
OP-stack passes through the PrevRandao from the L1 block. Since the L2 has more blocks than L1, the value does not change every block. In the case of Optimism mainnet, it is an average of 6 blocks with the same value (12s block time on Ethereum / 2s block time on Optimism = 6), but the number can easily diverge from this average:
Due to the latency with which the PrevRandao moves from L1 to L2, application developers should work with a larger lookahead when the randomness is used for important purposes. See EIP-4399 "Tips for application developers". This is especially true if we only read data from finalized blocks, as this further increased the time between knowing the randao value and its availability on L2. |
To maintain the interface for existing users of Celo's randao, we could change the implementation of our current
If we could find out how often the Random contract is used outside of the core Celo protocol and by which contracts, that would give us insight in how likely these problems are. |
After checking the Blockscout db for Celo mainnet, we know that the Random contract was never used by third parties and there isn't even any recent internal usage (except for the consensus). So we can just stop supporting out current randomness system and provide Optimism's prevrandao without any changes. |
Tasks
The text was updated successfully, but these errors were encountered: