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

fix: cancun transaction executor #2159

Closed charles-cooper closed 3 months ago

charles-cooper commented 3 months ago

in chain.estimate_gas(), the chain creates a snapshot, applies a transaction, then reverts the snapshot. the issue with this is applying a transaction creates a new JournalDB inside of the transient storage, so the checkpoint from the snapshot is no longer valid as soon as apply_transaction() is called. this commit cleans the transient storage db by calling JournalDB.clear() so that the checkpoint from the snapshot is still valid.

What was wrong?

Related to Issue # Closes #

How was it fixed?

Todo:

Cute Animal Picture

image