code: func LoadState(db dbm.DB, version int64) (*State, error) {
  	s := NewState(db)
  	err := s.writeState.forest.Load(version)
  	if err != nil {
  		return nil, fmt.Errorf("could not load MutableForest at version %d: %v", version, err)
  	}
  	// Populate stats. If this starts taking too long, store the value rather than the full scan at startup
  	err = s.IterateAccounts(func(acc *acm.Account) error {
  		if len(acc.Code) > 0 {
  			s.writeState.accountStats.AccountsWithCode++
  		} else {
  			s.writeState.accountStats.AccountsWithoutCode++
  		}
  		return nil
  	})
  	if err != nil {
  		return nil, err
  	}
  	// load the validator ring
  	ring, err := LoadValidatorRing(version, DefaultValidatorsWindowSize, s.writeState.forest.GetImmutable)
  	if err != nil {
  		return nil, err
  	}
  	s.writeState.ring = ring
  	s.ReadState.History = ring
  
  	return s, nil
  }
docs: // Tries to load the execution state from DB, returns nil with no error if no state found