diff --git a/core/overlay/state_transition.go b/core/overlay/state_transition.go index 44cbdab11d..b4eeec66b8 100644 --- a/core/overlay/state_transition.go +++ b/core/overlay/state_transition.go @@ -31,7 +31,11 @@ import ( // has been rewritten. // * the conversion pointers should no longer be necessary, // remove them when it's been confirmed. -// * we can't keep the preimage offset in the file +// * we can't keep the preimage offset in the file, since +// some clients might decide to record their preimages and +// skip the use of the file altogether. Therefore, they can't +// know what the offset it, unless they keep track of how many +// bytes have been read since the start, which is a possibility. type TransitionState struct { CurrentAccountAddress *common.Address // addresss of the last translated account CurrentSlotHash common.Hash // hash of the last translated storage slot diff --git a/core/state/database.go b/core/state/database.go index 99a8349537..fbc1c2dcf2 100644 --- a/core/state/database.go +++ b/core/state/database.go @@ -239,8 +239,9 @@ func (db *CachingDB) ReadersWithCacheStats(stateRoot common.Hash) (ReaderWithSta // OpenTrie opens the main account trie at a specific root hash. func (db *CachingDB) OpenTrie(root common.Hash) (Trie, error) { if db.triedb.IsVerkle() { - // if the transition has started, it will be present in the overlay tree, - // so we open it regardless. + // if the transition has started, the pointers will be present in the + // overlay tree, and the tree itself will be present, so the tree is + // opened and the pointers read, regardless of what comes afterwards. bt, err := bintrie.NewBinaryTrie(root, db.triedb) if err != nil { return nil, fmt.Errorf("could not open the overlay tree: %w", err) diff --git a/core/state/statedb.go b/core/state/statedb.go index 294f5f719d..61d80df56e 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -356,10 +356,6 @@ func (s *StateDB) InTransition() bool { return completeValue != (common.Hash{}) } -func (s *StateDB) ProcessBinaryTreeTransition(maxSlot uint64) { - -} - // TxIndex returns the current transaction index set by SetTxContext. func (s *StateDB) TxIndex() int { return s.txIndex