ethereum / py-evm

A Python implementation of the Ethereum Virtual Machine
https://py-evm.readthedocs.io/en/latest/
MIT License
2.22k stars 637 forks source link

EIP-4788: parent beacon block root #2135

Closed fselmo closed 5 months ago

fselmo commented 5 months ago

What was wrong?

EIP-4788 needs implementation for the cancun network upgrade

How was it fixed?

Implement EIP-4788:

Something we need to consider is how we want to handle the beacon roots contract when the tests don't initialize a pre-state with the right code at that address.[I opted to inject the code at init of the CancunVM if it doesn't already exist. We can revise this by the end of the Cancun changes if need be.]

Note: All related tests are passing except for:

Reviewers can check the above tests ^ with the following command:

pytest tests/json-fixtures/blockchain/test_blockchain.py --fork Cancun -k beacon_root

Todo:

Cute Animal Picture

20240124_143930