code: def _check_required_settings(batches):
      
      required_settings = [
          'sawtooth.consensus.algorithm.name',
          'sawtooth.consensus.algorithm.version']
  
      for batch in batches:
          for txn in batch.transactions:
              txn_header = TransactionHeader()
              txn_header.ParseFromString(txn.header)
              if txn_header.family_name == 'sawtooth_settings':
                  settings_payload = SettingsPayload()
                  settings_payload.ParseFromString(txn.payload)
                  if settings_payload.action == SettingsPayload.PROPOSE:
                      proposal = SettingProposal()
                      proposal.ParseFromString(settings_payload.data)
                      if proposal.setting in required_settings:
                          required_settings.remove(proposal.setting)
  
      if required_settings:
          raise CliException(
              'The following setting(s) are required at genesis, but were not '
              'included in the genesis batches: {}'.format(required_settings))
docs: Ensure that all settings required at genesis are set.