go-ethereum/eth
Matthieu Vachon 599c461cad The beacon root must be processed before any transactions to have correct state
The beacon root when applied in `state_processor.go` is performed right before executing transaction. That means that contract reliying on this value would query the same value found in the block header.

In that spirit, it means that any tracing/operation relying on state data which touches transaction must have updated the beacon root before any transaction processing. This PR brings this where I spotted where it was important through `StateAtTransaction` and those using with `StateAtBlock` and transactions.

For now I've put the beacon root update outside of `StateAtBlock`. I was reluctant to include it in `StateAtBlock` because technically the state at block doesn't include any state happening "in the block". But everywhere that `StateAtBlock` was used, it felt setting the beacon root was needed, so it would be posssible to change the semantic of the function and run any system pre-hooks.

Kinda relevant with PR #29372
2024-03-29 12:56:46 -04:00
..
catalyst eth/catalyst: fix flaw in withdrawal-gathering in simulated beacon (#29344) 2024-03-26 12:26:44 +01:00
downloader log: use native log/slog instead of golang/exp (#29302) 2024-03-22 13:17:59 +01:00
ethconfig eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
fetcher consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
filters miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
gasestimator all: use uint256 in state (#28598) 2024-01-23 14:51:58 +01:00
gasprice all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
protocols all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
tracers The beacon root must be processed before any transactions to have correct state 2024-03-29 12:56:46 -04:00
api_admin.go eth: ignore genesis block on importChain (#27956) 2023-08-21 13:32:34 -04:00
api_backend.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
api_debug.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
api_debug_test.go all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
api_miner.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
backend.go ethclient/simulated: clean up Node resources when simulated backend is closed (#29316) 2024-03-25 18:03:44 +01:00
bloombits.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
handler.go all: fix typos in comments (#29186) 2024-03-07 22:56:19 +01:00
handler_eth.go consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
handler_eth_test.go eth: fix typo (#29320) 2024-03-25 10:16:44 +08:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
peer.go eth: remove admin.peers[i].eth.head and difficulty (#26804) 2023-03-06 09:27:46 +02:00
peerset.go consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
state_accessor.go The beacon root must be processed before any transactions to have correct state 2024-03-29 12:56:46 -04:00
sync.go consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
sync_test.go consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00