Repository navigation
[#4886] Widen LibRandomness.SEED_WINDOW to 8191, the EIP-2935 window - #92
Open
isaacdoidge wants to merge 1 commit into
Open
isaacdoidge wants to merge 1 commit into
isaacdoidge wants to merge 1 commit into
Conversation
`seedAt` serves the seeds of the 8191 blocks below the current one from smr-moonshot#4886. `SEED_WINDOW`, `isServable` and the `seedAt` NatSpec in `LibRandomness` and `ISupraRandomness` state the new window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Companion smr-moonshot PR: https://github.com/Entropy-Foundation/smr-moonshot/pull/5035 (widens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LibRandomness.SEED_WINDOWis 8191, up from 256.isServablereads the constant, so it follows.seedAtNatSpec inLibRandomnessandISupraRandomnessstates the window as[block.number - 8191, block.number - 1], the window of the EIP-2935 block hash history, instead ofBLOCKHASH's 256 blocks.Motivation
smr-moonshot#4886 stores block seeds in their own table and widens the randomness precompile's
seedAtwindow to 8191 blocks. At the block intervals measured on 2026-11-13 (Devnet about 0.1 s, Testnet 0.22 s, Mainnet 1.08 s), 256 blocks is 30 s to 4.6 min; 8191 is about 14 min at 0.1 s per block. The companion smr-moonshot PR changes the precompile, the node's seed storage and the Integration book.Notes for review
src/usesLibRandomness, so no deployed bytecode changes.SEED_WINDOW = 256keep working: the window they assume lies inside the new one.Test plan
forge buildforge test --match-path test/LibRandomness.t.sol: 2 passedforge fmt --checkon both files🤖 Generated with Claude Code