Skip to content

Verkle friendly eip2935#2

Merged
gballet merged 6 commits intogballet:verkle-friendly-eip2935from
g11tech:verkle-friendly-eip2935
Feb 6, 2024
Merged

Verkle friendly eip2935#2
gballet merged 6 commits intogballet:verkle-friendly-eip2935from
g11tech:verkle-friendly-eip2935

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.

@gballet gballet merged commit bdc951c into gballet:verkle-friendly-eip2935 Feb 6, 2024
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