py-evm
py-evm copied to clipboard
Support for the ``Paris`` hard fork ("The Merge")
What was wrong?
Paris "the merge" fork support is needed.
How was it fixed?
Support for Paris logic added:
- Paris vm added and relevant classes.
- EIP-4399: Supplant
DIFFICULTYopcode withPREVRANDAO- pushing themix_hashvalue to the stack. - Turn on merge-related
ethereum/tests. - Address some issues with our header db. Difficulty was used to calculate keys for scores and difficulty is always
0now. This caused issues with overwriting same values for keys. - Make Merge tests pass by poking around the library and addressing other issues.
- The transaction fee being
0and going to thecoinbaseaddress never triggeredEIP-161to actually remove the account from state trie calculation if the fee recipient account was in a zero-state at the end of the computation. For the last 15 remaining tests, this ended up being what was causing a wrong state root.
- The transaction fee being
Todo:
- [x] Clean up commit history
- [x] Clean up "minging" nomenclature around base classes, add PoS consensus... these will likely be done in a separate PR to keep things smaller
- [x] Address failing tests
- [x] Add entry to the release notes
Cute Animal Picture

This PR has the rough implementation necessary to pass all the logic behind the merge but I think what comes after this should be the cleaning up of nomenclature around mining, etc... to be a bit more generalized, at least in the base classes. We can probably take this time to refactor some code along the way as well.
I created #2079 to track that.