Interface MutableWorldState
- All Superinterfaces:
AutoCloseable, org.hyperledger.besu.evm.worldstate.MutableWorldView, org.hyperledger.besu.evm.worldstate.WorldState, org.hyperledger.besu.evm.worldstate.WorldView
public interface MutableWorldState
extends org.hyperledger.besu.evm.worldstate.WorldState, org.hyperledger.besu.evm.worldstate.MutableWorldView
Represents a mutable view of the Ethereum world state, allowing queries and modifications to
account balances, nonces, code, and storage.
Implementations manage the state root hash and persist changes to underlying storage through
StateRootCommitter.
Extends both WorldState and MutableWorldView.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hyperledger.besu.evm.worldstate.WorldState
org.hyperledger.besu.evm.worldstate.WorldState.StreamableAccount -
Field Summary
Fields inherited from interface org.hyperledger.besu.evm.worldstate.WorldView
EMPTY -
Method Summary
Modifier and TypeMethodDescriptiondefault MutableWorldStateDisables the trie structure used for storage indexing.default MutableWorldStateFreezes the storage by preventing any further changes to it.default booleanReturns whether storage writes are frozen for this world state view.voidpersist(org.hyperledger.besu.plugin.data.BlockHeader blockHeader) Persist accumulated changes to underlying storage using the implementation default committer.voidpersist(org.hyperledger.besu.plugin.data.BlockHeader blockHeader, StateRootCommitter committer) Persist accumulated changes to underlying storage.Methods inherited from interface org.hyperledger.besu.evm.worldstate.MutableWorldView
updaterMethods inherited from interface org.hyperledger.besu.evm.worldstate.WorldState
close, frontierRootHash, rootHash, streamAccountsMethods inherited from interface org.hyperledger.besu.evm.worldstate.WorldView
get
-
Method Details
-
persist
void persist(org.hyperledger.besu.plugin.data.BlockHeader blockHeader, StateRootCommitter committer) Persist accumulated changes to underlying storage.- Parameters:
blockHeader- If persisting for an imported block, the block header of the world state this represents. If this does not represent a forward transition from one block to the nextnullshould be passed in.committer- An implementation ofStateRootCommitterresponsible for recomputing the state root and committing the state changes to storage.
-
persist
void persist(org.hyperledger.besu.plugin.data.BlockHeader blockHeader) Persist accumulated changes to underlying storage using the implementation default committer.- Parameters:
blockHeader- If persisting for an imported block, the block header of the world state this represents. If this does not represent a forward transition from one block to the nextnullshould be passed in.
-
freezeStorage
Freezes the storage by preventing any further changes to it.- Returns:
- this instance
-
isStorageFrozen
default boolean isStorageFrozen()Returns whether storage writes are frozen for this world state view.- Returns:
- true if storage is frozen
-
disableTrie
Disables the trie structure used for storage indexing.- Returns:
- this instance
-