-
Notifications
You must be signed in to change notification settings - Fork 88
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
new(tests): EIP-2935: Serve historical block hashes from state #564
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! Happy for you to merge this after tox is passing.
I'm aware that we need to update this based on these change:
ethereum/EIPs#8577
I really liked the approach with the contract.bin
file, but I guess we wont need it now.
I tried to outline what the key changes below are from my understanding, I think we could add extra tests for some of these cases, on the off chance clients keep some of the original funcitionality:
- Only update the ring buffer starting from the fork block and not including additional ancestors. Maybe add a test to check that additional ancestors are not included.
- Before the fork check that the opcode returns the blockhash for blocks within the old blockhash window, zero otherwise. We could extend this to be 256 + 1 blocks before transitioning. After the fork check the same for the appropriate new windon. I believe it should be gradual, so we could check inside and outside this window for each block as the ring buffer is filling up until > 8192 blocks. We could maybe do this all in one test, like a super transition test. :)
- BLOCKHASH gas costs, with the new update the opcode gas cost now remains the same. We could add a sanity check for this to make sure clients adhere to this.
tests/prague/eip2935_historical_block_hashes_from_state/test_block_hashes.py
Outdated
Show resolved
Hide resolved
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.
Oh and then the CHANGELOG too!
ποΈ Description
Implement EIP-2935 tests for Prague.
π Related Issues
#498
β Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.