mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-31 12:08:37 +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"
|
"golang.org/x/sync/errgroup"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BALStateTransition performs the state root update and commit for EIP-7928
|
// BALStateTransition is responsible for performing the state root update
|
||||||
// access-list-containing blocks. One instance per block.
|
// and commit for EIP 7928 access-list-containing blocks. An instance of
|
||||||
|
// this object is only used for a single block.
|
||||||
type BALStateTransition struct {
|
type BALStateTransition struct {
|
||||||
accessList bal.AccessListReader
|
accessList bal.AccessListReader
|
||||||
written bal.WrittenCounts
|
written bal.WrittenCounts
|
||||||
|
|
@ -26,13 +27,20 @@ type BALStateTransition struct {
|
||||||
stateTrie Trie
|
stateTrie Trie
|
||||||
parentRoot common.Hash
|
parentRoot common.Hash
|
||||||
|
|
||||||
|
// the computed state root of the block
|
||||||
rootHash common.Hash
|
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
|
postStates map[common.Address]*types.StateAccount
|
||||||
tries sync.Map
|
// a map of common.Address -> Trie containing the account tries for all
|
||||||
deletions map[common.Address]struct{}
|
// 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
|
// Deletion counters; not derivable from the BAL alone (selfdestruct vs
|
||||||
// balance/nonce reset is indistinguishable without prestate).
|
// balance/nonce reset is indistinguishable without prestate).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue