2024-04-01 20:40:03 +02:00
using ArgsUniform ;
namespace AutoClient
{
public class Configuration
{
2024-09-12 12:05:42 +02:00
[Uniform("codex-endpoints", "ce", "CODEXENDPOINTS", false, "Codex endpoints. Semi-colon separated. (default 'http://localhost:8080')")]
2024-10-30 11:15:33 +01:00
public string CodexEndpoints { get ; set ; } =
2024-11-11 16:12:25 +01:00
"http://localhost:8080" ;
2024-04-01 20:40:03 +02:00
[Uniform("datapath", "dp", "DATAPATH", false, "Root path where all data files will be saved.")]
public string DataPath { get ; set ; } = "datapath" ;
2024-06-28 08:47:09 +02:00
[Uniform("purchases", "np", "PURCHASES", false, "Number of concurrent purchases.")]
2024-06-28 09:16:12 +02:00
public int NumConcurrentPurchases { get ; set ; } = 10 ;
2024-06-28 08:47:09 +02:00
2024-08-23 13:21:31 +02:00
[Uniform("contract-duration", "cd", "CONTRACTDURATION", false, "contract duration in minutes. (default 6 hours)")]
2024-10-30 11:15:33 +01:00
public int ContractDurationMinutes { get ; set ; } =
60 * 24 * 6 ; // 6 days
//60 * 6; 6 hours
// Cluster nodes configured for max 7-day storage.
2024-04-01 20:40:03 +02:00
2024-08-23 13:21:31 +02:00
[Uniform("contract-expiry", "ce", "CONTRACTEXPIRY", false, "contract expiry in minutes. (default 15 minutes)")]
2024-10-30 11:15:33 +01:00
public int ContractExpiryMinutes { get ; set ; } = 60 ;
2024-04-01 20:40:03 +02:00
2024-09-12 15:29:50 +02:00
[Uniform("num-hosts", "nh", "NUMHOSTS", false, "Number of hosts for contract. (default 10)")]
2024-10-30 11:15:33 +01:00
public int NumHosts { get ; set ; } = 5 ;
2024-04-01 20:40:03 +02:00
2024-09-12 15:29:50 +02:00
[Uniform("num-hosts-tolerance", "nt", "NUMTOL", false, "Number of host tolerance for contract. (default 5)")]
2024-10-30 11:15:33 +01:00
public int HostTolerance { get ; set ; } = 1 ;
2024-04-01 20:40:03 +02:00
[Uniform("price","p", "PRICE", false, "Price of contract. (default 10)")]
2024-10-30 11:15:33 +01:00
public int Price { get ; set ; } = 1000 ;
2024-04-01 20:40:03 +02:00
[Uniform("collateral", "c", "COLLATERAL", false, "Required collateral. (default 1)")]
public int RequiredCollateral { get ; set ; } = 1 ;
2024-08-23 13:21:31 +02:00
[Uniform("filesizemb", "smb", "FILESIZEMB", false, "When greater than zero, size of file generated and uploaded. When zero, random images are used instead.")]
public int FileSizeMb { get ; set ; } = 0 ;
2024-10-30 11:09:13 +01:00
[Uniform("folderToStore", "fts", "FOLDERTOSTORE", false, "When set, autoclient will attempt to upload and purchase storage for every non-JSON file in the provided folder.")]
2024-11-11 16:12:25 +01:00
public string FolderToStore { get ; set ; } = "/data/EthereumMainnetPreMergeEraFiles" ;
2024-10-30 11:09:13 +01:00
2024-04-01 20:40:03 +02:00
public string LogPath
{
get
{
return Path . Combine ( DataPath , "logs" ) ;
}
}
}
}