-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add eip2935 256th ancestor stem to witness #355
Conversation
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.
LGTM
index, suffix := utils.GetTreeKeyStorageSlotTreeIndexes(key[:]) | ||
statedb.Witness().TouchAddressOnWriteAndComputeGas(params.HistoryStorageAddress[:], *index, suffix) |
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.
Makes sense. At some point I wonder if it would be better to tie access witness recording with statedb
methods that read/write the state.
It's just an idea, so this kind of miss are avoided.
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.
yeah it's something I've wanted to do for a long time. I tried once in the past but it was buggy and I had other priorities. I would wait for the shadowfork + rebase to do that, but it would be a pretty good thing.
Adding this stem is necessary for the stateless execution to be able to determine if the block height is at least 256 blocks past the fork block, and therefore if it needs to activate.