From e3ca516b97447c4312586f80a526cacb04003c63 Mon Sep 17 00:00:00 2001 From: benbierens Date: Fri, 23 Aug 2024 13:37:25 +0200 Subject: [PATCH] Readme on how to run auto-client --- Tools/AutoClient/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Tools/AutoClient/README.md diff --git a/Tools/AutoClient/README.md b/Tools/AutoClient/README.md new file mode 100644 index 0000000..3429350 --- /dev/null +++ b/Tools/AutoClient/README.md @@ -0,0 +1,34 @@ +# Codex auto-client + +This thing will generate files, upload them, and purchase storage for them in an endless loop. + +Can generate random images or random data of a specified size. + +## How to run + +- dotnet 7.0 and CLI arguments: `dotnet run -- --codex-host=... --codex-port=...` +- docker and env-vars: `codexstorage/codex-autoclient:sha-88daab3` + +## Configuration options +Options can be configured via CLI option or environment variable. + +| CLI option | Environment variable | Description | +|-------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------| +| "--codex-host" | "CODEXHOST" | Codex Host address. (default 'http://localhost') | +| "--codex-port" | "CODEXPORT" | port number of Codex API. (8080 by default) | +| "--datapath" | "DATAPATH" | Root path where all data files will be saved. | +| "--purchases" | "PURCHASES" | Number of concurrent purchases. | +| "--contract-duration" | "CONTRACTDURATION" | contract duration in minutes. (default 6 hours) | +| "--contract-expiry" | "CONTRACTEXPIRY" | contract expiry in minutes. (default 15 minutes) | +| "--num-hosts" | "NUMHOSTS" | Number of hosts for contract. (default 5) | +| "--num-hosts-tolerance" | "NUMTOL" | Number of host tolerance for contract. (default 2) | +| "--price" | "PRICE" | Price of contract. (default 10) | +| "--collateral" | "COLLATERAL" | Required collateral. (default 1) | +| "--filesizemb" | "FILESIZEMB" | When greater than zero, size of file generated and uploaded. When zero, random images are used instead. (default 0) | + +## Timing + +Configuration: `purchases` controls the number of concurrently running storage requests. +Configuration: `contract-duration` controls the duration in minutes of each storage request. +Auto-client will create a new storage request every X minutes, where X is the contract duration divided by the number of purchases. +(Timing may start to vary when contracts fail or time out.)