Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure pending state is ready for tx execution (celo-org#1858)
* Enusre pending state is ready for tx execution This commit ensures that StateDB.Prepare is called on the pending state before it is returned from the miner/worker. This prevents access logs from previous transaction executions from interfering with the gas cost calculations of the subsequently executed transaction. The problem this solves was introdued by this upstream PR ethereum/go-ethereum#21509 which added an access list to the state which was used to reduce gas costs for repeated access of the same state locations, this resulted in the pending block having the access list of the last executed transaction, which could cause gas estimates to be wrong when the estimated transaction accessed some of the same state as the prior transaction. * Add more in depth comment on call to Prepare
- Loading branch information