mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 16:59:26 +00:00
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.
This commit is contained in:
parent
4183a70bd6
commit
e4f27275cf
1 changed files with 14 additions and 6 deletions
|
|
@ -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).
|
||||
|
|
|
|||
Loading…
Reference in a new issue