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

Verkle friendly eip2935 #2

Merged

Conversation

g11tech
Copy link

@g11tech g11tech commented Feb 6, 2024

updates

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.
Copy link
Owner

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.

Copy link
Author

@g11tech g11tech Feb 6, 2024

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

Copy link
Owner

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.

EIPS/eip-2935.md Show resolved Hide resolved
@gballet gballet merged commit bdc951c into gballet:verkle-friendly-eip2935 Feb 6, 2024
5 of 7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants