From e4f27275cf5faf3da79dd4b17c3a80915c34d6fa Mon Sep 17 00:00:00 2001 From: CPerezz Date: Fri, 8 May 2026 12:05:29 +0200 Subject: [PATCH] core/state: restore BALStateTransition descriptor comments Stripped by 3f5e27e7 alongside the StateDB ones. The struct doc and per-field descriptors (rootHash, diffs, prestates, tries) come back. --- core/state/bal_state_transition.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/core/state/bal_state_transition.go b/core/state/bal_state_transition.go index 2446d49828..d68ac824f7 100644 --- a/core/state/bal_state_transition.go +++ b/core/state/bal_state_transition.go @@ -16,8 +16,9 @@ import ( "golang.org/x/sync/errgroup" ) -// BALStateTransition performs the state root update and commit for EIP-7928 -// access-list-containing blocks. One instance per block. +// BALStateTransition is responsible for performing the state root update +// and commit for EIP 7928 access-list-containing blocks. An instance of +// this object is only used for a single block. type BALStateTransition struct { accessList bal.AccessListReader written bal.WrittenCounts @@ -26,13 +27,20 @@ type BALStateTransition struct { stateTrie Trie parentRoot common.Hash + // the computed state root of the block rootHash common.Hash - diffs bal.StateMutations + // the state modifications performed by the block + diffs bal.StateMutations + + // a map of common.Address -> *types.StateAccount containing the block + // prestate of all accounts that will be modified + prestates sync.Map - prestates sync.Map postStates map[common.Address]*types.StateAccount - tries sync.Map - deletions map[common.Address]struct{} + // a map of common.Address -> Trie containing the account tries for all + // accounts with mutated storage + tries sync.Map //map[common.Address]Trie + deletions map[common.Address]struct{} // Deletion counters; not derivable from the BAL alone (selfdestruct vs // balance/nonce reset is indistinguishable without prestate).