74 lines
3.7 KiB
C#
Raw Permalink Normal View History

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')")]
public string CodexEndpoints { get; set; } =
2025-04-03 15:59:48 +02:00
"http://localhost:8080" + ";" +
"http://localhost:8081" + ";" +
"http://localhost:8082" + ";" +
"http://localhost:8083" + ";" +
"http://localhost:8084" + ";" +
"http://localhost:8085" + ";" +
"http://localhost:8086" + ";" +
"http://localhost:8087";
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
[Uniform("contract-duration", "cd", "CONTRACTDURATION", false, "contract duration in minutes. (default 6 hours)")]
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
[Uniform("contract-expiry", "ce", "CONTRACTEXPIRY", false, "contract expiry in minutes. (default 15 minutes)")]
2025-04-03 15:59:48 +02:00
public int ContractExpiryMinutes { get; set; } = 15;
2024-04-01 20:40:03 +02:00
[Uniform("num-hosts", "nh", "NUMHOSTS", false, "Number of hosts for contract. (default 10)")]
public int NumHosts { get; set; } = 5;
2024-04-01 20:40:03 +02:00
[Uniform("num-hosts-tolerance", "nt", "NUMTOL", false, "Number of host tolerance for contract. (default 5)")]
public int HostTolerance { get; set; } = 1;
2024-04-01 20:40:03 +02:00
2025-01-25 14:07:15 +01:00
[Uniform("price","p", "PRICE", false, "Price per byte per second in TSTWEI. (default 1000)")]
public int PricePerBytePerSecond { get; set; } = 1000;
2024-04-01 20:40:03 +02:00
2025-01-25 14:07:15 +01:00
[Uniform("collateral", "c", "COLLATERAL", false, "Required collateral per byte in TSTWEI. (default 1)")]
public int CollateralPerByte { get; set; } = 1;
2024-04-01 20:40:03 +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
2025-04-03 14:42:34 +02:00
[Uniform("ethAddressFile", "eaf", "ETHADDRESSFILE", false, "File(s) with eth address used by codex node. Used for balance checking if geth/contracts information is provided. Semi-colon separated.")]
2025-04-03 14:52:30 +02:00
public string EthAddressFile { get; set; } =
"/root/codex-testnet-starter/scripts/eth.address" + ";" +
"/root/codex-testnet-starter/scripts/eth_2.address" + ";" +
"/root/codex-testnet-starter/scripts/eth_3.address" + ";" +
2025-04-03 15:59:48 +02:00
"/root/codex-testnet-starter/scripts/eth_4.address" + ";" +
"/root/codex-testnet-starter/scripts/eth_5.address" + ";" +
"/root/codex-testnet-starter/scripts/eth_6.address" + ";" +
"/root/codex-testnet-starter/scripts/eth_7.address" + ";" +
"/root/codex-testnet-starter/scripts/eth_8.address";
2025-05-02 08:21:56 +02:00
[Uniform("slowModeDelayMinutes", "smdm", "SLOWMODEDELAYMINUTES", false, "When contract failure threshold is reached, slow down process for each file by this amount of minutes.")]
2025-06-02 18:53:26 +02:00
public int SlowModeDelayMinutes { get; set; } = 30 * 1;
2025-05-02 08:21:56 +02:00
2024-04-01 20:40:03 +02:00
public string LogPath
{
get
{
return Path.Combine(DataPath, "logs");
}
}
}
}