diff --git a/core/overlay/state_transition.go b/core/overlay/state_transition.go index 2976a0fda2..58680cae30 100644 --- a/core/overlay/state_transition.go +++ b/core/overlay/state_transition.go @@ -33,8 +33,6 @@ var ( ) // StorageReader is a minimal interface for reading contract storage slots. -// It is satisfied by *state.flatReader, allowing the transition state to be -// loaded without a full state.StateDB. type StorageReader interface { Storage(addr common.Address, slot common.Hash) (common.Hash, error) } @@ -94,9 +92,6 @@ func IsTransitionActive(reader StorageReader) bool { // transition registry system contract storage. Returns nil when the // registry has not been initialised (i.e. the chain has not yet reached the // UBT fork block). -// -// The root parameter is unused; it is retained on the signature so callers -// can express the state version they intend to read. func LoadTransitionState(reader StorageReader) (*TransitionState, error) { started, err := reader.Storage(params.BinaryTransitionRegistryAddress, transitionStartedKey) if err != nil { diff --git a/core/state/database_ubt.go b/core/state/database_ubt.go index e17dd48b67..287d683a8f 100644 --- a/core/state/database_ubt.go +++ b/core/state/database_ubt.go @@ -30,13 +30,6 @@ import ( ) // UBTDatabase is an implementation of Database interface for Unified Binary Trie. -// -// In its plain form it uses a single binary trie database. During the -// MPT-to-binary transition, an optional MPT trie database (mpttriedb) and a -// frozen base root provide read-only access to pre-transition state. The -// wrapInTransitionTrie flag controls whether reads at this database are -// served via a TransitionTrie that overlays the binary trie on the MPT -// base; it is normally driven by chainConfig.UBTTransitionActive. type UBTDatabase struct { triedb *triedb.Database mpttriedb *triedb.Database @@ -49,9 +42,6 @@ type UBTDatabase struct { func (db *UBTDatabase) Type() DatabaseType { return TypeUBT } // NewUBTDatabase creates a state database with the Unified binary trie manner. -// State access is wrapped in a TransitionTrie by default (which degenerates -// to a passthrough when there is no MPT base) so callers that don't care -// about the override get sensible defaults. func NewUBTDatabase(triedb *triedb.Database, codedb *CodeDB) *UBTDatabase { if codedb == nil { codedb = NewCodeDB(triedb.Disk())