code: func (vi *ValidatorImpl) Validate(configEnv *cb.ConfigEnvelope) error {
  	if configEnv == nil {
  		return errors.Errorf("config envelope is nil")
  	}
  
  	if configEnv.Config == nil {
  		return errors.Errorf("config envelope has nil config")
  	}
  
  	if configEnv.Config.Sequence != vi.sequence+1 {
  		return errors.Errorf("config currently at sequence %d, cannot validate config at sequence %d", vi.sequence, configEnv.Config.Sequence)
  	}
  
  	configUpdateEnv, err := utils.EnvelopeToConfigUpdate(configEnv.LastUpdate)
  	if err != nil {
  		return err
  	}
  
  	configMap, err := vi.authorizeUpdate(configUpdateEnv)
  	if err != nil {
  		return err
  	}
  
  	channelGroup, err := configMapToConfig(configMap, vi.namespace)
  	if err != nil {
  		return errors.Errorf("could not turn configMap back to channelGroup: %s", err)
  	}
  
  	// reflect.Equal will not work here, because it considers nil and empty maps as different
  	if !proto.Equal(channelGroup, configEnv.Config.ChannelGroup) {
  		return errors.Errorf("ConfigEnvelope LastUpdate did not produce the supplied config result")
  	}
  
  	return nil
  }
docs: // Validate simulates applying a ConfigEnvelope to become the new config