code: func ConsensusMetadataFromConfigBlock(block *common.Block) (*etcdraft.ConfigMetadata, error) {
  	if block == nil {
  		return nil, errors.New("nil block")
  	}
  
  	if !utils.IsConfigBlock(block) {
  		return nil, errors.New("not a config block")
  	}
  
  	configEnvelope, err := ConfigEnvelopeFromBlock(block)
  	if err != nil {
  		return nil, errors.Wrap(err, "cannot read config update")
  	}
  
  	payload, err := utils.ExtractPayload(configEnvelope)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to extract payload from config envelope")
  	}
  	// get config update
  	configUpdate, err := configtx.UnmarshalConfigUpdateFromPayload(payload)
  	if err != nil {
  		return nil, errors.Wrap(err, "could not read config update")
  	}
  
  	return MetadataFromConfigUpdate(configUpdate)
  }
docs: // ConsensusMetadataFromConfigBlock reads consensus metadata updates from the configuration block