Advertisement
Guest User

orc_configz

a guest
Jul 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. const { randomBytes } = require('crypto');
  4. const ini = require('ini');
  5. const { existsSync, writeFileSync } = require('fs');
  6. const mkdirp = require('mkdirp');
  7. const { homedir } = require('os');
  8. const { join } = require('path');
  9. const datadir = join(homedir(), '.config/orc');
  10.  
  11. module.exports = {
  12.  
  13.   // Identity/Cryptography
  14.   PrivateExtendedKeyPath: join(datadir, 'x_private_key'),
  15.   ChildDerivationIndex: '0',
  16.  
  17.   // Contract Storage
  18.   ContractStorageBaseDir: datadir,
  19.  
  20.   // Shard Database
  21.   ShardStorageBaseDir: datadir,
  22.   ShardStorageMaxAllocation: '0GB',
  23.  
  24.   // Trusted Renter Nodes
  25.   AllowDirectStorageClaims: ['*'],
  26.  
  27.   // Server SSL
  28.   TransportServiceKeyPath: join(datadir, 'service_key.pem'),
  29.   TransportCertificatePath: join(datadir, 'certificate.pem'),
  30.  
  31.   // Public Addressability
  32.   PublicPort: '443',
  33.   ListenPort: '4443',
  34.  
  35.   // Network Bootstrapping
  36.   NetworkBootstrapNodes: [
  37.     'https://orcjfg52ty6ljv54.onion:443',
  38.     'https://orce4nqoa6muz3gt.onion:443',
  39.     'https://orcjd7xgshpovm6i.onion:443',
  40.     'https://orcwfkilxjxo63mr.onion:443'
  41.   ],
  42.  
  43.   // Tor Behavior
  44.   ServiceAvailabilityCheckInterval: '10M',
  45.  
  46.   // Bandwidth Metering
  47.   BandwidthAccountingEnabled: '0',
  48.   BandwidthAccountingMax: '5GB',
  49.   BandwidthAccountingReset: '24HR',
  50.  
  51.   // Debugging/Developer
  52.   VerboseLoggingEnabled: '1',
  53.   ControlPort: '4444',
  54.   ControlHostname: '127.0.0.1',
  55.  
  56.   // Onion Service
  57.   OnionServicePrivateKeyPath: join(datadir, 'onion_key'),
  58.  
  59.   // Node Profiles
  60.   ProfilesEnabled: ["renter"], // renter, farmer, directory
  61.  
  62.   // Renter Profile
  63.   RenterListenTopics: [
  64.     '01020202',
  65.     '02020202',
  66.     '03020202'
  67.   ],
  68.   RenterCapacityCachePath: join(datadir, 'capacity.cache'),
  69.  
  70.   // Local Bridge
  71.   BridgeEnabled: '1',
  72.   BridgeStorageBaseDir: datadir,
  73.   BridgeHostname: '127.0.0.1',
  74.   BridgePort: '4445',
  75.   BridgeAuthenticationEnabled: '0',
  76.   BridgeAuthenticationUser: 'orc',
  77.   BridgeAuthenticationPassword: randomBytes(16).toString('hex'),
  78.   BridgeMetaStoragePath: join(datadir, 'objects.meta'),
  79.   BridgeTempStagingBaseDir: join(datadir, '__bridge.staging'),
  80.   BridgeShardAuditInterval: '5DAYS',
  81.  
  82.   // Directory Server
  83.   DirectoryStorageBaseDir: datadir,
  84.   DirectoryPort: '4446',
  85.   DirectoryHostname: '127.0.0.1',
  86.   DirectoryUseSSL: '0',
  87.   DirectoryServiceKeyPath: join(datadir, 'service_key.pem'),
  88.   DirectoryCertificatePath: join(datadir, 'certificate.pem'),
  89.   DirectoryAuthorityChains: [],
  90.   DirectoryCapacityCachePath: join(datadir, 'capacity.cache'),
  91.  
  92.   // Wallet Connection
  93.   WalletHostname: 'localhost',
  94.   WalletPort: '8232',
  95.   WalletUser: 'orc',
  96.   WalletPassword: 'orc',
  97.   WalletShieldedTransactions: '0',
  98.  
  99.   // Farmer Profile
  100.   FarmerAdvertiseTopics: [
  101.     '01020202',
  102.     '02020202',
  103.     '03020202'
  104.   ],
  105.   FarmerShardReaperInterval: '24HR',
  106.   FarmerAnnounceInterval: '15M'
  107.  
  108. };
  109.  
  110. if (!existsSync(join(datadir, 'config'))) {
  111.   mkdirp.sync(datadir);
  112.   writeFileSync(join(datadir, 'config'), ini.stringify(module.exports));
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement