-
Notifications
You must be signed in to change notification settings - Fork 2
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
Verkle friendly eip2935 #2
Verkle friendly eip2935 #2
Conversation
EIPS/eip-2935.md
Outdated
Note that this means that slot `max(block.number - 256, 0)` is accessed during block execution. | ||
At the start of processing any block where `block.timestamp > FORK_TIMESTAMP` (ie. before processing any transactions), | ||
* run `sstore(HISTORY_STORAGE_ADDRESS, block.number - 1, block.prevhash)`. | ||
* additionally if this is the first block of the fork, then store last `min(HISTORY_SERVE_WINDOW-1, block.number-1)` blocks' prevhash into their corresponding slots i.e persist the entire `HISTORY_SERVE_WINDOW` block hashes (up until the genesis) that can be accessed in the block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so actually it would need to be min(HISTORY_SERVE_WINDOW, block.number)
since the genesis block would have to be inserted as well, and you need to insert all 256 previous blocks at fork block time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes there are additional insert's of last min(HISTORY_SERVE_WINDOW-1, block.number-1)
blocks' prevhash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, then maybe put "additionally" in bold so that people like me notice.
updates