tracingEnabled:=flag.Bool("tracing-enabled",false,"Enables tracing through OpenTelemetry. If RENTERD_TRACING_ENABLED is set, it overwrites the CLI flag's value. Tracing can be configured using the standard OpenTelemetry environment variables. https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/protocol/exporter.md")
tracingServiceInstanceId:=flag.String("tracing-service-instance-id","cluster","ID of the service instance used for tracing. If RENTERD_TRACING_SERVICE_INSTANCE_ID is set, it overwrites the CLI flag's value.")
dir:=flag.String("dir",".","directory to store node state in")
flag.StringVar(&busCfg.remoteAddr,"bus.remoteAddr","","URL of remote bus service - can be overwritten using RENTERD_BUS_REMOTE_ADDR environment variable")
flag.StringVar(&busCfg.apiPassword,"bus.apiPassword","","API password for remote bus service - can be overwritten using RENTERD_BUS_API_PASSWORD environment variable")
flag.BoolVar(&busCfg.Bootstrap,"bus.bootstrap",true,"bootstrap the gateway and consensus modules")
flag.StringVar(&busCfg.GatewayAddr,"bus.gatewayAddr",build.DefaultGatewayAddress,"address to listen on for Sia peer connections - can be overwritten using RENTERD_BUS_GATEWAY_ADDR environment variable")
flag.BoolVar(&workerCfg.enabled,"worker.enabled",true,"enable/disable creating a worker - can be overwritten using the RENTERD_WORKER_ENABLED environment variable")
flag.DurationVar(&workerCfg.BusFlushInterval,"worker.busFlushInterval",5*time.Second,"time after which the worker flushes buffered data to bus for persisting")
flag.StringVar(&workerCfg.WorkerConfig.ID,"worker.id","worker","unique identifier of worker used internally - can be overwritten using the RENTERD_WORKER_ID environment variable")
flag.StringVar(&workerCfg.remoteAddrs,"worker.remoteAddrs","","URL of remote worker service(s). Multiple addresses can be provided by separating them with a semicolon. Can be overwritten using RENTERD_WORKER_REMOTE_ADDRS environment variable")
flag.StringVar(&workerCfg.apiPassword,"worker.apiPassword","","API password for remote worker service")
flag.DurationVar(&workerCfg.SessionLockTimeout,"worker.sessionLockTimeout",30*time.Second,"the maximum amount of time a host should wait on the lock when the lock RPC is called")
flag.DurationVar(&workerCfg.SessionReconnectTimeout,"worker.sessionReconnectTimeout",10*time.Second,"the maximum amount of time reconnecting a session is allowed to take")
flag.DurationVar(&workerCfg.SessionTTL,"worker.sessionTTL",2*time.Minute,"the time a host session is valid for before reconnecting")
flag.DurationVar(&workerCfg.DownloadSectorTimeout,"worker.downloadSectorTimeout",3*time.Second,"timeout applied to sector downloads when downloading a slab")
flag.DurationVar(&workerCfg.UploadSectorTimeout,"worker.uploadSectorTimeout",5*time.Second,"timeout applied to sector uploads when uploading a slab")
flag.DurationVar(&autopilotCfg.AccountsRefillInterval,"autopilot.accountRefillInterval",defaultAccountRefillInterval,"interval at which the autopilot checks the workers' accounts balance and refills them if necessary")
flag.BoolVar(&autopilotCfg.enabled,"autopilot.enabled",true,"enable/disable the autopilot - can be overwritten using the RENTERD_AUTOPILOT_ENABLED environment variable")
flag.DurationVar(&autopilotCfg.Heartbeat,"autopilot.heartbeat",10*time.Minute,"interval at which autopilot loop runs")
flag.Float64Var(&autopilotCfg.MigrationHealthCutoff,"autopilot.migrationHealthCutoff",0.75,"health threshold below which slabs are migrated to new hosts")
flag.DurationVar(&autopilotCfg.ScannerInterval,"autopilot.scannerInterval",24*time.Hour,"interval at which hosts are scanned")
flag.Uint64Var(&autopilotCfg.ScannerBatchSize,"autopilot.scannerBatchSize",1000,"size of the batch with which hosts are scanned")
flag.Uint64Var(&autopilotCfg.ScannerMinRecentFailures,"autopilot.scannerMinRecentFailures",10,"minimum amount of consesutive failed scans a host must have before it is removed for exceeding the max downtime")
flag.Uint64Var(&autopilotCfg.ScannerNumThreads,"autopilot.scannerNumThreads",100,"number of threads that scan hosts")
flag.DurationVar(&nodeCfg.shutdownTimeout,"node.shutdownTimeout",5*time.Minute,"the timeout applied to the node shutdown")